summaryrefslogtreecommitdiffstats
path: root/source/utils/smbcacls.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-12-16 12:30:49 +0000
committerGerald Carter <jerry@samba.org>2004-12-16 12:30:49 +0000
commit8d91e07ef22ad3ed484b04bc4968380a24940696 (patch)
treeb5b8989f8da9ef7f852081f0460995386edd4b5d /source/utils/smbcacls.c
parent1a878c865637feb80206c0dc599acebf7f4a46bd (diff)
downloadsamba-3.0.10.tar.gz
samba-3.0.10.tar.xz
samba-3.0.10.zip
r4231: commiting changes to 3.0.10samba-3.0.10
Diffstat (limited to 'source/utils/smbcacls.c')
-rw-r--r--source/utils/smbcacls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c
index 4dc89aecb9d..3963adb9f0c 100644
--- a/source/utils/smbcacls.c
+++ b/source/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");