summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-23 19:30:16 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-23 19:30:16 +0100
commit5dce4148a3d30cbc0ca434049761434c5cc8cb33 (patch)
treed6f70260db08aee9ca2f728c4cedeea081d739bf /source3/libnet
parent465f78021e609719bf25b7d2933c47b7ab1b6940 (diff)
parent7fd114bab72e4cc9bdb7a0017055b68ea7523f0a (diff)
downloadsamba-5dce4148a3d30cbc0ca434049761434c5cc8cb33.tar.gz
samba-5dce4148a3d30cbc0ca434049761434c5cc8cb33.tar.bz2
samba-5dce4148a3d30cbc0ca434049761434c5cc8cb33.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_samsync_ldif.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/libnet/libnet_samsync_ldif.c b/source3/libnet/libnet_samsync_ldif.c
index c72eadf03f..3068f8d3eb 100644
--- a/source3/libnet/libnet_samsync_ldif.c
+++ b/source3/libnet/libnet_samsync_ldif.c
@@ -586,7 +586,7 @@ static NTSTATUS fetch_account_info_to_ldif(TALLOC_CTX *mem_ctx,
uchar zero_buf[16];
uint32 rid = 0, group_rid = 0, gidNumber = 0;
time_t unix_time;
- int i;
+ int i, ret;
memset(zero_buf, '\0', sizeof(zero_buf));
@@ -660,7 +660,10 @@ static NTSTATUS fetch_account_info_to_ldif(TALLOC_CTX *mem_ctx,
return NT_STATUS_UNSUCCESSFUL;
}
gidNumber = groupmap[i].gidNumber;
- snprintf(sambaSID, sizeof(sambaSID), groupmap[i].sambaSID);
+ ret = snprintf(sambaSID, sizeof(sambaSID), "%s", groupmap[i].sambaSID);
+ if (ret < 0 || ret == sizeof(sambaSID)) {
+ return NT_STATUS_UNSUCCESSFUL;
+ }
/* Set up sambaAcctFlags */
flags = pdb_encode_acct_ctrl(r->acct_flags,