From 13c3723191f33df8c9a487a0284088a89fe9eaad Mon Sep 17 00:00:00 2001 From: Olga Kornievskaia Date: Mon, 6 Feb 2012 14:22:38 -0500 Subject: [PATCH] propagating file change attr for setacl --- daemon/acl.c | 8 ++++++++ daemon/upcall.h | 1 + sys/nfs41_driver.c | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/daemon/acl.c b/daemon/acl.c index 6df0223..743e4e3 100644 --- a/daemon/acl.c +++ b/daemon/acl.c @@ -785,13 +785,21 @@ static int handle_setacl(nfs41_upcall *upcall) nfs_error_string(status)); status = nfs_to_windows_error(status, ERROR_NOT_SUPPORTED); } + args->ctime = info.change; if (args->query & DACL_SECURITY_INFORMATION) free(nfs4_acl.aces); out: return status; } +static int marshall_setacl(unsigned char *buffer, uint32_t *length, nfs41_upcall *upcall) +{ + setacl_upcall_args *args = &upcall->args.setacl; + return safe_write(&buffer, length, &args->ctime, sizeof(args->ctime)); +} + const nfs41_upcall_op nfs41_op_setacl = { parse_setacl, handle_setacl, + marshall_setacl }; \ No newline at end of file diff --git a/daemon/upcall.h b/daemon/upcall.h index f2b9742..ed0f0c4 100644 --- a/daemon/upcall.h +++ b/daemon/upcall.h @@ -170,6 +170,7 @@ typedef struct __getacl_upcall_args { typedef struct __setacl_upcall_args { SECURITY_INFORMATION query; PSECURITY_DESCRIPTOR sec_desc; + ULONGLONG ctime; } setacl_upcall_args; typedef union __upcall_args { diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c index cf117aa..80dfed0 100644 --- a/sys/nfs41_driver.c +++ b/sys/nfs41_driver.c @@ -235,6 +235,7 @@ typedef struct _updowncall_entry { SECURITY_INFORMATION query; PVOID buf; DWORD buf_len; + ULONGLONG ChangeTime; } Acl; } u; @@ -1821,6 +1822,9 @@ NTSTATUS nfs41_downcall( case NFS41_EA_SET: unmarshal_nfs41_setattr(cur, &cur->u.SetEa.ChangeTime, &buf); break; + case NFS41_ACL_SET: + unmarshal_nfs41_setattr(cur, &cur->u.Acl.ChangeTime, &buf); + break; } } DbgP("[downcall] About to signal waiting IO thread\n");