diff options
author | Jeremy Allison <jra@samba.org> | 1998-05-12 00:55:32 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-05-12 00:55:32 +0000 |
commit | f888868f46a5418bac9ab528497136c152895305 (patch) | |
tree | cf72c864807b19e098a856aaec8daf334189ff84 /source3/rpc_parse/parse_lsa.c | |
parent | 9141acecdcebd9276107a500435e3d4545020056 (diff) | |
download | samba-f888868f46a5418bac9ab528497136c152895305.tar.gz samba-f888868f46a5418bac9ab528497136c152895305.tar.bz2 samba-f888868f46a5418bac9ab528497136c152895305.zip |
This is a security audit change of the main source.
It removed all ocurrences of the following functions :
sprintf
strcpy
strcat
The replacements are slprintf, safe_strcpy and safe_strcat.
It should not be possible to use code in Samba that uses
sprintf, strcpy or strcat, only the safe_equivalents.
Once Andrew has fixed the slprintf implementation then
this code will be moved back to the 1.9.18 code stream.
Jeremy.
(This used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)
Diffstat (limited to 'source3/rpc_parse/parse_lsa.c')
-rw-r--r-- | source3/rpc_parse/parse_lsa.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index 0a49fb7b4d..202c3b6da3 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -416,14 +416,14 @@ void lsa_io_sid_enum(char *desc, LSA_SID_ENUM *sen, prs_struct *ps, int depth) for (i = 0; i < sen->num_entries; i++) { fstring temp; - sprintf(temp, "ptr_sid[%d]", i); + slprintf(temp, sizeof(temp) - 1, "ptr_sid[%d]", i); prs_uint32(temp, ps, depth, &(sen->ptr_sid[i])); /* domain SID pointers to be looked up. */ } for (i = 0; i < sen->num_entries; i++) { fstring temp; - sprintf(temp, "sid[%d]", i); + slprintf(temp, sizeof(temp) - 1, "sid[%d]", i); smb_io_dom_sid2(temp, &(sen->sid[i]), ps, depth); /* domain SIDs to be looked up. */ } } @@ -470,7 +470,7 @@ void lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, in for (i = 0; i < trn->num_entries; i++) { fstring temp; - sprintf(temp, "ptr_name[%d] ", i); + slprintf(temp, sizeof(temp) - 1, "ptr_name[%d] ", i); prs_uint32(temp, ps, depth, &(trn->ptr_name[i])); /* pointer to translated name */ } @@ -479,7 +479,7 @@ void lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, in if (trn->ptr_name[i] != 0) { fstring temp; - sprintf(temp, "name[%d] ", i); + slprintf(temp, sizeof(temp) - 1, "name[%d] ", i); lsa_io_trans_name(temp, &(trn->name[i2]), ps, depth); /* translated name */ i2++; } |