summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/modules/vfs_gpfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 13061c8c35..4a53bf84e5 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -111,7 +111,13 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp,
START_PROFILE(syscall_linux_setlease);
if (config->leases) {
+ /*
+ * Ensure the lease owner is root to allow
+ * correct delivery of lease-break signals.
+ */
+ become_root();
ret = set_gpfs_lease(fsp->fh->fd,leasetype);
+ unbecome_root();
}
END_PROFILE(syscall_linux_setlease);