summaryrefslogtreecommitdiff
path: root/source3/passdb/ldap.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-09-06 09:10:26 +0000
committerTim Potter <tpot@samba.org>2001-09-06 09:10:26 +0000
commit65e35d5d4bf2a35fde52d1fb795c84764009acad (patch)
treead42f02edccab85e0ccd49ece7e8fba347a0d6e1 /source3/passdb/ldap.c
parent5661d1c82f03b2254b681e135b20991da334d27f (diff)
downloadsamba-65e35d5d4bf2a35fde52d1fb795c84764009acad.tar.gz
samba-65e35d5d4bf2a35fde52d1fb795c84764009acad.tar.bz2
samba-65e35d5d4bf2a35fde52d1fb795c84764009acad.zip
Started a cleanup of smbpasswd related stuff. I've created a new file
lib/smbpasswd.c which will contain routines related to manipulating smbpasswd entries. - renamed and moved pdb_{get,set}hexpwd() functions - renamed and moved pdb_{decode,encode}acct_ctrl() functions - started hiding references to the cruftalicious NEW_PW_FORMAT_SPACE_PADDED_LEN constant - started gradual rename of references to acct_ctrl to acb_info which is the nomenclature used in MSDN and header files There's still more work to be done. Currently there are several places where smbpasswd entries are iterated etc. Ideally this should all happen through the passdb system. (This used to be commit 4a01e240305fb6fead973beef4937a016b15d744)
Diffstat (limited to 'source3/passdb/ldap.c')
-rw-r--r--source3/passdb/ldap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/passdb/ldap.c b/source3/passdb/ldap.c
index ee99664af4..8a2befcaa8 100644
--- a/source3/passdb/ldap.c
+++ b/source3/passdb/ldap.c
@@ -601,7 +601,8 @@ static BOOL modadd_ldappwd_entry(struct smb_passwd *newpwd, int flag)
make_a_mod(&mods, ldap_state, "rid", rid);
make_a_mod(&mods, ldap_state, "pwdLastSet", lst);
- make_a_mod(&mods, ldap_state, "userAccountControl", pdb_encode_acct_ctrl(newpwd->acct_ctrl, NEW_PW_FORMAT_SPACE_PADDED_LEN));
+ make_a_mod(&mods, ldap_state, "userAccountControl",
+ smbpasswd_encode_acb_info(newpwd->acct_ctrl));
switch(flag)
{
@@ -733,7 +734,8 @@ static BOOL modadd_ldap21pwd_entry(struct sam_passwd *newpwd, int flag)
make_a_mod(&mods, ldap_state, "rid", rid);
make_a_mod(&mods, ldap_state, "pwdLastSet", lst);
- make_a_mod(&mods, ldap_state, "userAccountControl", pdb_encode_acct_ctrl(newpwd->acct_ctrl,NEW_PW_FORMAT_SPACE_PADDED_LEN));
+ make_a_mod(&mods, ldap_state, "userAccountControl",
+ smbpasswd_encode_acct_ctrl(newpwd->acct_ctrl));
ldap_modify_s(ldap_struct, dn, mods);