summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorRalph Wuerthner <ralphw@de.ibm.com>2013-07-31 16:33:48 -0700
committerJeremy Allison <jra@samba.org>2013-08-01 03:57:11 +0200
commitf9d19c459f01d6e316a4a74a900c69424962eae0 (patch)
tree92b453d836253b8490188687f10e21b152aeddb8 /source3/modules
parent1af8b0792913d3f280b5da0802e04df063f9f59e (diff)
downloadsamba-f9d19c459f01d6e316a4a74a900c69424962eae0.tar.gz
samba-f9d19c459f01d6e316a4a74a900c69424962eae0.tar.bz2
samba-f9d19c459f01d6e316a4a74a900c69424962eae0.zip
Ensure gpfs kernel leases are wrapped in a become_root()/unbecome_root() pair.
Ensures correct lease owner for signal delivery. Signed-off-by: Ralph Wuerthner <ralphw@de.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Aug 1 03:57:11 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3/modules')
-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);