rpms/util-linux/devel util-linux-2.13-mount-sloppy.patch, NONE, 1.1 util-linux-2.13-mount-uhelper.patch, NONE, 1.1 util-linux-2.13-mount-twiceloop.patch, 1.1, 1.2 util-linux.spec, 1.139, 1.140

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Sep 15 09:08:35 UTC 2006


Author: kzak

Update of /cvs/dist/rpms/util-linux/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv22792

Modified Files:
	util-linux-2.13-mount-twiceloop.patch util-linux.spec 
Added Files:
	util-linux-2.13-mount-sloppy.patch 
	util-linux-2.13-mount-uhelper.patch 
Log Message:
- some important FC6 bugfixes


util-linux-2.13-mount-sloppy.patch:
 mount.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

--- NEW FILE util-linux-2.13-mount-sloppy.patch ---
--- util-linux-2.13-pre6/mount/mount.c.sloppy	2006-09-15 08:39:53.000000000 +0200
+++ util-linux-2.13-pre6/mount/mount.c	2006-09-15 08:43:24.000000000 +0200
@@ -554,7 +554,7 @@
        if (stat(mountprog, &statbuf) == 0) {
 	    res = fork();
 	    if (res == 0) {
-		 char *oo, *mountargs[10];
+		 char *oo, *mountargs[11];
 		 int i = 0;
 
 		 setuid(getuid());
@@ -563,6 +563,8 @@
 		 mountargs[i++] = mountprog;
 		 mountargs[i++] = spec;
 		 mountargs[i++] = node;
+		 if (sloppy && (strcmp(type, "nfs")==0 || strcmp(type, "nfs4")==0))
+		      mountargs[i++] = "-s";
 		 if (nomtab)
 		      mountargs[i++] = "-n";
 		 if (verbose)

util-linux-2.13-mount-uhelper.patch:
 umount.8 |   13 +++++++++++++
 umount.c |   13 +++++++++++++
 2 files changed, 26 insertions(+)

--- NEW FILE util-linux-2.13-mount-uhelper.patch ---
--- util-linux-2.13-pre6/mount/umount.8.uhelper	2006-09-15 09:44:43.000000000 +0200
+++ util-linux-2.13-pre6/mount/umount.8	2006-09-15 10:07:11.000000000 +0200
@@ -122,6 +122,19 @@
 Any pending loop devices can be freed using `losetup -d', see
 .BR losetup (8).
 
+.SH NOTES
+The syntax of external umount helpers is:
+
+.br
+.BI "/sbin/umount.<suffix> [\-nlfvr] " "dir " | " device "
+.br
+
+where the <suffix> is filesystem type or a value from "uhelper=" mtab option. 
+
+The uhelper (unprivileged umount request helper) is possible used when non-root
+user wants to umount device which has been mounted by an external process (e.g.
+HAL) and there is not entry in fstab for this mountpoint. 
+
 .SH FILES
 .I /etc/mtab
 table of mounted file systems
--- util-linux-2.13-pre6/mount/umount.c.uhelper	2006-09-15 09:11:38.000000000 +0200
+++ util-linux-2.13-pre6/mount/umount.c	2006-09-15 09:44:10.000000000 +0200
@@ -565,11 +565,24 @@
 
 	if (suid) {
 		char *mtab_user = NULL;
+		char *uhelper = NULL;
 
 		if (!mc)
 			die(2,
 			    _("umount: %s is not mounted (according to mtab)"),
 			    file);
+		/*
+		 * uhelper - unprivileged umount helper
+		 * -- external umount (for example HAL mounts)
+		 */
+		if (mc->m.mnt_opts) 
+			uhelper = get_value(mc->m.mnt_opts, "uhelper=");
+		if (uhelper) {
+			int status = 0; 
+			if (check_special_umountprog(arg, arg, uhelper, &status))
+				return status;
+		}
+
 		/* The 2.4 kernel will generally refuse to mount the same
 		   filesystem on the same mount point, but will accept NFS.
 		   So, unmounting must be possible. */

util-linux-2.13-mount-twiceloop.patch:
 fstab.c |   21 +++++++++++++++++++++
 fstab.h |    1 +
 mount.c |    9 +++++++--
 3 files changed, 29 insertions(+), 2 deletions(-)

Index: util-linux-2.13-mount-twiceloop.patch
===================================================================
RCS file: /cvs/dist/rpms/util-linux/devel/util-linux-2.13-mount-twiceloop.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- util-linux-2.13-mount-twiceloop.patch	3 Jan 2006 17:50:20 -0000	1.1
+++ util-linux-2.13-mount-twiceloop.patch	15 Sep 2006 09:08:32 -0000	1.2
@@ -1,35 +1,15 @@
---- util-linux-2.13-pre6/mount/fstab.c.twiceloop	2006-01-03 18:35:05.000000000 +0100
-+++ util-linux-2.13-pre6/mount/fstab.c	2006-01-03 18:37:44.000000000 +0100
-@@ -254,6 +254,27 @@
- 	return (ct == 1);
- }
+--- util-linux-2.13-pre6/mount/fstab.h.twiceloop	2006-09-15 08:50:46.000000000 +0200
++++ util-linux-2.13-pre6/mount/fstab.h	2006-09-15 08:51:10.000000000 +0200
+@@ -2,6 +2,7 @@
+ int mtab_is_writable(void);
+ int mtab_does_not_exist(void);
+ int is_mounted_once(const char *name);
++int is_mounted_same_loopfile(const char *loopfile, const char *dir);
  
-+/*
-+ * Given the loop file LOOPFILE, and the mount point DIR, check that
-+ * same file is already mounted on same directory 
-+ *
-+ * Don't forget there's 
-+ *   /path/loopfile /path/dir loop=/dev/loop0
-+ * in mtab for loop devices.
-+ */
-+int
-+is_mounted_same_loopfile(const char *loopfile, const char *dir) {
-+	struct mntentchn *mc, *mc0;
-+	int ct = 0;
-+
-+	mc0 = mtab_head();
-+	for (mc = mc0->prev; mc && mc != mc0; mc = mc->prev)
-+		if (streq(mc->m.mnt_fsname, loopfile) && 
-+		    streq(mc->m.mnt_dir, dir))
-+			ct++;
-+	return (ct == 1);
-+}
-+
- /* Given the name FILE, try to find the option "loop=FILE" in mtab.  */ 
- struct mntentchn *
- getmntoptfile (const char *file) {
---- util-linux-2.13-pre6/mount/mount.c.twiceloop	2006-01-03 18:35:06.000000000 +0100
-+++ util-linux-2.13-pre6/mount/mount.c	2006-01-03 18:37:44.000000000 +0100
+ struct mntentchn {
+ 	struct mntentchn *nxt, *prev;
+--- util-linux-2.13-pre6/mount/mount.c.twiceloop	2006-09-15 08:50:23.000000000 +0200
++++ util-linux-2.13-pre6/mount/mount.c	2006-09-15 08:50:24.000000000 +0200
 @@ -671,7 +671,7 @@
  
  static int
@@ -60,3 +40,33 @@
        if (res)
  	  goto out;
    }
+--- util-linux-2.13-pre6/mount/fstab.c.twiceloop	2006-09-15 08:50:23.000000000 +0200
++++ util-linux-2.13-pre6/mount/fstab.c	2006-09-15 08:50:24.000000000 +0200
+@@ -254,6 +254,27 @@
+ 	return (ct == 1);
+ }
+ 
++/*
++ * Given the loop file LOOPFILE, and the mount point DIR, check that
++ * same file is already mounted on same directory 
++ *
++ * Don't forget there's 
++ *   /path/loopfile /path/dir loop=/dev/loop0
++ * in mtab for loop devices.
++ */
++int
++is_mounted_same_loopfile(const char *loopfile, const char *dir) {
++	struct mntentchn *mc, *mc0;
++	int ct = 0;
++
++	mc0 = mtab_head();
++	for (mc = mc0->prev; mc && mc != mc0; mc = mc->prev)
++		if (streq(mc->m.mnt_fsname, loopfile) && 
++		    streq(mc->m.mnt_dir, dir))
++			ct++;
++	return (ct == 1);
++}
++
+ /* Given the name FILE, try to find the option "loop=FILE" in mtab.  */ 
+ struct mntentchn *
+ getmntoptfile (const char *file) {


Index: util-linux.spec
===================================================================
RCS file: /cvs/dist/rpms/util-linux/devel/util-linux.spec,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -r1.139 -r1.140
--- util-linux.spec	21 Aug 2006 16:24:02 -0000	1.139
+++ util-linux.spec	15 Sep 2006 09:08:32 -0000	1.140
@@ -9,7 +9,7 @@
 Summary: A collection of basic system utilities.
 Name: util-linux
 Version: 2.13
-Release: 0.40
+Release: 0.41
 License: distributable
 Group: System Environment/Base
 
@@ -227,6 +227,10 @@
 Patch247: util-linux-2.13-login-timeval.patch
 # 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8)
 Patch248: util-linux-2.13-ctrlaltdel-man.patch
+# 205038 - mount not allowing sloppy option
+Patch249: util-linux-2.13-mount-sloppy.patch
+# 188193 - util-linux should provide plugin infrastructure for HAL
+Patch250: util-linux-2.13-mount-uhelper.patch
 
 # When adding patches, please make sure that it is easy to find out what bug # the 
 # patch fixes.
@@ -326,6 +330,8 @@
 %patch246 -p1
 %patch247 -p1
 %patch248 -p1
+%patch249 -p1
+%patch250 -p1
 
 %build
 unset LINGUAS || :
@@ -730,6 +736,12 @@
 /sbin/losetup
 
 %changelog
+* Fri Sep 15 2006 Karel Zak <kzak at redhat.com> 2.13-0.41
+- fix #205038 - mount not allowing sloppy option (exports "-s"
+  to external /sbin/mount.nfs(4) calls) 
+- fix minor bug in util-linux-2.13-mount-twiceloop.patch
+- fix #188193- util-linux should provide plugin infrastructure for HAL
+
 * Mon Aug 21 2006 Karel Zak <kzak at redhat.com> 2.13-0.40
 - fix Makefile.am in util-linux-2.13-mount-context.patch
 - fix #201343 - pam_securetty requires known user to work




More information about the fedora-cvs-commits mailing list