1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

1063 Commits

Author SHA1 Message Date
Andrew Bartlett
59c8f48f0d r611: Fix breakage from my last commit:
Now that all session keys are DATA_BLOBs, fix the callers.

This assumes some things about the behaviour of certain crypto
algorithms, without the ability to test it on session keys != 16 bytes
in length.  We will just need to retest when we get the KRB5 support
in (DES keys are 8 bytes).

Andrew Bartlett
(This used to be commit e4355a7ec1)
2007-10-10 12:51:51 -05:00
Andrew Bartlett
dce84ffd37 r610: - Merge the Samba3 'ntlm_auth --diagnostics' testsuite to Samba4.
- This required using NETLOGON_NEG_AUTH2_FLAGS for the
    SetupCredentials2 negotiation flags, which is what Samba3 does,
    because otherwise the server uses different crypto.
  - This tests the returned session keys, which we decrypt.

 - Update the Samba4 notion of a 'session key' to be a DATA_BLOB in
   most places.

 - Fix session key code to return NT_STATUS_NO_SESSION_KEY if none is
   available.

 - Remove a useless argument to SMBsesskeygen_ntv1

 - move netr_CredentialState from the .idl to the new credentials.h

Andrew Bartlett
(This used to be commit 44f8b5b53e)
2007-10-10 12:51:51 -05:00
Andrew Tridgell
55fa62be31 r609: allow ldbedit to take a list of attributes to edit, just like
ldbsearch. This allows you to edit the description of all users using
something like:

  ldbedit 'objectclass=user' description

and not get overwhelmed with fields. It also allows you to edit HIDDEN attributes
by specifying them explicitly
(This used to be commit dd83d39de2)
2007-10-10 12:51:51 -05:00
Andrew Tridgell
a765d3692f r608: - a couple of very minor fixes to the CreateGroup code
- added samr_GetUserPwInfo() samr server call
(This used to be commit 0250f5d6aa)
2007-10-10 12:51:51 -05:00
Andrew Bartlett
5dc73338d2 r607: When our code is looking for an 'empty' data blob
some of it tests the .length, other code checks the
.data.

Ensure that we always NULL the .data, so that talloc-based
blobs behave just like their direct malloc equivalents.

Andrew Bartlett
(This used to be commit 64121aa1a9)
2007-10-10 12:51:50 -05:00
Andrew Tridgell
51d5ddecc6 r606: added a HIDDEN attribute on fields in ldb (in @ATTRIBUTES). This allows you to mark
an attribute as only appearing in searches that explicitly name it. It will be used
for attributes like nTSecurityDescriptor
(This used to be commit f5cd3d733b)
2007-10-10 12:51:50 -05:00
Volker Lendecke
9652ed4de8 r605: Implement CreateDomainGroup, essentially cut&paste from CreateUser2.
Volker
(This used to be commit 59241c0c9a)
2007-10-10 12:51:50 -05:00
Tim Potter
1f2fa49b20 r604: Better dumping of in,out,ref properties.
(This used to be commit 209f5a25a9)
2007-10-10 12:51:50 -05:00
Tim Potter
0221717a62 r602: Autogenerated packet-dcerpc-samr.c now compiles!
(This used to be commit 0c1069b56e)
2007-10-10 12:51:50 -05:00
Andrew Tridgell
54a695f7ed r601: added the server code for all the samr_SetUserInfo and samr_QueryUserInfo levels except for the password
set levels.

