summaryrefslogtreecommitdiff
path: root/source3/passdb/nispass.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-08 20:31:39 +0000
committerJeremy Allison <jra@samba.org>2001-04-08 20:31:39 +0000
commit98560fa3944b1eb8cc01df05b93408753296b4a5 (patch)
treeadf716d6a4ec314294798088bf59883fca116001 /source3/passdb/nispass.c
parentf9a15ce1a69f905e94db7650f0a4805720cd9c88 (diff)
downloadsamba-98560fa3944b1eb8cc01df05b93408753296b4a5.tar.gz
samba-98560fa3944b1eb8cc01df05b93408753296b4a5.tar.bz2
samba-98560fa3944b1eb8cc01df05b93408753296b4a5.zip
HEAD specific slprintf paranoia fixes.
Jeremy. (This used to be commit 61723c18f96a7b38cab0fcf545da7fb3640c5f7b)
Diffstat (limited to 'source3/passdb/nispass.c')
-rw-r--r--source3/passdb/nispass.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/passdb/nispass.c b/source3/passdb/nispass.c
index 2959f6ca7c..57ae8b3a99 100644
--- a/source3/passdb/nispass.c
+++ b/source3/passdb/nispass.c
@@ -636,10 +636,10 @@ static BOOL add_nisp21pwd_entry(struct sam_passwd *newpwd)
slprintf(pwdlchg_t, 13, "CCT-%08X", (uint32)newpwd->pass_can_change_time);
slprintf(pwdmchg_t, 13, "MCT-%08X", (uint32)newpwd->pass_must_change_time);
- slprintf(uid, sizeof(uid), "%u", newpwd->smb_userid);
- slprintf(user_rid, sizeof(user_rid), "0x%x", newpwd->user_rid);
- slprintf(smb_grpid, sizeof(smb_grpid), "%u", newpwd->smb_grpid);
- slprintf(group_rid, sizeof(group_rid), "0x%x", newpwd->group_rid);
+ slprintf(uid, sizeof(uid)-1, "%u", newpwd->smb_userid);
+ slprintf(user_rid, sizeof(user_rid)-1, "0x%x", newpwd->user_rid);
+ 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);
@@ -868,7 +868,7 @@ static BOOL mod_nisp21pwd_entry(struct sam_passwd* pwd, BOOL override)
pwd->pass_last_set_time = time(NULL);
if(got_pass_last_set_time) {
- slprintf(lct, 12, "LCT-%08X", (uint32)pwd->pass_last_set_time);
+ slprintf(lct, 13, "LCT-%08X", (uint32)pwd->pass_last_set_time);
}
set_single_attribute(obj, NPF_LMPWD, lmpwd, strlen(lmpwd), EN_CRYPT);