summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_get_set.c
AgeCommit message (Collapse)AuthorFilesLines
2011-11-29s3-passdb: make pdb_password_change_time_max static.Günther Deschner1-1/+1
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Nov 29 15:16:51 CET 2011 on sn-devel-104
2011-11-16Fix bug #8561 - Password change settings not fully observed.Jeremy Allison1-4/+34
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Nov 16 00:22:41 CET 2011 on sn-devel-104
2011-10-14s3-passdb: remove fstring from pdb_set_user_sid_from_string().Günther Deschner1-1/+1
Guenther
2011-08-13s3-passdb Make pdb_element_is_changed available to all passdb modulesAndrew Bartlett1-0/+23
This will allow pdb_samba4 to use this Andrew Bartlett
2011-07-08lib/util Move bitmap.c to lib/utilAndrew Bartlett1-0/+1
2011-06-09s3-talloc Change TALLOC_P() to talloc()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
2011-05-24Fix bug #7054 - X account flag does not work when pwdlastset is 0.Jeremy Allison1-2/+1
Don't allow pass_last_set_time to be set to zero (which means "user must change password on next logon") if user object doesn't allow password change. Don't automatically allow user object password change if "user must change password on next logon" is set. Jim please check. Jeremy.
2011-03-30s3-passdb: add passdb.h where needed.Günther Deschner1-0/+1
Guenther
2011-02-19s3: Add "len" to pdb_set_hoursVolker Lendecke1-3/+8
2011-02-15s3: Add "code_page" to struct samuVolker Lendecke1-0/+12
2011-02-15s3: Add "country_code" to struct samuVolker Lendecke1-0/+12
2010-10-12libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett1-1/+1
This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-09-20s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.Günther Deschner1-1/+2
Guenther
2010-06-07s3:passdb Export function to calculate the proper primary group sidSimo Sorce1-86/+8
Don't keep it buried in passdb, this function need to be available for use in places where we do not want to construct an artificial samu struct just to play tricks. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-05-29s3:passdb Fix memory leakSimo Sorce1-0/+1
We were allocating this passwd structure on sampass, but never freeing it nor assigning it to unix_pw where it could be reused.
2010-05-21s3:dom_sid Global replace of DOM_SID with struct dom_sidAndrew Bartlett1-11/+11
This matches the structure that new code is being written to, and removes one more of the old-style named structures, and the need to know that is is just an alias for struct dom_sid. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21s3:passdb Remove use of uint8 uint16 and uint32 in favour of C99 typesAndrew Bartlett1-20/+20
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18s3-rpc_misc: clean out include/rpc_misc.h.Günther Deschner1-2/+2
Well known rids don't really belong into an rpc header, just use the ones defined in security.idl. Guenther
2010-03-25s3:passdb: avoid sid_to_gid() if the sid is "domain users"Stefan Metzmacher1-3/+7
If the call fails we would use the "domain users" sid anyway. metze
2010-02-09s3:passdb: only use gid_to_sid() result if the result is a group of our ↵Stefan Metzmacher1-4/+16
local sam Otherwise retry with pdb_gid_to_sid(). metze
2010-02-08s3:passdb: speed up pdb_get_group_sid()Stefan Metzmacher1-5/+28
Use the cached version gid_to_sid() instead of pdb_gid_to_sid(). And also avoid the expensive lookup_sid() call for wellkown domain groups. metze
2010-02-05s3: Hide some uses of pdb_get_init_flags (which I would love to remove...)Volker Lendecke1-1/+1
2010-02-04s3:passdb: fix a type Domain Users has RID -513Stefan Metzmacher1-1/+1
metze
2010-01-10s3: Replace most calls to sid_append_rid() by sid_compose()Volker Lendecke1-4/+3
2010-01-07s3:passdb: store the plain nt passwords hashes in history, not salted md5Michael Adam1-5/+10
This is in order to be able to do challenge response with the history, so that this can be checked when an invalid password was entered: If the given password is wrong but in the history, then the bad password count should not be updated... The "lucky" bit here is that the md5 has and the nt hash (md4) both are 16 bytes long. This is part of the fix for bug #4347 . Michael
2010-01-07s3: Simplify pdb_set_plaintext_passwd: pwhistory==NULL can not happen anymoreVolker Lendecke1-24/+19
2010-01-07s3: Simplify pdb_set_plaintext_passwd: pwHistLen==0 was checked aboveVolker Lendecke1-2/+4
2010-01-07s3: Add a paranoia check to pdb_set_plaintext_passwd()Volker Lendecke1-0/+5
2010-01-07s3: Simplify pdb_set_plaintext_passwd() by removing a redundant conditionVolker Lendecke1-22/+11
if (current_history_len != pwHistLen) { if (current_history_len < pwHistLen) { } } The second "if" is a bit pointless here
2010-01-07s3: Simplify pdb_set_plaintext_passwd: memcpy deals fine with 0 bytesVolker Lendecke1-5/+2
2010-01-07s3: Simplify pdb_set_plaintext_passwd by using talloc_zero_arrayVolker Lendecke1-5/+2
2010-01-07s3: Make use of talloc_array in pdb_set_plaintext_passwd()Volker Lendecke1-2/+3
2010-01-07s3: Simplify pdb_set_plaintext_passwd() a bitVolker Lendecke1-66/+63
Remove an indentation by the early return in + if (pwHistLen == 0) { + /* Set the history length to zero. */ + pdb_set_pw_history(sampass, NULL, 0, PDB_CHANGED); + return true; + }
2010-01-07s3: Simplify pdb_set_plaintext_passwd() slightlyVolker Lendecke1-56/+83
No functional change, this just removes an indentation level by the early "return True;" in + if ((pdb_get_acct_ctrl(sampass) & ACB_NORMAL) == 0) { + /* + * No password history for non-user accounts + */ + return true; + } Volker
2010-01-07s3:pdb_set_pw_history: free the old history before setting the new.Michael Adam1-0/+1
This is not strictly necessary, since this only leaks into the struct samu, and this is not so long-lived in the code path that changes the password, but it definitely correct and does not harm. Michael
2009-07-14s3-account_policy: add pdb_policy_type enum.Günther Deschner1-3/+3
Guenther
2009-04-14Rework Samba3 to use new libcli/auth code (partial)Andrew Bartlett1-0/+1
This commit is mostly to cope with the removal of SamOemHash (replaced by arcfour_crypt()) and other collisions (such as changed function arguments compared to Samba3). We still provide creds_hash3 until Samba3 uses the credentials code in netlogon server Andrew Bartlett
2009-02-08Fix some nonempty blank linesVolker Lendecke1-41/+41
2008-05-05Remove unix_homedir from struct user_structVolker Lendecke1-8/+0
This makes pdb_get_unix_homedir unused. I wonder if that was ever really used... (This used to be commit 36bfd32f1ff878e827db91e9bf233719ecca5b01)
2008-02-17Use netr_SamInfo3 in remaining places.Günther Deschner1-1/+1
Guenther (This used to be commit 92fca97951bf7adf8caaeabdaff21682b18dd91f)
2007-12-15Replace sid_string_static by sid_string_dbg in DEBUGsVolker Lendecke1-2/+2
(This used to be commit bb35e794ec129805e874ceba882bcc1e84791a09)
2007-11-20More pstring elimination.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 15074de938539e7a9c527d9a6d81792adc2ac3d0)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-39/+39
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; andVolker Lendecke1-2/+2
replace all data_blob(NULL, 0) calls. (This used to be commit 3d3d61687ef00181f4f04e001d42181d93ac931e)
2007-10-10r19058: Implement "user cannot change password", and complete "user must changeJim McDonough1-35/+33
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. (This used to be commit 21abbeaee9b7f7cff1d34d048463c30cda44a2e3)
2007-10-10r18722: Fix up password change times. The can change and must change times areJim McDonough1-2/+22
calculated based on the last change time, policies, and acb flags. Next step will be to not bother storing them. Right now I'm just trying to get them reported correctly. (This used to be commit fd5761c9e52cbf8f1f7e45e71693598b27ecbf57)
2007-10-10r18684: pdb_get_group_sid() has to use the Get_Pwnam_alloc() callGerald Carter1-1/+1
to ensure it finds the Unix user. (This used to be commit 4cea9bfca1b84db31fae6f7a05ff3247a23fd409)
2007-10-10r18271: Big change:Gerald Carter1-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. (This used to be commit 3da9f80c28b1e75ef6d46d38fbb81ade6b9fa951)