summaryrefslogtreecommitdiffstats
path: root/source/passdb
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* more const cleanupsAndrew Tridgell2002-09-171-3/+3
|
* Set default ACB attributes on 'unixsam' accounts. This means that machineAndrew Bartlett2002-09-041-0/+9
| | | | | | | accounts added first to /etc/passwd will be honered correctly. Also, users 'upgraded' to smbpasswd will have the right flags. Andrew Bartlett
* small fixesJelmer Vernooij2002-08-291-1/+1
| | | | make lp_sam_backend() a list
* RTLD_GLOBAL is not necessaryJelmer Vernooij2002-08-291-1/+1
|
* Put in intermediate version of new SAM system. It's not stable yet, codeJelmer Vernooij2002-08-281-219/+0
| | | | | | | | | might be ugly, etc - please don't blame me for anything but instead try to fix the code :-). Compiling of the new sam system can be enabled with the configure option --with-sam Removing passdb/passgrp.c as it's unused fix typo in utils/testparm.c
* More hacks for 'guest account' to get it to show up with the right rid...Andrew Bartlett2002-08-211-1/+12
| | | | Andrew Bartlett
* Replaced reference to global_myworkgroup by calls to lp_workgroup().Volker Lendecke2002-08-211-6/+5
| | | | | | | pdbedit failed to initialize global_myworkgroup, wo we could end up having a SID for SECRETS/SID/ in secrets.tdb. Volker
* Add changes suggested by abartlet:Jelmer Vernooij2002-08-211-1124/+1205
| | | | | | - don't use lp_passwd_file() to retrieve NIS domain name, but use location instead - some cleanups
* Use the 'init' flag to determine if the UID is set, rather than testing theAndrew Bartlett2002-08-211-2/+5
| | | | | | uid for -1. Andrew Bartlett
* pdb_nisplus converted to the new passdb system API'sJelmer Vernooij2002-08-202-559/+586
|
* Quick hack to get around the inadequacy of pdb_smbpasswd. This should make theAndrew Bartlett2002-08-171-1/+1
| | | | | | build farm happy again, and allow the 'guest account' to be added to smbpasswd. Andrew Bartlett
* Rework the 'guest account get's RID 501' code again...Andrew Bartlett2002-08-172-46/+57
| | | | | | | | | | This moves it right into the passdb subsystem, where we can do this in just one (or 2) places. Due to the fact that this code can be in a tight loop, I've had to make 'guest account' a 'const' paramater, where % macros cannot be used. In any case, if the 'guest account' varies, we are in for some nasty cases in the other code, so it's useful anyway. Andrew Bartlett
* Make the 'guest account' always have a RID of DOMAIN_USER_RID_GUEST.Andrew Bartlett2002-08-161-6/+20
| | | | Andrew Bartlett
* Update secrets_fetch_domain_guid to generate and store it if it doesn't exist.Jim McDonough2002-08-121-2/+11
| | | | Only does it for PDCs.
* Add const to a pile of const to *DOM_SID paramaters.Andrew Bartlett2002-08-075-7/+7
| | | | Andrew Bartlett
* Try to bind with LDAPv3 if possible.Andrew Bartlett2002-08-061-7/+19
| | | | Andrew Bartlett
* I must have missed this when I was adding 'const' to these earlier...Andrew Bartlett2002-08-051-1/+1
| | | | Andrew Bartlett
* Try to make this easier to debug - display the username that failed.Andrew Bartlett2002-08-051-1/+1
| | | | Andrew Bartlett
* Don't accidenity mess with the wrong domain's sids.Andrew Bartlett2002-07-311-2/+2
|
* fixed multi-line strings for portabilityAndrew Tridgell2002-07-311-2/+2
|
* Add LSA RPC 0x2E, lsa_query_info2. Only level implemented is 0x0c, whichJim McDonough2002-07-301-0/+32
| | | | | is netbios and dns domain info. Also add code to set/fetch the domain GUID from secrets.tdb (although set is not yet called by anyone).
* Update a pile of Samba's SID lookup code to ensure:Andrew Bartlett2002-07-301-40/+53
| | | | | | | | | | | | | | | - That we never call winbind recursivly - That we never use an 'algorithmic' RID when we have a fixed uid or gid mapping in either the passdb or the group mapping db. Also, remove restrictions that say 'this domain only'. If we have a mapping configured, allow it to be returned. If we later decide certian mappings are invalid, then we sould put that in the code that actually does the map. Allow 'sid->name' transtations on the fixed 'well known' groups for NT, even if they are not represented by Unix groups yet. Andrew Bartlett
* These are not critical errors, they should not be a level 0.Andrew Bartlett2002-07-301-3/+3
| | | | Andrew Bartlett
* found nasty bug in intl/lang_tdb.c tdb structure was not tested to not be ↵Simo Sorce2002-07-281-1/+1
| | | | | | | | | | | | null before close this one fixes swat not working with browsers that set more then one language. along the way implemented language priority in web/neg_lang.c with bubble sort also changet str_list_make to be able to use a different separator string Simo.
* Update the rebind code in pdb_ldap.Andrew Bartlett2002-07-271-34/+114
| | | | | | | | | | I've still not tested this, but I didn't test the last lot and I'm pretty sure I stuffed it up - but at least this rebind procedure matches the function prototype. It should also be fine on OpenLDAP 2.1 if I'm lucky. Andrew Bartlett
* fix parameters for ldap_set_rebind_proc() from OpenLDAP 2.1Gerald Carter2002-07-261-2/+7
|
* (another patch from mimir)Andrew Bartlett2002-07-261-2/+17
| | | | | | | | Add some debugging info to the secrets code. We might review what debug level that should be at, but it's fine for now. Andrew Bartlett
* Mimir has been busy with patches again, and sent in the followingAndrew Bartlett2002-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | patches: Andrew Bartlett From his e-mail: Below I attach the following patches as a result of my work on trusted domains support: 1) srv_samr_nt.c.diff This fixes a bug which caused to return null string as the first entry of enumerated accounts list (no matter what entry, it was always null string and rid) and possibly spoiled further names, depeding on their length. I found that while testing my 'net rpc trustdom list' against nt servers and samba server. 2) libsmb.diff Now, fallback to anonymous connection works correctly. 3) smbpasswd.c.diff Just a little fix which actually allows one to create a trusting domain account using smbpasswd 4) typos.diff As the name suggests, it's just a few typos fix :)
* Clarify this comment.Andrew Bartlett2002-07-261-0/+3
|
* Actually check the return value of the account_policy_get() call.Andrew Bartlett2002-07-241-5/+4
| | | | Andrew Bartlett
* Name get and set dir drive functions consistently.Tim Potter2002-07-214-10/+11
|
* More cleanups, and add a comment/hint not to clean somthing up in future :-)Andrew Bartlett2002-07-211-0/+3
| | | | Andrew Bartlett
* More fixes towards warnings on the IRIX compilerAndrew Bartlett2002-07-201-1/+1
| | | | | | | | | | | | (and yes, some of these are real bugs) In particular, the samr code was doing an &foo of various types, to a function that assumed uint32. If time_t isn't 32 bits long, that broke. They are assignment compatible however, so use that and an intermediate variable. Andrew Bartlett
* addedd new (t)alloc_sub_* functionsSimo Sorce2002-07-143-13/+13
| | | | | they will get a const string and return a (t)alloced epanded one. also modified passdb/* stuff to use this one.
* Fix up a botched prevoius commit.Andrew Bartlett2002-07-141-11/+10
| | | | | | | | | | | | | | The idea here is to allow invalid LM passwords in otherwise valid accounts. This happens when we create an account without a password, for example. Previously we would stop at the LM password, and not read things like the account flags correctly. Now we process the record, and just set the password to NULL. (Note, 'no password for access' is decided only on the basis of the Account Control bits, not on the 'NULL' value of the password feild.). Andrew Bartlett
* Make smbpasswd behave like all the other backends, where a NULL or invalidAndrew Bartlett2002-07-131-7/+4
| | | | | | | LM password isn't anything special. All the users check the ACB nowadays, and this allows us to correctly return flags set via usermgr. Andrew Bartlett
* If we get a SID from group mapping, no need to check it's prefix.Andrew Bartlett2002-07-101-6/+6
| | | | | | Just set it directly. Andrew Bartlett
* Fix debug comment.Andrew Bartlett2002-07-051-1/+1
|