From 971762498bae55b7942611f23518bcc5673c7242 Mon Sep 17 00:00:00 2001 From: Olga Kornievskaia Date: Fri, 26 Aug 2011 16:27:19 -0400 Subject: [PATCH] fixing null pointer deref in setowner/group --- daemon/acl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daemon/acl.c b/daemon/acl.c index 6b7f49e..417f74f 100644 --- a/daemon/acl.c +++ b/daemon/acl.c @@ -719,6 +719,7 @@ static int handle_setacl(nfs41_upcall *upcall) BOOL sid_default, gsid_default; if (args->query & OWNER_SECURITY_INFORMATION) { + char owner[NFS4_OPAQUE_LIMIT]; dprintf(1, "handle_setacl: OWNER_SECURITY_INFORMATION\n"); status = GetSecurityDescriptorOwner(args->sec_desc, &sid, &sid_default); if (!status) { @@ -726,6 +727,7 @@ static int handle_setacl(nfs41_upcall *upcall) eprintf("GetSecurityDescriptorOwner failed with %d\n", status); goto out; } + info.owner = owner; status = map_nfs4ace_who(sid, NULL, NULL, info.owner, state->session->client->domain_name); if (status) @@ -736,6 +738,7 @@ static int handle_setacl(nfs41_upcall *upcall) } } if (args->query & GROUP_SECURITY_INFORMATION) { + char group[NFS4_OPAQUE_LIMIT]; dprintf(1, "handle_setacl: GROUP_SECURITY_INFORMATION\n"); status = GetSecurityDescriptorGroup(args->sec_desc, &sid, &sid_default); if (!status) { @@ -743,6 +746,7 @@ static int handle_setacl(nfs41_upcall *upcall) eprintf("GetSecurityDescriptorOwner failed with %d\n", status); goto out; } + info.owner_group = group; status = map_nfs4ace_who(sid, NULL, NULL, info.owner_group, state->session->client->domain_name); if (status)