]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mount: (new) add 'internal-only(i)' to non-root allowed options
authorRaghavendra D Prabhu <rprabhu@wnohang.net>
Sun, 26 Feb 2012 11:06:42 +0000 (16:36 +0530)
committerKarel Zak <kzak@redhat.com>
Tue, 28 Feb 2012 14:37:29 +0000 (15:37 +0100)
Commit ce433404 introduced the change, which causes something like mount -i
<user-mount-path> to break which worked well before util-linux-2.21, now it
gives message 'mount: only root can use "--internal-only" option' when that
shouldn't be the case when it is already in fstab.

Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
sys-utils/mount.c

index 23abc917356e7c1015d876ec734a0b3740f3e730..8f5dcdbd6a09245469b6bc8c9033983aa7b9d794 100644 (file)
@@ -712,7 +712,7 @@ int main(int argc, char **argv)
                                        longopts, NULL)) != -1) {
 
                /* only few options are allowed for non-root users */
-               if (mnt_context_is_restricted(cxt) && !strchr("hlLUVvpr", c))
+               if (mnt_context_is_restricted(cxt) && !strchr("hlLUVvpri", c))
                        exit_non_root(option_to_longopt(c, longopts));
 
                switch(c) {