[util-linux-ng] - fix #615719 - tmpfs mount fails with 'user' option. - fix #598631 - shutdown, reboot, halt and C-A
kzak
kzak at fedoraproject.org
Thu Aug 5 09:48:54 UTC 2010
commit ad6c4cead9151213db5306321fa37087d73ed2d2
Author: kzak <kzak at fedoraproject.org>
Date: Tue Jul 20 08:38:50 2010 +0000
- fix #615719 - tmpfs mount fails with 'user' option.
- fix #598631 - shutdown, reboot, halt and C-A-D don't work
mount.tmpfs | 18 ++++++++++++++++++
util-linux-ng-2.17-agetty-clocal.patch | 30 ++++++++++++++++++++++++++++++
util-linux-ng.spec | 12 +++++++++++-
3 files changed, 59 insertions(+), 1 deletions(-)
---
diff --git a/mount.tmpfs b/mount.tmpfs
index c0862eb..4fc7e60 100644
--- a/mount.tmpfs
+++ b/mount.tmpfs
@@ -18,6 +18,24 @@ case $1 in
;;
esac
+restricted=1
+ruid=$(id --user --real)
+euid=$(id --user)
+
+if [ $ruid -eq 0 ] && [ $ruid -eq $euid ]; then
+ restricted=0
+fi
+
+# mount(8) in restricted mode (for non-root users) does not allow to use any
+# mount options, types or so on command line. We have to call mount(8) with
+# mountpoint only. All necessary options have to be defined in /etc/fstab.
+#
+# https://bugzilla.redhat.com/show_bug.cgi?id=615719
+#
+if [ $restricted -eq 1 ]; then
+ exec /bin/mount -i "$2"
+fi
+
# Remount with context mount options is unsupported
# http://bugzilla.redhat.com/show_bug.cgi?id=563267
#
diff --git a/util-linux-ng-2.17-agetty-clocal.patch b/util-linux-ng-2.17-agetty-clocal.patch
new file mode 100644
index 0000000..9429a23
--- /dev/null
+++ b/util-linux-ng-2.17-agetty-clocal.patch
@@ -0,0 +1,30 @@
+From 9fcaa8826c180273829cf03e5fe34e08daef721f Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Mon, 12 Jul 2010 11:57:55 +0200
+Subject: [PATCH] aggety: don't wipe CLOCAL flag
+
+gettey should not clear the flag. It seems that the flag is
+automatically enabled for serial consoles tht don't use CD signal.
+
+Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=598631
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ login-utils/agetty.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/login-utils/agetty.c b/login-utils/agetty.c
+index 39a1fd3..0cb00db 100644
+--- a/login-utils/agetty.c
++++ b/login-utils/agetty.c
+@@ -706,7 +706,7 @@ termio_init(tp, speed, op)
+ /* flush input and output queues, important for modems! */
+ (void) tcflush(0, TCIOFLUSH);
+
+- tp->c_cflag = CS8 | HUPCL | CREAD;
++ tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL);
+ cfsetispeed(tp, speed);
+ cfsetospeed(tp, speed);
+ if (op->flags & F_LOCAL) {
+--
+1.6.6.1
+
diff --git a/util-linux-ng.spec b/util-linux-ng.spec
index 186d248..ed242b1 100644
--- a/util-linux-ng.spec
+++ b/util-linux-ng.spec
@@ -2,7 +2,7 @@
Summary: A collection of basic system utilities
Name: util-linux-ng
Version: 2.18
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain
Group: System Environment/Base
URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng
@@ -107,6 +107,11 @@ Patch7: util-linux-ng-2.13-login-lastlog.patch
# 231192 - ipcs is not printing correct values on pLinux
Patch8: util-linux-ng-2.15-ipcs-32bit.patch
+### Upstream Patches
+###
+# 598631 - shutdown, reboot, halt and C-A-D don't work
+Patch9: util-linux-ng-2.17-agetty-clocal.patch
+
%description
The util-linux-ng package contains a large variety of low-level system
utilities that are necessary for a Linux system to function. Among
@@ -220,6 +225,7 @@ cp %{SOURCE8} %{SOURCE9} .
%patch5 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p1
%build
unset LINGUAS || :
@@ -756,6 +762,10 @@ fi
%changelog
+* Mon Aug 2 2010 Karel Zak <kzak at redhat.com> 2.18-2
+- fix #615719 - tmpfs mount fails with 'user' option.
+- fix #598631 - shutdown, reboot, halt and C-A-D don't work
+
* Wed Jun 30 2010 Karel Zak <kzak at redhat.com> 2.18-1
- upgrade to the final 2.18
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/v2.18-ReleaseNotes
More information about the scm-commits
mailing list