diff options
author | Jeremy Allison <jra@samba.org> | 2004-12-07 18:25:53 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:32 -0500 |
commit | acf9d61421faa6c0055d57fdee7db300dc5431aa (patch) | |
tree | 5482afecfe9b4a68b9a1f18d541a3109f8143ab7 /source3/utils/smbcacls.c | |
parent | 3bd3be97dc8a581c0502410453091c195e322766 (diff) | |
download | samba-acf9d61421faa6c0055d57fdee7db300dc5431aa.tar.gz samba-acf9d61421faa6c0055d57fdee7db300dc5431aa.tar.xz samba-acf9d61421faa6c0055d57fdee7db300dc5431aa.zip |
r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
Diffstat (limited to 'source3/utils/smbcacls.c')
-rw-r--r-- | source3/utils/smbcacls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index b12bf4d35d8..048ec8dc3ef 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -325,7 +325,7 @@ static BOOL add_ace(SEC_ACL **the_acl, SEC_ACE *ace) return True; } - aces = calloc(1+(*the_acl)->num_aces,sizeof(SEC_ACE)); + aces = SMB_CALLOC_ARRAY(SEC_ACE, 1+(*the_acl)->num_aces); memcpy(aces, (*the_acl)->ace, (*the_acl)->num_aces * sizeof(SEC_ACE)); memcpy(aces+(*the_acl)->num_aces, ace, sizeof(SEC_ACE)); new = make_sec_acl(ctx,(*the_acl)->revision,1+(*the_acl)->num_aces, aces); @@ -353,7 +353,7 @@ static SEC_DESC *sec_desc_parse(char *str) } if (strncmp(tok,"OWNER:", 6) == 0) { - owner_sid = (DOM_SID *)calloc(1, sizeof(DOM_SID)); + owner_sid = SMB_CALLOC_ARRAY(DOM_SID, 1); if (!owner_sid || !StringToSid(owner_sid, tok+6)) { printf("Failed to parse owner sid\n"); @@ -363,7 +363,7 @@ static SEC_DESC *sec_desc_parse(char *str) } if (strncmp(tok,"GROUP:", 6) == 0) { - grp_sid = (DOM_SID *)calloc(1, sizeof(DOM_SID)); + grp_sid = SMB_CALLOC_ARRAY(DOM_SID, 1); if (!grp_sid || !StringToSid(grp_sid, tok+6)) { printf("Failed to parse group sid\n"); |