forked from pool/util-linux
This commit is contained in:
parent
764f46c66a
commit
732374e7df
@ -1,13 +0,0 @@
|
|||||||
Index: hwclock/hwclock.c
|
|
||||||
===================================================================
|
|
||||||
--- hwclock/hwclock.c.orig
|
|
||||||
+++ hwclock/hwclock.c
|
|
||||||
@@ -1480,7 +1480,7 @@ main(int argc, char **argv) {
|
|
||||||
show = 1; /* default to show */
|
|
||||||
|
|
||||||
|
|
||||||
- if (getuid() == 0)
|
|
||||||
+ if (geteuid() == 0)
|
|
||||||
permitted = TRUE;
|
|
||||||
else {
|
|
||||||
/* program is designed to run setuid (in some situations) */
|
|
@ -1,30 +0,0 @@
|
|||||||
Index: mount/mount.c
|
|
||||||
===================================================================
|
|
||||||
--- mount/mount.c.orig
|
|
||||||
+++ mount/mount.c
|
|
||||||
@@ -760,6 +760,25 @@ update_mtab_entry(const char *spec, cons
|
|
||||||
else {
|
|
||||||
mntFILE *mfp;
|
|
||||||
|
|
||||||
+ /* when moving a mount point, we have to make sure the mtab
|
|
||||||
+ * gets updated properly. We get info about the old mount
|
|
||||||
+ * point, copy it to the new mount point, and then delete
|
|
||||||
+ * the old mount point. */
|
|
||||||
+ if (flags & MS_MOVE) {
|
|
||||||
+ const char *olddir = mnt.mnt_fsname;
|
|
||||||
+ struct mntentchn *oldmc = oldmc = getmntfile(olddir);
|
|
||||||
+ if (oldmc != NULL) {
|
|
||||||
+ mnt.mnt_fsname = strdup(oldmc->m.mnt_fsname);
|
|
||||||
+ mnt.mnt_type = oldmc->m.mnt_type;
|
|
||||||
+ mnt.mnt_opts = oldmc->m.mnt_opts;
|
|
||||||
+ mnt.mnt_freq = oldmc->m.mnt_freq;
|
|
||||||
+ mnt.mnt_passno = oldmc->m.mnt_passno;
|
|
||||||
+ }
|
|
||||||
+ update_mtab(olddir, NULL);
|
|
||||||
+ if (oldmc != NULL)
|
|
||||||
+ my_free(olddir);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
lock_mtab();
|
|
||||||
mfp = my_setmntent(MOUNTED, "a+");
|
|
||||||
if (mfp == NULL || mfp->mntent_fp == NULL) {
|
|
@ -1,88 +0,0 @@
|
|||||||
mount/mount.8 | 7 +++++++
|
|
||||||
mount/mount.c | 15 +++++++++++++--
|
|
||||||
mount/mount_constants.h | 3 +++
|
|
||||||
3 files changed, 23 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
Index: util-linux-ng-2.12r+git20070330/mount/mount.8
|
|
||||||
===================================================================
|
|
||||||
--- util-linux-ng-2.12r+git20070330.orig/mount/mount.8
|
|
||||||
+++ util-linux-ng-2.12r+git20070330/mount/mount.8
|
|
||||||
@@ -572,6 +572,10 @@ This option implies the options
|
|
||||||
(unless overridden by subsequent options, as in the option line
|
|
||||||
.BR group,dev,suid ).
|
|
||||||
.TP
|
|
||||||
+.B hotplug
|
|
||||||
+Do not report errors for this device if it doesn't exist.
|
|
||||||
+.BR fcntl (2).
|
|
||||||
+.TP
|
|
||||||
.B mand
|
|
||||||
Allow mandatory locks on this filesystem. See
|
|
||||||
.BR fcntl (2).
|
|
||||||
@@ -602,6 +606,9 @@ Do not allow direct execution of any bin
|
|
||||||
(Until recently it was possible to run binaries anyway using a command like
|
|
||||||
/lib/ld*.so /mnt/binary. This trick fails since Linux 2.4.25 / 2.6.0.)
|
|
||||||
.TP
|
|
||||||
+.B nohotplug
|
|
||||||
+Report an error if the device does not exist.
|
|
||||||
+.TP
|
|
||||||
.B nomand
|
|
||||||
Do not allow mandatory locks on this filesystem.
|
|
||||||
.TP
|
|
||||||
Index: util-linux-ng-2.12r+git20070330/mount/mount.c
|
|
||||||
===================================================================
|
|
||||||
--- util-linux-ng-2.12r+git20070330.orig/mount/mount.c
|
|
||||||
+++ util-linux-ng-2.12r+git20070330/mount/mount.c
|
|
||||||
@@ -174,9 +174,14 @@ static const struct opt_map opt_map[] =
|
|
||||||
{ "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */
|
|
||||||
{ "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */
|
|
||||||
#endif
|
|
||||||
+#ifdef MS_HOTPLUG
|
|
||||||
+ { "hotplug", 0, 0, MS_HOTPLUG }, /* Don't fail if ENOENT on dev */
|
|
||||||
+#endif
|
|
||||||
{ NULL, 0, 0, 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
+static int option_hotplug; /* can not invent our own MS_FLAGS */
|
|
||||||
+
|
|
||||||
static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption,
|
|
||||||
*opt_speed, *opt_comment;
|
|
||||||
|
|
||||||
@@ -269,6 +274,10 @@ parse_opt(const char *opt, int *mask, ch
|
|
||||||
|
|
||||||
for (om = opt_map; om->opt != NULL; om++)
|
|
||||||
if (streq (opt, om->opt)) {
|
|
||||||
+ if (om->mask & MS_HOTPLUG) {
|
|
||||||
+ option_hotplug = 1;
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
if (om->inv)
|
|
||||||
*mask &= ~om->mask;
|
|
||||||
else
|
|
||||||
@@ -985,9 +994,11 @@ retry_nfs:
|
|
||||||
else if (stat (node, &statbuf))
|
|
||||||
error (_("mount: mount point %s is a symbolic link to nowhere"),
|
|
||||||
node);
|
|
||||||
- else if (stat (spec, &statbuf))
|
|
||||||
+ else if (stat (spec, &statbuf)) {
|
|
||||||
+ if (option_hotplug)
|
|
||||||
+ goto out;
|
|
||||||
error (_("mount: special device %s does not exist"), spec);
|
|
||||||
- else {
|
|
||||||
+ } else {
|
|
||||||
errno = mnt_err;
|
|
||||||
perror("mount");
|
|
||||||
}
|
|
||||||
Index: util-linux-ng-2.12r+git20070330/mount/mount_constants.h
|
|
||||||
===================================================================
|
|
||||||
--- util-linux-ng-2.12r+git20070330.orig/mount/mount_constants.h
|
|
||||||
+++ util-linux-ng-2.12r+git20070330/mount/mount_constants.h
|
|
||||||
@@ -57,6 +57,9 @@ if we have a stack or plain mount - moun
|
|
||||||
#ifndef MS_VERBOSE
|
|
||||||
#define MS_VERBOSE 0x8000 /* 32768 */
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
+#define MS_HOTPLUG (1<<18) /* Don't fail if ENOENT on the dev, mount internal */
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* Magic mount flag number. Had to be or-ed to the flag values.
|
|
||||||
*/
|
|
61
util-linux-mount_opt_nofail.patch
Normal file
61
util-linux-mount_opt_nofail.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
Do not fail on ENOENT
|
||||||
|
|
||||||
|
Introduces a new mount option "nofail" which prevents mount
|
||||||
|
to fail if the device does not exist.
|
||||||
|
|
||||||
|
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
|
||||||
|
|
||||||
|
Index: util-linux-ng-2.13-rc1/mount/mount.8
|
||||||
|
===================================================================
|
||||||
|
--- util-linux-ng-2.13-rc1.orig/mount/mount.8
|
||||||
|
+++ util-linux-ng-2.13-rc1/mount/mount.8
|
||||||
|
@@ -625,6 +625,9 @@ access on the news spool to speed up new
|
||||||
|
.B nodiratime
|
||||||
|
Do not update directory inode access times on this filesystem.
|
||||||
|
.TP
|
||||||
|
+.B nofail
|
||||||
|
+Do not report errors for this device if it does not exist.
|
||||||
|
+.TP
|
||||||
|
.B relatime
|
||||||
|
Update inode access times relative to modify or change time. Access
|
||||||
|
time is only updated if the previous access time was earlier than the
|
||||||
|
Index: util-linux-ng-2.13-rc1/mount/mount.c
|
||||||
|
===================================================================
|
||||||
|
--- util-linux-ng-2.13-rc1.orig/mount/mount.c
|
||||||
|
+++ util-linux-ng-2.13-rc1/mount/mount.c
|
||||||
|
@@ -182,9 +182,12 @@ static const struct opt_map opt_map[] =
|
||||||
|
{ "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard
|
||||||
|
to mtime/ctime */
|
||||||
|
#endif
|
||||||
|
+ { "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */
|
||||||
|
{ NULL, 0, 0, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
+static int opt_nofail = 0;
|
||||||
|
+
|
||||||
|
static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption,
|
||||||
|
*opt_speed, *opt_comment, *opt_uhelper;
|
||||||
|
|
||||||
|
@@ -389,6 +392,8 @@ parse_opt(char *opt, int *mask, char **e
|
||||||
|
verbose = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
+ if (streq(opt, "nofail"))
|
||||||
|
+ opt_nofail = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1150,9 +1155,11 @@ try_mount_one (const char *spec0, const
|
||||||
|
else if (stat (node, &statbuf))
|
||||||
|
error (_("mount: mount point %s is a symbolic link to nowhere"),
|
||||||
|
node);
|
||||||
|
- else if (stat (spec, &statbuf))
|
||||||
|
+ else if (stat (spec, &statbuf)) {
|
||||||
|
+ if (opt_nofail)
|
||||||
|
+ goto out;
|
||||||
|
error (_("mount: special device %s does not exist"), spec);
|
||||||
|
- else {
|
||||||
|
+ } else {
|
||||||
|
errno = mnt_err;
|
||||||
|
perror("mount");
|
||||||
|
}
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 13 12:31:56 CEST 2007 - mkoenig@suse.de
|
||||||
|
|
||||||
|
- replace hotplug with nofail option and fix it to not use
|
||||||
|
syscall reserved values.
|
||||||
|
- removed patch
|
||||||
|
util-linux-2.11z-hwclock_geteuid.patch
|
||||||
|
it is intentional that suid hwclock capabilities are limited
|
||||||
|
- removed patch (fixed upstream)
|
||||||
|
util-linux-2.12q-mount_--move.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 9 11:34:33 CEST 2007 - mkoenig@suse.de
|
Mon Jul 9 11:34:33 CEST 2007 - mkoenig@suse.de
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ License: BSD 3-Clause, GPL v2 or later
|
|||||||
Group: System/Base
|
Group: System/Base
|
||||||
Autoreqprov: on
|
Autoreqprov: on
|
||||||
Version: 2.12r+2.13rc1
|
Version: 2.12r+2.13rc1
|
||||||
Release: 4
|
Release: 6
|
||||||
%define upver 2.13-rc1
|
%define upver 2.13-rc1
|
||||||
Summary: A collection of basic system utilities
|
Summary: A collection of basic system utilities
|
||||||
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2
|
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2
|
||||||
@ -53,16 +53,12 @@ Patch1: util-linux-2.12-misc_utils_hostid.patch
|
|||||||
# 27181 (suse12181) - wall adds newlines
|
# 27181 (suse12181) - wall adds newlines
|
||||||
Patch2: util-linux-login_utils_wall.patch
|
Patch2: util-linux-login_utils_wall.patch
|
||||||
Patch5: util-linux-mount_mount.8-acl.patch
|
Patch5: util-linux-mount_mount.8-acl.patch
|
||||||
# geteuid instead of getuid in hwclock to enable making hwclock suid root.
|
|
||||||
Patch6: util-linux-2.11z-hwclock_geteuid.patch
|
|
||||||
# 54436 (suse39436) - boot.swap "failed" activating swap on LVM
|
# 54436 (suse39436) - boot.swap "failed" activating swap on LVM
|
||||||
Patch8: util-linux-2.12a-mount_procswapcheck.patch
|
Patch8: util-linux-2.12a-mount_procswapcheck.patch
|
||||||
# 57097 (suse42097) - mount doesn't allow to mount files that have colons in their path
|
# 57097 (suse42097) - mount doesn't allow to mount files that have colons in their path
|
||||||
Patch10: util-linux-2.12a-mount_mountpointwithcolon.patch
|
Patch10: util-linux-2.12a-mount_mountpointwithcolon.patch
|
||||||
# 104405 - mount -a doesn't work with hotpluggable devices
|
# 104405 - mount -a doesn't work with hotpluggable devices
|
||||||
Patch16: util-linux-mount_opt_hotplug.patch
|
Patch16: util-linux-mount_opt_nofail.patch
|
||||||
# 115129 - mount --move doesn't work as expected
|
|
||||||
Patch18: util-linux-2.12q-mount_--move.patch
|
|
||||||
Patch21: util-linux-2.12q-mount_umount2_not_static.patch
|
Patch21: util-linux-2.12q-mount_umount2_not_static.patch
|
||||||
# 148409 - df, mount, /proc/mounts show root mounted twice
|
# 148409 - df, mount, /proc/mounts show root mounted twice
|
||||||
# TODO: Needs fix, because of 231599
|
# TODO: Needs fix, because of 231599
|
||||||
@ -124,11 +120,9 @@ Authors:
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch5 -p0
|
%patch5 -p0
|
||||||
%patch6
|
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
%patch16 -p1
|
%patch16 -p1
|
||||||
%patch18
|
|
||||||
%patch21
|
%patch21
|
||||||
%patch22
|
%patch22
|
||||||
%patch26
|
%patch26
|
||||||
@ -577,6 +571,14 @@ fi
|
|||||||
#%endif
|
#%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 13 2007 - mkoenig@suse.de
|
||||||
|
- replace hotplug with nofail option and fix it to not use
|
||||||
|
syscall reserved values.
|
||||||
|
- removed patch
|
||||||
|
util-linux-2.11z-hwclock_geteuid.patch
|
||||||
|
it is intentional that suid hwclock capabilities are limited
|
||||||
|
- removed patch (fixed upstream)
|
||||||
|
util-linux-2.12q-mount_--move.patch
|
||||||
* Mon Jul 09 2007 - mkoenig@suse.de
|
* Mon Jul 09 2007 - mkoenig@suse.de
|
||||||
- add libuuid-devel to BuildRequires to let mkswap use UUIDs
|
- add libuuid-devel to BuildRequires to let mkswap use UUIDs
|
||||||
* Thu Jul 05 2007 - mkoenig@suse.de
|
* Thu Jul 05 2007 - mkoenig@suse.de
|
||||||
|
Loading…
Reference in New Issue
Block a user