From e09a179f669f34123a8f47cfc672e15c25232f53 Mon Sep 17 00:00:00 2001 From: Olga Kornievskaia Date: Thu, 31 Mar 2011 19:43:04 -0400 Subject: [PATCH] fattr4_word0_acl query during nfs41_acl_query upcall querying the server for the acl attribute during the nfs41_acl_query upcall. no mapping of the nfs41 acl to the windows dacl yet. --- daemon/acl.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/daemon/acl.c b/daemon/acl.c index 54fdbf4..2a38dd1 100644 --- a/daemon/acl.c +++ b/daemon/acl.c @@ -29,6 +29,7 @@ #include "daemon_debug.h" #include "util.h" #include "upcall.h" +#include "nfs41_xdr.h" static int parse_getacl(unsigned char *buffer, uint32_t length, nfs41_upcall *upcall) { @@ -153,6 +154,14 @@ static int handle_getacl(nfs41_upcall *upcall) // need to cache owner/group information XX ZeroMemory(&info, sizeof(info)); init_getattr_request(&attr_request); + if (args->query & DACL_SECURITY_INFORMATION) { + info.acl = calloc(1, sizeof(nfsacl41)); + if (info.acl == NULL) { + status = GetLastError(); + goto out; + } + attr_request.arr[0] |= FATTR4_WORD0_ACL; + } status = nfs41_getattr(state->session, &state->file, &attr_request, &info); if (status) { eprintf("nfs41_cached_getattr() failed with %d\n", status); @@ -183,6 +192,10 @@ static int handle_getacl(nfs41_upcall *upcall) dprintf(1, "handle_getacl: SACL_SECURITY_INFORMATION\n"); out: + if (args->query & DACL_SECURITY_INFORMATION) { + nfsacl41_free(info.acl); + free(info.acl); + } return status; }