From: Christof Schmitt Date: Thu, 16 Jan 2020 19:12:53 +0000 (-0700) Subject: vfs_gpfs: Remove call to linux_set_lease_capability X-Git-Tag: ldb-2.1.1~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22cd011bc41f648cd3570a511ea3c45eac67e52c;p=thirdparty%2Fsamba.git vfs_gpfs: Remove call to linux_set_lease_capability The API call is already done as root user (become_root), so that the lease contains the root user. The lease capability is already implied by the root user, so the explicit call to linux_set_lease_capability is not required. Signed-off-by: Christof Schmitt Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index de18d32ac23..0fdb28c19d2 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -230,12 +230,6 @@ static int set_gpfs_lease(int fd, int leasetype) gpfs_type = GPFS_LEASE_WRITE; } - /* we unconditionally set CAP_LEASE, rather than looking for - -1/EACCES as there is a bug in some versions of - libgpfs_gpl.so which results in a leaked fd on /dev/ss0 - each time we try this with the wrong capabilities set - */ - linux_set_lease_capability(); return gpfswrap_set_lease(fd, gpfs_type); }