- some important FC6 bugfixes
This commit is contained in:
parent
bc3ff95282
commit
3e4b94e40b
20
util-linux-2.13-mount-sloppy.patch
Normal file
20
util-linux-2.13-mount-sloppy.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- 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)
|
@ -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) {
|
||||
|
49
util-linux-2.13-mount-uhelper.patch
Normal file
49
util-linux-2.13-mount-uhelper.patch
Normal file
@ -0,0 +1,49 @@
|
||||
--- 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. */
|
@ -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 @@ Patch246: util-linux-2.13-nfsmount-fsc.patch
|
||||
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 @@ cp %{SOURCE8} %{SOURCE9} .
|
||||
%patch246 -p1
|
||||
%patch247 -p1
|
||||
%patch248 -p1
|
||||
%patch249 -p1
|
||||
%patch250 -p1
|
||||
|
||||
%build
|
||||
unset LINGUAS || :
|
||||
@ -730,6 +736,12 @@ exit 0
|
||||
/sbin/losetup
|
||||
|
||||
%changelog
|
||||
* Fri Sep 15 2006 Karel Zak <kzak@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@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
|
||||
|
Loading…
Reference in New Issue
Block a user