summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Mayhew <smayhew@redhat.com>2014-03-22 10:12:49 -0400
committerSteve Dickson <steved@redhat.com>2014-03-22 10:12:49 -0400
commitea01b444d5108db81e61f6d468c936c62b18d0f1 (patch)
tree00d96839d3ab0fd87a22fc51e7efb6db18db2d9f
parent4663c6481c294838260840d234fec7dfd3186451 (diff)
downloadnfs-utils-ea01b444d5108db81e61f6d468c936c62b18d0f1.tar.gz
nfs-utils-ea01b444d5108db81e61f6d468c936c62b18d0f1.tar.xz
nfs-utils-ea01b444d5108db81e61f6d468c936c62b18d0f1.zip
mount: chk_mountpoint should only check for execute perms for unpriveleged users
Otherwise 'mount -o remount' fails on mounts that have root squashing enabled and world execute perms disabled. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--utils/mount/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/mount/utils.c b/utils/mount/utils.c
index ede77a8..92662ed 100644
--- a/utils/mount/utils.c
+++ b/utils/mount/utils.c
@@ -130,7 +130,7 @@ int chk_mountpoint(const char *mount_point)
mount_error(NULL, mount_point, ENOTDIR);
return 1;
}
- if (access(mount_point, X_OK) < 0) {
+ if (getuid() != 0 && geteuid() != 0 && access(mount_point, X_OK) < 0) {
mount_error(NULL, mount_point, errno);
return 1;
}