From f888868f46a5418bac9ab528497136c152895305 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 12 May 1998 00:55:32 +0000 Subject: 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) --- source3/rpc_parse/parse_lsa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/rpc_parse/parse_lsa.c') 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++; } -- cgit