summaryrefslogtreecommitdiffstats
path: root/mount/umount.c
diff options
context:
space:
mode:
authorKarel Zak2011-04-01 09:03:39 +0200
committerKarel Zak2011-04-01 09:03:39 +0200
commitf19c952b2fc07ddd7a698cf3a213a9a16d13e7ba (patch)
treeeb591be7c2d1b45cff2595770e7fecf0b92f4be8 /mount/umount.c
parentlibmount: support /run/mount rather than /dev/.mount (diff)
downloadkernel-qcow2-util-linux-f19c952b2fc07ddd7a698cf3a213a9a16d13e7ba.tar.gz
kernel-qcow2-util-linux-f19c952b2fc07ddd7a698cf3a213a9a16d13e7ba.tar.xz
kernel-qcow2-util-linux-f19c952b2fc07ddd7a698cf3a213a9a16d13e7ba.zip
umount: use helper= for all UIDs
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/umount.c')
-rw-r--r--mount/umount.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/mount/umount.c b/mount/umount.c
index f69e5bf33..2e7bd31ce 100644
--- a/mount/umount.c
+++ b/mount/umount.c
@@ -654,6 +654,15 @@ umount_file (char *arg) {
if (!mc && verbose)
printf(_("Could not find %s in mtab\n"), file);
+ if (mc) {
+ /*
+ * helper - umount helper (e.g. pam_mount)
+ */
+ if (check_helper_umountprog(arg, arg, mc->m.mnt_opts,
+ "helper=", &status))
+ return status;
+ }
+
if (restricted) {
char *mtab_user = NULL;
@@ -738,13 +747,6 @@ umount_file (char *arg) {
mtab_user ? mtab_user : "root",
fs->m.mnt_fsname, fs->m.mnt_dir);
- } else if (mc) {
- /*
- * phelper - privileged umount helper (e.g. pam_mount)
- */
- if (check_helper_umountprog(arg, arg, mc->m.mnt_opts,
- "phelper=", &status))
- return status;
}
if (mc)