This means that a large part of the RPC-SAMR torture test now runs correctly against Samba4
(This used to be commit ec0a51898f)
2007-10-10 12:51:50 -05:00
Tim Potter
b91eb9e73a r600: Get rid of trailing whitespace which freaks out emacs' fontification.
(This used to be commit d0383e9a7a)
2007-10-10 12:51:49 -05:00
Tim Potter
5c50f79b86 r597: Start generating parser code - only supports uint16, uint32 and policy
handle types.
(This used to be commit 1e02ccd94e)
2007-10-10 12:51:49 -05:00
Andrew Tridgell
0ea5d1fde7 r596: log all ldb searches at level 4 in samdb
(This used to be commit defaf0d817)
2007-10-10 12:51:49 -05:00
Andrew Tridgell
1d5c2c364e r595: nicer handling on max_size multiplier
(This used to be commit 994baba7eb)
2007-10-10 12:51:49 -05:00
Andrew Tridgell
961060351e r594: - make sure all users in the domain have the same base sid!
- added proper ldap time construction to provisioning
(This used to be commit 0f12584b4b)
2007-10-10 12:51:49 -05:00
Andrew Tridgell
7aa41d890c r593: add a constant for the records size multiplier for max_size in samr_EnumDomainUsers
(This used to be commit 252b11112c)
2007-10-10 12:51:49 -05:00
Andrew Tridgell
3672a067be r591: don't need to init non-ref out ptrs (thanks to abartlet for spotting this)
(This used to be commit 3ac0cff837)
2007-10-10 12:51:49 -05:00
Tim Potter
a10936532e r589: Fix IDL dump module so --dump and --diff options to pidl.pl work
again.  Still a few problems left though.
(This used to be commit e921a5879f)
2007-10-10 12:51:49 -05:00
Andrew Tridgell
35ffc46454 r587: added server code for samr_EnumDomainUsers, and started adding
samr_SetUserInfo and samr_QueryUserInfo
(This used to be commit e0db9659a8)
2007-10-10 12:51:48 -05:00
Andrew Tridgell
8c2636f59a r586: removed --clientfns from build_idl.sh (tim removed that code from pidl)
(This used to be commit d1dcde1d91)
2007-10-10 12:51:48 -05:00
Andrew Tridgell
d2c7b5cd33 r583: fixed two bugs in the handling of index entry deletion
(This used to be commit 7b5f3370e6)
2007-10-10 12:51:48 -05:00
Andrew Tridgell
810831434a r582: added the LMSessKey in SamInfo and SamInfo2, thanks to work by abartlet
added test code for SamLogon validation level 2 and 3, so we test both
SamInfo and SamInfo2
(This used to be commit 321dbb61cc)
2007-10-10 12:51:48 -05:00
Andrew Tridgell
0ed08d9398 r578: initial server side implementation of samr_CreateUser(),
samr_CreateUser2(), samr_LookupNames(), samr_OpenUser(),
and samr_DeleteUser()

this uses a user template in the SAM db, of objectclass "userTemplate"
and dn CN=TemplateUser,CN=Templates,$BASEDN. Using a template allows
an admin to add any default user attributes that they might want to
the user template and all new users will receive those attributes.
(This used to be commit 10b6e0011b)
2007-10-10 12:51:48 -05:00
Andrew Tridgell
a848b0e3e2 r577: extended the LookupNames test to check for correct handling of unmapped names
(This used to be commit e3b31625f4)
2007-10-10 12:51:48 -05:00
Andrew Tridgell
62e9106086 r576: added a ldap_timestring() function (needed for fields like whenChanged in SAM db)
(This used to be commit b2a6355518)
2007-10-10 12:51:48 -05:00
Andrew Tridgell
2fdf5d332d r575: moved the SID_NAME_USE enum into samr.idl
(This used to be commit 2cb06b39d9)
2007-10-10 12:51:47 -05:00
Andrew Tridgell
265023fafa r574: - another attempt at const cleanliness in ldb
- fixed a problem with searching for values containing an '=' sign

 - fixed the semantics of attempting an attribute deletion on an attribute that doesn't exist.

 - added some more ldb_msg_*() utilities
(This used to be commit 62b4ec367d)
2007-10-10 12:51:47 -05:00
Tim Potter
dee25d910e r550: Remove clientfns.pm module - it was a bad idea.
Start to resurrect eparser.pm for auto-generating ethereal dissectors
for rpc.
(This used to be commit 993a18dd35)
2007-10-10 12:51:47 -05:00
Andrew Tridgell
7e921fb96d r549: added support for DOS error codes in NTSTATUS returns. This uses a
range of NTSTATUS codes that are normally invalid to prevent conflicts
with real error codes.

