diff options
author | Jeremy Allison <jeremy@jeremy-desktop.(none)> | 2008-12-23 09:50:10 -0800 |
---|---|---|
committer | Jeremy Allison <jeremy@jeremy-desktop.(none)> | 2008-12-23 09:50:10 -0800 |
commit | cb7d7beb99ab7952b5187c05b2660283d93e59fc (patch) | |
tree | 6043b5664700ae6cdbb6d7044ab271108978ff35 | |
parent | 227c8000dfee4248fc2d13104382542e449a1897 (diff) | |
download | samba-cb7d7beb99ab7952b5187c05b2660283d93e59fc.tar.gz samba-cb7d7beb99ab7952b5187c05b2660283d93e59fc.tar.bz2 samba-cb7d7beb99ab7952b5187c05b2660283d93e59fc.zip |
Fix another "format not a string literal and no format arguments" warning.
Jeremy
-rw-r--r-- | source3/libnet/libnet_samsync_ldif.c | 7 |
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, |