mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
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
This commit is contained in:
parent
1af8b07929
commit
f9d19c459f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user