* [nfs-utils PATCH] mount: chk_mountpoint should only check for execute perms for unpriveleged users
@ 2014-03-20 20:12 Scott Mayhew
2014-03-22 14:13 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Scott Mayhew @ 2014-03-20 20:12 UTC (permalink / raw)
To: linux-nfs
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>
---
utils/mount/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [nfs-utils PATCH] mount: chk_mountpoint should only check for execute perms for unpriveleged users
2014-03-20 20:12 [nfs-utils PATCH] mount: chk_mountpoint should only check for execute perms for unpriveleged users Scott Mayhew
@ 2014-03-22 14:13 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2014-03-22 14:13 UTC (permalink / raw)
To: Scott Mayhew, linux-nfs
On 03/20/2014 04:12 PM, Scott Mayhew wrote:
> 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>
Committed...
steved.
> ---
> utils/mount/utils.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
> }
> -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-22 14:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-20 20:12 [nfs-utils PATCH] mount: chk_mountpoint should only check for execute perms for unpriveleged users Scott Mayhew
2014-03-22 14:13 ` Steve Dickson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.