]> git.pld-linux.org Git - packages/util-linux.git/blame - util-linux-mount-uhelper.patch
- uniformized configs to use system-auth where possible
[packages/util-linux.git] / util-linux-mount-uhelper.patch
CommitLineData
5545a732
JR
1- util-linux should provide plugin infrastructure for HAL
2
3--- util-linux-2.13-pre6/mount/mount.c.uhelper 2006-09-15 13:23:23.000000000 +0200
4+++ util-linux-2.13-pre6/mount/mount.c 2006-09-15 13:23:23.000000000 +0200
5@@ -183,7 +183,7 @@
6 };
7
8 static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption,
9- *opt_speed, *opt_comment;
10+ *opt_speed, *opt_comment, *opt_uhelper;
11
12 static struct string_opt_map {
13 char *tag;
14@@ -196,6 +196,7 @@
15 { "encryption=", 0, &opt_encryption },
16 { "speed=", 0, &opt_speed },
17 { "comment=", 1, &opt_comment },
18+ { "uhelper=", 0, &opt_uhelper },
19 { NULL, 0, NULL }
20 };
21
22--- util-linux-2.13-pre6/mount/umount.8.uhelper 2004-11-10 20:49:37.000000000 +0100
23+++ util-linux-2.13-pre6/mount/umount.8 2006-09-15 14:02:25.000000000 +0200
24@@ -122,6 +122,19 @@
25 Any pending loop devices can be freed using `losetup -d', see
26 .BR losetup (8).
27
28+.SH NOTES
29+The syntax of external umount helpers is:
30+
31+.br
32+.BI "/sbin/umount.<suffix> [\-nlfvr] " "dir " | " device "
33+.br
34+
35+where the <suffix> is filesystem type or a value from "uhelper=" mtab option.
36+
37+The uhelper (unprivileged umount request helper) is possible used when non-root
38+user wants to umount a mountpoint which is not defined in the /etc/fstab file
39+(e.g devices mounted by HAL).
40+
41 .SH FILES
42 .I /etc/mtab
43 table of mounted file systems
44--- util-linux-2.13-pre6/mount/umount.c.uhelper 2006-09-15 13:23:23.000000000 +0200
45+++ util-linux-2.13-pre6/mount/umount.c 2006-09-15 13:23:23.000000000 +0200
46@@ -565,11 +565,24 @@
47
48 if (suid) {
49 char *mtab_user = NULL;
50+ char *uhelper = NULL;
51
52 if (!mc)
53 die(2,
54 _("umount: %s is not mounted (according to mtab)"),
55 file);
56+ /*
57+ * uhelper - unprivileged umount helper
58+ * -- external umount (for example HAL mounts)
59+ */
60+ if (mc->m.mnt_opts)
61+ uhelper = get_value(mc->m.mnt_opts, "uhelper=");
62+ if (uhelper) {
63+ int status = 0;
64+ if (check_special_umountprog(arg, arg, uhelper, &status))
65+ return status;
66+ }
67+
68 /* The 2.4 kernel will generally refuse to mount the same
69 filesystem on the same mount point, but will accept NFS.
70 So, unmounting must be possible. */
This page took 0.073008 seconds and 4 git commands to generate.