summaryrefslogtreecommitdiff
path: root/source3/passdb/nispass.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/nispass.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/nispass.c')
-rw-r--r--source3/passdb/nispass.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/passdb/nispass.c b/source3/passdb/nispass.c
index a17a29ca7a..04b3765d59 100644
--- a/source3/passdb/nispass.c
+++ b/source3/passdb/nispass.c
@@ -641,7 +641,8 @@ static BOOL add_nisp21pwd_entry(struct sam_passwd *newpwd)
slprintf(smb_grpid, sizeof(smb_grpid)-1, "%u", newpwd->smb_grpid);
slprintf(group_rid, sizeof(group_rid)-1, "0x%x", newpwd->group_rid);
- safe_strcpy(acb, pdb_encode_acct_ctrl(newpwd->acct_ctrl, NEW_PW_FORMAT_SPACE_PADDED_LEN), sizeof(acb)-1);
+ safe_strcpy(acb, smbpasswd_encode_acct_ctrl(newpwd->acct_ctrl),
+ sizeof(acb)-1);
set_single_attribute(&new_obj, NPF_NAME , newpwd->smb_name , strlen(newpwd->smb_name) , 0);
set_single_attribute(&new_obj, NPF_UID , uid , strlen(uid) , 0);
@@ -805,7 +806,7 @@ static BOOL mod_nisp21pwd_entry(struct sam_passwd* pwd, BOOL override)
* acct ctrl field. Encode the given acct ctrl
* bits into it.
*/
- fstrcpy(acb, pdb_encode_acct_ctrl(pwd->acct_ctrl, NEW_PW_FORMAT_SPACE_PADDED_LEN));
+ fstrcpy(acb, smbpasswd_encode_acct_ctrl(pwd->acct_ctrl));
} else {
/*
* If using the old format and the ACB_DISABLED or