summaryrefslogtreecommitdiffstats
path: root/source/passdb/passdb.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused function is_trusted_domain_situation().Michael Adam2008-05-261-6/+0
| | | | | | | This combined check has been replaced by is_dc_trusted_domain_situation() which does not check for lp_allow_trusted_domains(). Michael
* passdb: check for is_dc_trusted_domain_situation() in get_trust_pw_hash().Michael Adam2008-05-261-1/+1
| | | | | | | Before fetching legacy password hash, check for trusted domain situation, but also fail if trusted domain support is not enabled. Michael
* passdb: add comment explaining logic in get_trust_pw_clear().Michael Adam2008-05-261-2/+16
| | | | Michael
* passdb: in get_trust_pw_clear() correctly fail if trusted domains not supportedMichael Adam2008-05-261-1/+5
| | | | | | | | | (but trusted domain situation was found) This completes the fix for bugs #5425 and #5451 by Steven Dannemann, in that now no special cases are left uncovered. Michael
* Add function is_dc_trusted_domain_situation().Michael Adam2008-05-261-3/+7
| | | | | | | This is like is_trusted_domain_situation() except that it does not check for lp_allow_trusted_domains(). Michael
* Manually port Steven Dannenman fix for using the correct machine domain whenGerald W. Carter2008-05-231-3/+3
| | | | | | | | | | | looking up trust credentials in our tdb. commit fd0ae47046d37ec8297396a2733209c4d999ea91 Author: Steven Danneman <sdanneman@isilon.com> Date: Thu May 8 13:34:49 2008 -0700 Use machine account and machine password from our domain when contacting trusted domains.
* Use netr_SamInfo3 in remaining places.Günther Deschner2008-02-171-1/+1
| | | | Guenther
* Add get_logon_hours_from_pdb() (inspired by samba4).Günther Deschner2008-02-121-0/+23
| | | | Guenther
* Remove a staticVolker Lendecke2008-02-041-4/+1
| | | | | I very much doubt that this is called enough to justify a global. If this turns out to be a hot code path, we might reconsider :-)
* Prevent another segfault.Michael Adam2007-12-181-1/+3
| | | | Michael
* Replace sid_string_static by sid_string_dbg in DEBUGsVolker Lendecke2007-12-151-3/+2
|
* Pass NULL instead of unneeded &sid: pdb_get_trusteddom_pw() checks.Michael Adam2007-12-131-2/+1
| | | | Michael
* Rename get_trust_pw() to get_trust_pw_hash().Michael Adam2007-12-131-2/+2
| | | | Michael
* Export logic of get_trust_pw() to new function get_trust_pw_clear().Michael Adam2007-12-131-16/+58
| | | | | | | | | get_trust_pw() just now computes the md4 hash of the result of get_trust_pw_clear() if that was successful. As a last resort, in the non-trusted-domain-situation, get_trust_pw() now tries to directly obtain the hashed version of the password out of secrets.tdb. Michael
* Let get_trust_pw() determine the machine_account_name to use.Michael Adam2007-12-131-2/+14
| | | | | | | | | | | | | | | | | Up to now each caller used its own logic. This eliminates code paths where there was a special treatment of the following situation: the domain given is not our workgroup (i.e. our own domain) and we are not a DC (i.e. it is not a typical trusted domain situation). In situation the given domain name was previously used as the machine account name, resulting in an account name of DOMAIN\\DOMAIN$, which does not seem very reasonable to me. get_trust_pw would not have obtained a password in this situation anyways. I hope I have not missed an important point here! Michael
* Remove pstrings from pam_smbpass - make local_password_changeJeremy Allison2007-11-211-25/+26
| | | | | return malloced strings. Jeremy.
* More pstring elimination.Jeremy Allison2007-11-201-13/+13
| | | | Jeremy.
* Remove smbldap_get_single_pstring() and all pstringsJeremy Allison2007-11-141-1/+1
| | | | | | from pdb_ldap.c. I don't have an LDAP passdb setup here, so I'm going to need some help on testing this. Jeremy.
* static pstring removalVolker Lendecke2007-11-051-2/+5
|
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-21/+21
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r24990: Kill an incredible amount of trailing whitespaces...Michael Adam2007-10-101-8/+10
| | | | | | Further reformat get_trust_pw to conform to coding rules. Michael
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r23192: Remove fallback to looking up group mappings by theGerald Carter2007-10-101-17/+1
| | | | Unix name after discussion with Simo.
* r23005: If we're running on a system where time_t is 8 bytesJeremy Allison2007-10-101-16/+16
| | | | | | | | we have to take care to preserve the "special" values for Windows of 0x80000000 and 0x7FFFFFFF when casting between time_t and uint32. Add conversion functions (and use them). Jeremy.
* r22096: become_root_uid_only() is unneeded - it's only used inJeremy Allison2007-10-101-4/+4
| | | | | | messages.c. Refactor to use become_root() instead and make it local to messages.c Jeremy.
* r22009: change TDB_DATA from char * to unsigned char *Stefan Metzmacher2007-10-101-2/+2
| | | | | | and fix all compiler warnings in the users metze
* r21954: Someone misused a '!' instead of a '~' for a binary NOTJeremy Allison2007-10-101-1/+1
| | | | | command. Jerry, Simo, please check. Jeremy.
* r20985: leave room for terminating NULL when printing password hashes via ↵Gerald Carter2007-10-101-2/+2
| | | | 'pdbedit -L -w'
* r20851: To read account policies from LDAP we need root.Volker Lendecke2007-10-101-2/+12
| | | | Volker
* r20824: Send access to the trusted domain passwords through the pdb backend, ↵Volker Lendecke2007-10-101-0/+43
| | | | | | | | | | so that in the next step we can store them in LDAP to be replicated across DCs. Thanks to Michael Adam <ma@sernet.de> Volker
* r20614: Dummy-checkin to trigger the buildVolker Lendecke2007-10-101-4/+5
|
* r20243: Make lookup_name resolve both the mapped and the real unix group nameSimo Sorce2007-10-101-7/+23
|
* r19058: Implement "user cannot change password", and complete "user must changeJim McDonough2007-10-101-1/+1
| | | | | | | | | | | | password at next logon" code. The "password last set time" of zero now means "user must change password", because that's how windows seems to use it. The "can change" and "must change" times are now calculated based on the "last set" time and policies. We use the "can change" field now to indicate that a user cannot change a password by putting MAX_TIME_T in it (so long as "last set" time isn't zero). Based on this, we set the password-can-change bit in the faked secdesc.
* r18271: Big change:Gerald Carter2007-10-101-1/+1
| | | | | | | | | | | * autogenerate lsa ndr code * rename 'enum SID_NAME_USE' to 'enum lsa_SidType' * merge a log more security descriptor functions from gen_ndr/ndr_security.c in SAMBA_4_0 The most embarassing thing is the "#define strlen_m strlen" We need a real implementation in SAMBA_3_0 which I'll work on after this code is in.
* r17924: Get rid of warnings now that talloc is merged.Volker Lendecke2007-10-101-3/+1
| | | | | | Destructors now take a pointer to the "real" destroyed object as an argument. Volker
* r17815: Revert Volker's change in 16014. I really do not believeGerald Carter2007-10-101-1/+0
| | | | | | | | | the this should be necessary. If there is still a bug, I believe that setting thr group RID from the passdb is masking it. Not fixing it. It is very likely that the change was necessary before but is no longer with the recent changes. But I'm not taking the chance of merging it to 3.0.23c. :-)
* r17813: Remove another instance of manually setting the group SID.Gerald Carter2007-10-101-1/+7
| | | | | | | | | | | | | The would have been primaryly used when adding a user to an smbpasswd file, but could have been introduce to other backends by using pdbedit -i -e. The symptom was [2006/08/09 13:07:43, 0] rpc_parse/parse_samr.c:init_sam_user_info21A(6276) init_sam_user_info_21A: User nobody has Primary Group SID S-1-22-2-99, which conflicts with the domain sid S-1-5-21-1825997848-4107600307-1754506280. Failing operation.
* r17669: Remove RID algorithm support from unmapped users and groupsGerald Carter2007-10-101-1/+1
| | | | when using smbpasswd
* r17554: CleanupVolker Lendecke2007-10-101-1/+1
|
* r17463: A bit of cleanup work:Volker Lendecke2007-10-101-1/+1
| | | | | | | | | | | | Remove some unused code: pdb_find_alias is not used anymore, and nobody I think has ever used the pdb_nop operations for group mapping. smbpasswd and tdb use the default ones and ldap has its own. Make the functions pdb_getgr* return NTSTATUS instead of BOOL. Nobody right now really makes use of it, but it feels wrong to throw away information so early. Volker
* r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison2007-10-101-9/+11
| | | | | | | to do the upper layer directories but this is what everyone is waiting for.... Jeremy.
* r16593: Make the invarient explicit to Klocwork. Bug #2023.Jeremy Allison2007-10-101-0/+1
| | | | Jeremy.
* r16241: Fix Klocwork #106 and others like it.Jeremy Allison2007-10-101-25/+16
| | | | | | | | | | | | | | Make 2 important changes. pdb_get_methods() returning NULL is a *fatal* error. Don't try and cope with it just call smb_panic. This removes a *lot* of pointless "if (!pdb)" handling code. Secondly, ensure that if samu_init() fails we *always* back out of a function. That way we are never in a situation where the pdb_XXX() functions need to start with a "if (sampass)" test - this was just bad design, not defensive programming. Jeremy.
* r16014: Correctly set the group RID in init_sam_from_buffer.Volker Lendecke2007-10-101-0/+1
| | | | | | BIG THANKS to Tom Bork for reporting that Bug! Volker
* r15601: Fix segfaults with 'security=share' and 'guest only = yes'Volker Lendecke2007-10-101-0/+3
| | | | Volker
* r14457: Add a few more special cases for RID 513 in the samr code.Gerald Carter2007-10-101-0/+12
| | | | | | Now that I know what all the requirements for this group are I can generalize the code some more and make it cleaner. But at least this is working with lusrmgr.msc on XP and 2k now.
* r13776: Merge in the editposix ldapsam optimizationSimo Sorce2007-10-101-1/+1
|
* r13711: * Correctly handle acb_info/acct_flags as uint32 not as uint16.Günther Deschner2007-10-101-24/+25
| | | | | | | | * Fix a couple of related parsing issues. * in the info3 reply in a samlogon, return the ACB-flags (instead of returning zero) Guenther
* r13679: Commiting the rm_primary_group.patch posted on samba-technicalGerald Carter2007-10-101-251/+125
| | | | | | | | | | * ignore the primary group SID attribute from struct samu* * generate the primary group SID strictlky from the Unix primary group when dealing with passdb users * Fix memory leak in original patch caused by failing to free a talloc * * add wrapper around samu_set_unix() to prevent exposing the create BOOL to callers. Wrappers are samu_set_unix() and samu-allic_rid_unix()