From f9d19c459f01d6e316a4a74a900c69424962eae0 Mon Sep 17 00:00:00 2001 From: Ralph Wuerthner Date: Wed, 31 Jul 2013 16:33:48 -0700 Subject: 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 Reviewed-by: Jeremy Allison Reviewed-by: Simo Sorce Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Aug 1 03:57:11 CEST 2013 on sn-devel-104 --- source3/modules/vfs_gpfs.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/modules') 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); -- cgit