[acl] using static memory for main getacl structure
This commit is contained in:
parent
0474d3afbe
commit
756f92120c
1 changed files with 2 additions and 6 deletions
|
|
@ -280,16 +280,13 @@ static int handle_getacl(nfs41_upcall *upcall)
|
||||||
PSID osid = NULL, gsid = NULL;
|
PSID osid = NULL, gsid = NULL;
|
||||||
DWORD sid_len;
|
DWORD sid_len;
|
||||||
char owner[NFS4_OPAQUE_LIMIT], group[NFS4_OPAQUE_LIMIT];
|
char owner[NFS4_OPAQUE_LIMIT], group[NFS4_OPAQUE_LIMIT];
|
||||||
|
nfsacl41 acl = { 0 };
|
||||||
|
|
||||||
// need to cache owner/group information XX
|
// need to cache owner/group information XX
|
||||||
attr_request.count = 2;
|
attr_request.count = 2;
|
||||||
attr_request.arr[1] = FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP;
|
attr_request.arr[1] = FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP;
|
||||||
if (args->query & DACL_SECURITY_INFORMATION) {
|
if (args->query & DACL_SECURITY_INFORMATION) {
|
||||||
info.acl = calloc(1, sizeof(nfsacl41));
|
info.acl = &acl;
|
||||||
if (info.acl == NULL) {
|
|
||||||
status = GetLastError();
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
attr_request.arr[0] |= FATTR4_WORD0_ACL;
|
attr_request.arr[0] |= FATTR4_WORD0_ACL;
|
||||||
}
|
}
|
||||||
info.owner = owner;
|
info.owner = owner;
|
||||||
|
|
@ -396,7 +393,6 @@ out:
|
||||||
if (sids) free_sids(sids, info.acl->count);
|
if (sids) free_sids(sids, info.acl->count);
|
||||||
free(dacl);
|
free(dacl);
|
||||||
nfsacl41_free(info.acl);
|
nfsacl41_free(info.acl);
|
||||||
free(info.acl);
|
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue