summaryrefslogtreecommitdiffstats
path: root/source/passdb
Commit message (Collapse)AuthorAgeFilesLines
...
* fixed a number of places where we can try to free a wild pointer orAndrew Tridgell2002-11-201-2/+14
| | | | | look for the record count after an invalid search. This fixes a segv in ldapsam
* Use smb_register_passdb() - plus some small fixesJelmer Vernooij2002-11-153-1603/+0
|
* Add smb_register_passdb()Jelmer Vernooij2002-11-152-86/+59
|
* Remove the #ifdef's for NISPLUS_SAM - there are no function name collisions ↵Jelmer Vernooij2002-11-141-4/+0
| | | | anymore
* Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison2002-11-125-25/+19
| | | | | | dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy.
* More improvement of DEBUG outputJelmer Vernooij2002-11-111-2/+5
|
* Add extra debug infoJelmer Vernooij2002-11-111-2/+2
|
* Print the number of returned rows, not the number of fieldsJelmer Vernooij2002-11-101-2/+2
|
* Make smbpasswd use the group mapping, and fix spelling in ldapsam.Andrew Bartlett2002-11-082-30/+38
| | | | | | This gets user mangler for doamins working again. Andrew Bartlett
* Fix small typoJelmer Vernooij2002-11-071-1/+1
|
* when doing a 'net rpc vampire' a pdb_init_sam_pw() is used to create aAndrew Tridgell2002-11-071-0/+3
| | | | | | | | | | sam account object, then pdb_update_sam_account() can be used to update an account. This code path could lead to the methods element of the account being used when uninitialised (leading to a segv) Easiest fix is to always make that that when creating a sam_account object we initialise the methods to null, so that the passdb code knows that it needs to be filled in.
* Merge of scalable printing code fix... Needs testing.Jeremy Allison2002-11-071-6/+9
| | | | | | | Also tidied up some of Richard's code (I don't think he uses the compiler flags -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual like I do :-) :-). Jeremy.
* Add group management support (patch from metze)Jelmer Vernooij2002-11-062-0/+67
|
* Adapt to latest pdb API changes - only thing left is group supportJelmer Vernooij2002-11-062-21/+17
|
* pdb_get_unknown? -> pdb_get_unknown_?Jelmer Vernooij2002-11-061-3/+3
|
* Move pdb_xml to source/Jelmer Vernooij2002-11-051-0/+561
|
* Move pdb_mysql to source/passdbJelmer Vernooij2002-11-051-0/+975
|
* Allow 'normal' accounts in the non-unix-account range for smbpasswd - I hopeAndrew Bartlett2002-11-041-19/+20
| | | | | this will fix some of the problems on the build farm @ Compaq (where they have a *lot* of accounts...).
* Fix debugAndrew Bartlett2002-11-041-1/+1
|
* Extra little fix to vl's patch. Make sure the passdb and testparm messagesAndrew Bartlett2002-11-031-3/+5
| | | | | | | say exactly the same thing - in particular that we can algorithmic rid base == 1000, and use the BASE_RID macro to avoid the use of magic numbers. Andrew Bartlett
* Force algorithmic rid base to sane values and talk about it.Volker Lendecke2002-11-031-4/+25
| | | | Volker
* Clean up this a little - add comments describing a bit of what is going onAndrew Bartlett2002-11-021-5/+6
| | | | here.
* Add a 'ldap trust ids' option that lets pdb_ldap check for posixAccountAndrew Bartlett2002-11-021-33/+92
| | | | | | | | | | | | | attributes rather than calling getpwnam() on the user. This should help fix some of metze's performance issues - particularly on enumerations. There is a consequential change to the operation of 'non unix account's in LDAP - they are no longer restricted to being 'within' the NUA range, but will always be added to that range. Finally, there is the doco for this and the previous LDAP SSL changes.
* Return the result code, not false (0 == success) on error...Andrew Bartlett2002-11-021-1/+1
|
* Fixes for pdb_ldap:Andrew Bartlett2002-11-021-111/+103
| | | | | | | | | | | | | - Default is now for start-tls, on the ldap (not ldaps) port - We check for 'I am currently root' in the right place now, and don't accidentily use a cached connection. - We don't loop on failure to be root, or some other errors. - A bit cleaner error reporting for add/modify. - Both the OpenLDAP and manual URI parsing tested. Andrew Bartlett
* One more step towards to better PDC.Andrew Bartlett2002-10-261-208/+330
| | | | | | | | | | | | | | | | | | | | This patch, from "Stefan (metze) Metzmacher" <metze@metzemix.de> implements an LDAP connection cache. This removes the quite silly situation where every single passdb operation involved a new LDAP connection. The hope is that this will give us a decent performance boost in some usrmgr related activities, and in the sid->name/sid->uid code. The remaining things I think are 'todo' for pdb_ldap (in the near term) are: - intergrate volker's next_rid patch for NUA accounts, - add a 'trust ldap ids' option (remove Get_Pwnam() hit on enumerations). - put the group mapping actually into ldap - Schema fixes and do utf8 conversion - server failover (try a second server for the rebind on fail) - ensure we block between an 'add' and the ldap master replicating to our local slave (mezte found this issue, kills domain joins) Andrew Bartlett
* Fix memory leak (patch by Steve Langasek)Jelmer Vernooij2002-10-251-0/+14
|
* Only run free_private_data when it's specified (reported by Steve Langasek ↵Jelmer Vernooij2002-10-251-1/+2
| | | | aka vorlon)
* pdb_unix.c did not really expect group RIDs dictated by a PDC and lookingVolker Lendecke2002-10-211-2/+4
| | | | | | like user RIDs. Volker
* This moves the group mapping API into the passdb backend.Volker Lendecke2002-10-217-11/+453
| | | | | | | | | | | | Currently this calls back to mapping.c, but we have the framework to get the information into LDAP and the passdb.tdb (should we? I think so..). This has received moderate testing with net rpc vampire and usrmgr. I found the add_groupmem segfault in add_aliasmem as well, but that will be another checkin. Volker
* Start to merge the new ACL mapping code from Andreas Gruenbacher ↵Jeremy Allison2002-10-181-10/+38
| | | | | | <agruen@suse.de>. Jeremy.
* Revert changesVolker Lendecke2002-10-171-1/+1
|
* Revert changesVolker Lendecke2002-10-171-24/+22
|
* No functional change. I'm trying to understand pdb_ldap.c andVolker Lendecke2002-10-161-22/+24
| | | | | | found an unecessary parameter to ldapsam_search_one_user. Volker
* Create group mappings on the fly.Volker Lendecke2002-10-161-1/+1
| | | | Volker
* Nice *big* patch from metze.Andrew Bartlett2002-10-127-370/+465
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The actual design change is relitivly small however: It all goes back to jerry's 'BOOL store', added to many of the elements in a SAM_ACCOUNT. This ensured that smb.conf defaults did not get 'fixed' into ldap. This was a great win for admins, and this patch follows in the same way. This patch extends the concept - we don't store values back into LDAP unless they have been changed. So if we read a value, but don't update it, or we read a value, find it's not there and use a default, we will not update ldap with that value. This reduced clutter in our LDAP DB, and makes it easier to change defaults later on. Metze's particular problem was that when we 'write back' an unchanged value, we would clear any muliple values in that feild. Now he can still have his mulitivalued 'uid' feild, without Samba changing it for *every* other operation. This also applies to many other attributes, and helps to eliminate a nasty race condition. (Time between get and set) This patch is big, and needs more testing, but metze has tested usrmgr, and I've fixed some pdbedit bugs, and tested domain joins, so it isn't compleatly flawed ;-). The same system will be introduced into the SAM code shortly, but this fixes bugs that people were coming across in production uses of Samba 3.0/HEAD, hence it's inclusion here. Andrew Bartlett
* We already set LDAPv3 at connect time, no need to set it again.Andrew Bartlett2002-10-121-8/+0
|
* Add a timeout to tdb_lock_bystring(). Ensure we never have more thanJeremy Allison2002-10-041-49/+11
| | | | | MAX_PRINT_JOBS in a queue. Jeremy.
* Add const.Andrew Bartlett2002-09-281-1/+1
|
* Minor updates:Andrew Bartlett2002-09-271-4/+4
| | | | | | | | | | Add const to some more functions, and reintroduce 'net rpc join oldstyle' as *only* trying an old-style join. This means that we can rely on it not prompting for a password on the build farm. Andrew Bartlett
* Readd the 2.2 --with-ldapsam paramaters so as to allow a smooth upgrade path toAndrew Bartlett2002-09-271-4/+19
| | | | | | | | a 3.0 based PDC. Change defaults to use SSL, so that this also matches. Andrew Bartlett
* Patch from "Stefan (metze) Metzmacher" <metze@metzemix.de> to do a *much*Andrew Bartlett2002-09-261-1/+1
| | | | | | | | | | | | better job of working with usrmgr. Previously we were blanking out entires, and all sort of mischif. The new patch (which I've now had a chance to test/modify) also takes care not to expand % values (ie we go \\%L\%U -> \\server\user, we don't want to store \\server\user back) and to correctly notice 'not set' compared to 'null string' etc. Andrew Bartlett
* move all the passdb internal interface to NTSTATUSSimo Sorce2002-09-266-256/+307
| | | | | | | | | only the interface has been fully moved to NTSTATUS not all the plugins make full use of it, but have been all converted. My testings passed completely, however a bit of more testing is welcome Simo.
* Make it clear what this if statement applies to, and what it doesn'tAndrew Bartlett2002-09-251-0/+1
|
* Whenever we deal with adding machine/trusted domain accounts, always reset theAndrew Bartlett2002-09-251-20/+23
| | | | | | | flag to what we expect. This handles the 'upgrade' from unixsam beter (where all $ terminated accounts are machines). Andrew Bartlett
* Don't crash when a backend doesn't have a setsampwent function available - ↵Jelmer Vernooij2002-09-251-2/+2
| | | | bug reported by metze
* This patch from "Stefan (metze) Metzmacher" <metze@metzemix.de> cleans upAndrew Bartlett2002-09-253-123/+204
| | | | | | | | | | | | | | | | | | pdb_ldap and adds a 'ldap passwd sync' option. The idea with this option is to do allow an ldap backend to do all the fancy password hashing etc - and to tell smbd no to try and double-up. Using 'ldap passwd sync = only' will do this, but is not recommended unless such a backend is in place... Running 'ldap passwd sync = yes' just gets you the same as doing 'pam passwd sync = yes' and having both PAM and pam_ldap correctly configured for 'magic root' behaviour, but only using ldap connection, and one set of credentials. This also gets us closer to allowing ldap to say 'password too short' etc, which might assist in maintaining a consistant password policy. Andrew Bartlett
* If adding a user to ldap, make sure we have the 'account' structural class, orAndrew Bartlett2002-09-251-0/+1
| | | | else we can't add to OpenLDAP 2.1
* We had a race condition when changing a machine acount password as weJeremy Allison2002-09-181-1/+21
| | | | | were no longer locking the secrets entry. I saw this on a live system. Jeremy.
* Never, *ever* hold a mutex lock in the message database where there mayJeremy Allison2002-09-171-0/+66
| | | | | | | be traversals being attempted. Yes, this was from bitter experience (and an out of control server :-). Also allow callers to break out of a tdb_chainlock with sigalarm if desired. Jeremy.