use the new DOS facility to fix the ERRbaduid return that volker found
(This used to be commit 10fdfb5239)
2007-10-10 12:51:47 -05:00
Andrew Tridgell
998aab3d29 r514: added a context pointer to the samdb interface, as suggested by
metze. Also added a reference count so that a client can close the
connection handle and still used a derived domain handle.
(This used to be commit b1cd98188d)
2007-10-10 12:51:46 -05:00
Andrew Tridgell
68293565de r513: added a generic ldb debug system to allow the Samba debug functions to
be cleanly interfaced to ldb
(This used to be commit 74b89d5f96)
2007-10-10 12:51:46 -05:00
Andrew Tridgell
404c319a50 r511: fix some const handling
(This used to be commit be94cc4032)
2007-10-10 12:51:46 -05:00
Andrew Tridgell
51803f76c8 r510: converted the samdb code to give ldb a talloc context rather than letting ldb use malloc
(This used to be commit a3edd4bca8)
2007-10-10 12:51:46 -05:00
Andrew Tridgell
7216d23ba5 r509: fixed a memory handling bug that affects ldb with memory pools that
change with each request
(This used to be commit 18695cefa1)
2007-10-10 12:51:46 -05:00
Andrew Tridgell
8db2f256e4 r508: fixed a place where we used free() on memory from a talloc(). The new
talloc code catches errors like this.
(This used to be commit 22aa425c96)
2007-10-10 12:51:46 -05:00
Andrew Tridgell
cec1bc8fd7 r507: the new ldb code will use talloc_free() a lot, so I have made
talloc_free() O(1) in preparation. This also halves the number of
malloc() calls and increases our internal consistency checking,
without breaking valgrind testing.
(This used to be commit 2331d4e76e)
2007-10-10 12:51:46 -05:00
Andrew Tridgell
9c07ce7aa4 r506: got rid of unused function secrets_get_trusted_domains()
(This used to be commit bb74a94e26)
2007-10-10 12:51:46 -05:00
Andrew Tridgell
9261ceb89e r504: fixed a bad call to list_union()
(This used to be commit 4404056cd5)
2007-10-10 12:51:45 -05:00
Andrew Tridgell
722e301591 r503: we don't need to include ldb_parse.h any more
(This used to be commit 85e57684b4)
2007-10-10 12:51:45 -05:00
Andrew Tridgell
d8ce7c6a2a r502: modified ldb to allow the use of an external pool memory
allocator. The way to use this is to call ldb_set_alloc() with a
function pointer to whatever memory allocator you like. It includes a
context pointer to allow for pool based allocators.
(This used to be commit 3955c482e6)
2007-10-10 12:51:45 -05:00
Stefan Metzmacher
3aa278b873 r491: regtree and gregedit also depend on LIBCMDLINE (popt stuff)
metze
(This used to be commit ace939a588)
2007-10-10 12:51:45 -05:00
Andrew Tridgell
232bc1503f r490: - expanded the test suite to test modify and delete operations
- made yet another attempt to make ldb const clean.

- "make test" now runs both the tdb and ldap backend tests, and run the ldbtest utility
  with and without indexing

- added prototypes in ldb.h for ldb_msg_*() public functions
(This used to be commit 01e8740676)
2007-10-10 12:51:45 -05:00
Andrew Tridgell
af66c31e44 r476: i forgot the argument to get_time_zone()
(This used to be commit 34ff18839c)
2007-10-10 12:51:45 -05:00
Andrew Tridgell
b4f94f5afa r469: considerably improved the ChangePasswordUser3() IDL thanks to an idea from abartlet
(This used to be commit 5f30c3b077)
2007-10-10 12:51:45 -05:00
Andrew Tridgell
2c367686fc r468: fixed timegm() on broken systems
(This used to be commit a3d639d04f)
2007-10-10 12:51:45 -05:00
Stefan Metzmacher
6a8355a628 r467: hopefully get the buildfarm compiling fine now...
metze
(This used to be commit d15f0e18bb)
2007-10-10 12:51:44 -05:00
Andrew Tridgell
1b3bbc7d44 r466: implemented samr_OpenDomain() and samr_GetDomPwInfo() server side calls
if you take a look at samr_GetDomPwInfo() then you will get a fairly good idea
of what I am planning for the database oriented SAMR server implementation.
(This used to be commit bba0044a51)
2007-10-10 12:51:44 -05:00
Andrew Tridgell
d2ea763761 r465: we need common.h in two more rpc server pipes
(This used to be commit d96b68169a)
2007-10-10 12:51:44 -05:00
Andrew Tridgell
21e6b1531b r464: a big improvement to the API for writing server-side RPC
servers. Previously the server pipe code needed to return the RPC
level status (nearly always "OK") and separately set the function call
return using r->out.result. All the programmers writing servers
(metze, jelmer and me) were often getting this wrong, by doing things
like "return NT_STATUS_NO_MEMORY" which was really quite meaningless
as there is no code like that at the dcerpc level.

I have now modified pidl to generate the necessary boilerplate so that
just returning the status you want from the function will work. So for
a NTSTATUS function you return NT_STATUS_XXX and from a WERROR
function you return WERR_XXX. If you really want to generate a DCERPC
level fault rather than just a return value in your function then you
should use the DCESRV_FAULT() macro which will correctly generate a
fault for you.

As a side effect, this also adds automatic type checking of all of our
server side rpc functions, which was impossible with the old API. When
I changed the API I found and fixed quite a few functions with the
wrong type information, so this is definately useful.

I have also changed the server side template generation to generate a
DCERPC "operation range error" by default when you have not yet filled
in a server side function. This allows us to correctly implement
functions in any order in our rpc pipe servers and give the client the
right information about the fault.
(This used to be commit a4df5c7cf8)
2007-10-10 12:51:44 -05:00
Andrew Tridgell
73744d1ed6 r463: build ldb with debugging when standalone
(This used to be commit 77269e7ad6)
2007-10-10 12:51:44 -05:00