summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_ldap.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-19 10:39:56 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-19 12:34:33 +0200
commit4471778d7846e0c5d5989e522ee214a3b4ded153 (patch)
tree176828701c4c6411df07487c83aac8bfcf8eb53b /source3/passdb/pdb_ldap.c
parentcf39ef363782dae8d9b73bb249f2321c924c1dc8 (diff)
downloadsamba-4471778d7846e0c5d5989e522ee214a3b4ded153.tar.gz
samba-4471778d7846e0c5d5989e522ee214a3b4ded153.tar.bz2
samba-4471778d7846e0c5d5989e522ee214a3b4ded153.zip
s3-passdb: Remove unused sampass->pass_must_change_time
There is no need to call pdb_set_pass_must_change_time() because nothing ever consults that value. It is always calculated from the domain policy. Also, this means we no longer store the value in LDAP. The value would only ever be set when migrating from tdbsam or smbpasswd, not on password changes, so would become incorrect over time. Andrew Bartlett
Diffstat (limited to 'source3/passdb/pdb_ldap.c')
-rw-r--r--source3/passdb/pdb_ldap.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 04541e881d..6b911d2915 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -662,18 +662,6 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
pass_can_change_time, PDB_SET);
}
- temp = smbldap_talloc_single_attribute(
- ldap_state->smbldap_state->ldap_struct,
- entry,
- get_userattr_key2string(ldap_state->schema_ver,
- LDAP_ATTR_PWD_MUST_CHANGE),
- ctx);
- if (temp) {
- pass_must_change_time = (time_t) atol(temp);
- pdb_set_pass_must_change_time(sampass,
- pass_must_change_time, PDB_SET);
- }
-
/* recommend that 'gecos' and 'displayName' should refer to the same
* attribute OID. userFullName depreciated, only used by Samba
* primary rules of LDAP: don't make a new attribute when one is already defined
@@ -1338,14 +1326,6 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_PWD_CAN_CHANGE), temp);
SAFE_FREE(temp);
- if (asprintf(&temp, "%li", (long int)pdb_get_pass_must_change_time(sampass)) < 0) {
- return false;
- }
- if (need_update(sampass, PDB_MUSTCHANGETIME))
- smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, existing, mods,
- get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_PWD_MUST_CHANGE), temp);
- SAFE_FREE(temp);
-
if ((pdb_get_acct_ctrl(sampass)&(ACB_WSTRUST|ACB_SVRTRUST|ACB_DOMTRUST))
|| (lp_ldap_passwd_sync()!=LDAP_PASSWD_SYNC_ONLY)) {