summaryrefslogtreecommitdiff
path: root/source4/rpc_server/samr/samdb.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r3810: create a LIB_SECURITY subsystemStefan Metzmacher1-1/+1
- move dom_sid, security_descriptor, security_* funtions to one place and rename some of them metze (This used to be commit b620bdd672cfdf0e009492e648b0709e6b6d8596)
2007-10-10r3783: - don't use make proto for ldb anymoreStefan Metzmacher1-0/+1
- split ldh.h out of samba's includes.h - make ldb_context and ldb_module private to the subsystem - use ltdb_ prefix for all ldb_tdb functions metze (This used to be commit f5ee40d6ce8224e280070975efc9911558fe675c)
2007-10-10r3453: - split out the auth and popt includesAndrew Tridgell1-3/+4
- tidied up some of the system includes - moved a few more structures back from misc.idl to netlogon.idl and samr.idl now that pidl knows about inter-IDL dependencies (This used to be commit 7b7477ac42d96faac1b0ff361525d2c63cedfc64)
2007-10-10r3005: added talloc wrappers around tdb_open() and ldb_connect(), so that theAndrew Tridgell1-78/+18
caller doesn't have to worry about the constraint of only opening a database a single time in a process. These wrappers will ensure that only a single open is done, and will auto-close when the last instance is gone. When you are finished with a database pointer, use talloc_free() to close it. note that this code does not take account of the threads process model, and does not yet take account of symlinks or hard links to tdb files. (This used to be commit 04e1171996612ddb15f84134cadded68f0d173b2)
2007-10-10r2792: got rid of talloc_ldb_alloc() and instead created talloc_realloc_fn(),Andrew Tridgell1-10/+10
so talloc now doesn't contain any ldb specific functions. allow NULL to be passed to a couple more talloc() functions (This used to be commit 1246f80d806fb5f63cfbf3879de6d546384552a8)
2007-10-10r2734: the samdb_destructor can be staticAndrew Tridgell1-1/+1
(This used to be commit feb63e74f923f2a50c6836e18a6c2bda39644e71)
2007-10-10r2680: switched the libcli/raw/ code over to use talloc_reference(), which ↵Andrew Tridgell1-2/+1
simplifies things quite a bit (This used to be commit c82a9cf750829c4f6982ca3133295c8599023c4e)
2007-10-10r2670: use a destructor to auto-close the samr ldb when the last userAndrew Tridgell1-15/+18
disconnects. Previously the ldb was always kept open. (This used to be commit d78eea9eb8540f137d30aef5fbb397295312eb1b)
2007-10-10r2592: this fixes one of the security memory leaks in the serverAndrew Tridgell1-1/+1
(This used to be commit efb2b88edddef94ecbaa9a871d457d0d7c177546)
2007-10-10r2282: Remove one more magic constant from the source, replace with sizeof().Andrew Bartlett1-1/+1
Andrew Bartlett (This used to be commit a089bcf503bfc91eead08d10539367886b7927cd)
2007-10-10r2059: abartlet: is there a better way to fix this compiler warningStefan Metzmacher1-1/+1
(the same problem as in -r 2056) metze (This used to be commit 98e4b23d450892e1ff37c36e52aa56bdf5f260b9)
2007-10-10r2055: Add PRINTF_ATTRIBUTE to many more parts of the code, and a newAndrew Bartlett1-2/+2
--enable-developer warning for when they are missing. Andrew Bartlett (This used to be commit 8115e44d47bcd65edba08d10117180ae508cdbc1)
2007-10-10r2051: switched the samdb over to using the new destructor and referenceAndrew Tridgell1-11/+12
count features of talloc, instead of re-implementing both those features inside of samdb (which is what we did before). This makes samdb considerably simpler, and also fixes some bugs, as I found some error paths that didn't call samdb_close(). Those are now handled by the fact that a talloc_free() will auto-close and destroy the samdb context, using a destructor. (This used to be commit da60987a92266734c33b81ee217081abdc4330f3)
2007-10-10r1270: Start to break samdb into general bits so we can share code with otherTim Potter1-39/+13
similar dbs. (This used to be commit 1162e2fcff177cbbe84506efea0f79f68ecb233c)
2007-10-10r1268: varient -> variantTim Potter1-2/+2
(This used to be commit de5984c95602ca67e8ac3139c3aa4330b74266e0)
2007-10-10r1025: Rename (across the samr and netlogon pipes, so far)Andrew Bartlett1-7/+12
pwd -> password passwd -> password username -> account_name Also work on consistant structure feild names between these two pipes, and fix up some callers to use samr_Password for the netlogon credential code. Andrew Bartlett (This used to be commit 4e35418c2776f7b79be5b358ffd077754685d1ac)
2007-10-10r1016: - store the schannel session key after it is establishedAndrew Tridgell1-19/+11
- move to a centralised way of handling talloc/ldb interaction (This used to be commit 2b9b752875ba5e03e82f40e31f26bc1f245b3825)
2007-10-10r1009: Make all users of NT and LM passwords use the samr_Password structure.Andrew Bartlett1-18/+18
This includes the netlogon pipe, for the machine account password change system. Andrew Bartlett (This used to be commit 49d545a82057ee8b60d50aa55e908efe59875150)
2007-10-10r937: - added a simple QuerySecurity implementation in samr serverAndrew Tridgell1-0/+11
- moved some sec desc defines into misc.idl - fixed pw_len field in UserInfo26 - made some pipes available on TCP - added netr_DsrEnumerateDomainTrusts() to netlogon - added templates for remaining netlogon IDL calls (from ethereal) - added a unistr_noterm vs unistr error detector in ndr basic decoder - added torture test for netr_DsrEnumerateDomainTrusts() (This used to be commit ae5a5113fb83640dcb9ae4642c1b9eaf28487956)
2007-10-10r919: - added lsa_QueryInfoPolicy2() to IDL, test suite and serverAndrew Tridgell1-0/+22
- added lsa_OpenPolicy2() to server - added guid handling in samdb - added a couple more info policy levels in lsa server - added some DNS info in the provisioning template and script With the above changes WinXP professional can join a Samba4 domain (This used to be commit d6dca96352144d6061175c964069ed54d942b9c2)
2007-10-10r917: - added the start of a LSA server to samba4.Andrew Tridgell1-0/+20
- added start of QueryDomainInfo in samr server "net rpc info" from samba3 now works against a samba4 server. I suspect join will work fairly soon. (This used to be commit 0a2c6a1062d0e364356853001f5f39bdb542f453)
2007-10-10r904: - fixed account expiry testing in auth_samAndrew Tridgell1-8/+8
- added printf style format attribute checking to samdb varargs fns - fix nt_time_to_unix() for zero and -1 times (This used to be commit 41f9b144f9fe77e92f960bd11b1df397a63fd2d5)
2007-10-10r890: convert samba4 to use [u]int8_t instead of [u]int8Stefan Metzmacher1-1/+1
metze (This used to be commit 2986c5f08c8f0c26a2ea7b6ce20aae025183109f)
2007-10-10r889: convert samba4 to use [u]int16_t instead of [u]int16Stefan Metzmacher1-1/+1
metze (This used to be commit af6f1f8a01bebbecd99bc8c066519e89966e65e3)
2007-10-10r884: convert samba4 to use [u]int32_t instead of [u]int32Stefan Metzmacher1-5/+5
metze (This used to be commit 0e5517d937a2eb7cf707991d1c7498c1ab456095)
2007-10-10r879: fixed a typo in the password fetch wrapperAndrew Tridgell1-1/+1
(This used to be commit c75b763f41cb6d9dde9497c4b7443fe89ab5d256)
2007-10-10r873: converted samba4 to use real 64 bit integers instead ofAndrew Tridgell1-27/+78
structures. This was suggested by metze recently. I checked on the build farm and all the machines we have support 64 bit ints, and support the LL suffix for 64 bit constants. I suspect some won't support strtoll() and related functions, so we will probably need replacements for those. (This used to be commit 9a9244a1c66654c12abe4379661cba83a73c4c21)
2007-10-10r839: password set/change in the samr server is complex enough that itAndrew Tridgell1-222/+0
deserves its own C module (This used to be commit 2ba7ff824c32b3db037263ddcff9c876293ea284)
2007-10-10r812: added a new samdb_replace() call that simplifies the code in the main ↵Andrew Tridgell1-1/+19
samr server a bit. (This used to be commit 255d6e77e705bb7a94e6738c9f48f9d8c625883c)
2007-10-10r793: - don't make templates members of any class that would make them showAndrew Tridgell1-0/+27
up in searches like "objectclass=user" - auto-add the computer objectclass for computer accounts on create - added two types of password change call in samr server - reset last_fault_code before each dcerpc call (This used to be commit c1a65f83f6a4c51e60efd204dab89c20cda65d2b)
2007-10-10r754: Implement the SetPassword operation on the netlogon pipe.Andrew Bartlett1-38/+64
This involves allowing the password set code in samdb to take an already hashed password, and some fixes to our torture code. Andrew Bartlett (This used to be commit f9f581b5804a20785df06cde157b23c952edc2ce)
2007-10-10r743: Start on a NETLOGON server in Samba4.Andrew Bartlett1-83/+119
Currently this only authentiates the machine, not real users. As a consequence of running the Samba4 NETLOGON test against Samba4, I found a number of issues in the SAMR server, which I have addressed. There are more templates in the provison.ldif for this reason. I also added some debug to our credentials code, and fixed some bugs in the auth_sam module. The static buffer in generate_random_string() bit me badly, so I removed it in favor of a talloc based system. Andrew Bartlett (This used to be commit 94624e519b66def97758b8a48a01ffe9029176f0)
2007-10-10r625: - handle passwords longer than length 14 (thanks to abartlet for ↵Andrew Tridgell1-41/+76
pointing out the bug) - delete unicodePwd if not storing a plaintext password (This used to be commit 6c3f22a685c55f183f4e0e4303e3d9990f4b39b5)
2007-10-10r623: setUserInfo level 24 (password set) now works in the SAMR server. This ↵Andrew Tridgell1-0/+270
includes all of the password complexity, password history and other password restrictions. (This used to be commit cb070b9084d95cf5178edbef951b75eab62b7220)
2007-10-10r608: - a couple of very minor fixes to the CreateGroup codeAndrew Tridgell1-5/+29
- added samr_GetUserPwInfo() samr server call (This used to be commit 0250f5d6aaf4f9325ace707c69f5e24bcd7a0ed9)
2007-10-10r605: Implement CreateDomainGroup, essentially cut&paste from CreateUser2.Volker Lendecke1-0/+4
Volker (This used to be commit 59241c0c9aa2d64d66eb04e81aa5500681604061)
2007-10-10r601: added the server code for all the samr_SetUserInfo and ↵Andrew Tridgell1-3/+132
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 ec0a51898f543578e755207d81ed5c1524861c64)
2007-10-10r596: log all ldb searches at level 4 in samdbAndrew Tridgell1-0/+2
(This used to be commit defaf0d817a7c207da59692245aa65bc30c9bd19)
2007-10-10r587: added server code for samr_EnumDomainUsers, and started addingAndrew Tridgell1-1/+49
samr_SetUserInfo and samr_QueryUserInfo (This used to be commit e0db9659a85b59e52fbe033a94b411d6c64d9f9c)
2007-10-10r578: initial server side implementation of samr_CreateUser(),Andrew Tridgell1-43/+259
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 10b6e0011b5952c98432dc2d4b2058ac89a9cc2d)
2007-10-10r514: added a context pointer to the samdb interface, as suggested byAndrew Tridgell1-34/+62
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 b1cd98188d6f1f8236f5dbc7a3605a39ae27fb73)
2007-10-10r513: added a generic ldb debug system to allow the Samba debug functions toAndrew Tridgell1-0/+17
be cleanly interfaced to ldb (This used to be commit 74b89d5f960d6b936751e3f057b4540eb80b79cd)
2007-10-10r510: converted the samdb code to give ldb a talloc context rather than ↵Andrew Tridgell1-19/+31
letting ldb use malloc (This used to be commit a3edd4bca8769cd804a5908286c7a18ca5c8fa00)
2007-10-10r466: implemented samr_OpenDomain() and samr_GetDomPwInfo() server side callsAndrew Tridgell1-6/+21
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 bba0044a514cf86cbcf14bc82dd6c49808c22dab)
2007-10-10r458: this is the (very primitive) beginnings of a SAMR server forAndrew Tridgell1-0/+189
Samba4. I'm committing this now so I can get comments on the approach. Note that you need to do something like this to initialise the SAM db: edit script/provision.pl script/provision.pl > provision.ldif.out bin/ldbadd /path/to/private/sam.ldb provision.ldif.out (This used to be commit e2002e40a5abe0cd33a2056b1da8ba5732f9021f)