From ac774c49691b08fa90121d5bd008618cfd4405e7 Mon Sep 17 00:00:00 2001 From: Abhidnya P Chirmule Date: Tue, 6 Oct 2009 17:14:56 +0200 Subject: s3: Add access_mask to the flock VFS call --- source3/modules/onefs_open.c | 2 +- source3/modules/vfs_default.c | 4 ++-- source3/modules/vfs_full_audit.c | 4 ++-- source3/modules/vfs_gpfs.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/modules') diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c index b9a2c30734..d90f165cd7 100644 --- a/source3/modules/onefs_open.c +++ b/source3/modules/onefs_open.c @@ -1253,7 +1253,7 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn, note that GPFS supports it as well - jmcd */ if (fsp->fh->fd != -1) { - ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, share_access); + ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, share_access, access_mask); if(ret_flock == -1 ){ TALLOC_FREE(lck); diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 680eb1205b..036a438002 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -1057,10 +1057,10 @@ static bool vfswrap_lock(vfs_handle_struct *handle, files_struct *fsp, int op, S } static int vfswrap_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, - uint32 share_mode) + uint32 share_mode, uint32 access_mask) { START_PROFILE(syscall_kernel_flock); - kernel_flock(fsp->fh->fd, share_mode); + kernel_flock(fsp->fh->fd, share_mode, access_mask); END_PROFILE(syscall_kernel_flock); return 0; } diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 22abee416c..5305af4832 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -1245,11 +1245,11 @@ static bool smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp, static int smb_full_audit_kernel_flock(struct vfs_handle_struct *handle, struct files_struct *fsp, - uint32 share_mode) + uint32 share_mode, uint32 access_mask) { int result; - result = SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_mode); + result = SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_mode, access_mask); do_log(SMB_VFS_OP_KERNEL_FLOCK, (result >= 0), handle, "%s", fsp_str_do_log(fsp)); diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index c1131a92b9..7c481d6ba0 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -31,14 +31,14 @@ #include "vfs_gpfs.h" static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, - uint32 share_mode) + uint32 share_mode, uint32 access_mask) { START_PROFILE(syscall_kernel_flock); - kernel_flock(fsp->fh->fd, share_mode); + kernel_flock(fsp->fh->fd, share_mode, access_mask); - if (!set_gpfs_sharemode(fsp, fsp->access_mask, fsp->share_access)) { + if (!set_gpfs_sharemode(fsp, access_mask, fsp->share_access)) { return -1; -- cgit