vfs_gpfs: Remove call to linux_set_lease_capability
authorChristof Schmitt <cs@samba.org>
Thu, 16 Jan 2020 19:12:53 +0000 (12:12 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 21 Jan 2020 22:08:40 +0000 (22:08 +0000)
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 <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_gpfs.c

index de18d32ac2363bcf96e80e500aded084f7dd7e06..0fdb28c19d25942900cfaefcc651fdad21b7607e 100644 (file)
@@ -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);
 }