rpms/util-linux/FC-4 util-linux-2.12p-ipcs-shmax.patch, NONE, 1.1 util-linux-2.12p-login-hang.patch, NONE, 1.1 util-linux-2.12p-mount-twiceloop.patch, NONE, 1.1 util-linux.spec, 1.88, 1.89
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Jan 3 16:53:28 UTC 2006
Author: kzak
Update of /cvs/dist/rpms/util-linux/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv3786
Modified Files:
util-linux.spec
Added Files:
util-linux-2.12p-ipcs-shmax.patch
util-linux-2.12p-login-hang.patch
util-linux-2.12p-mount-twiceloop.patch
Log Message:
backport devel patches and fix the mount
util-linux-2.12p-ipcs-shmax.patch:
ipcs.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletion(-)
--- NEW FILE util-linux-2.12p-ipcs-shmax.patch ---
--- util-linux-2.12p/sys-utils/ipcs.c.shmax 2006-01-03 17:44:06.000000000 +0100
+++ util-linux-2.12p/sys-utils/ipcs.c 2006-01-03 17:44:24.000000000 +0100
@@ -280,8 +280,14 @@
(unsigned long) shminfo.shmmni);
printf (_("max seg size (kbytes) = %lu\n"),
(unsigned long) (shminfo.shmmax >> 10));
+
+ /* max shmem = pagesize * shminfo.shmall / 1024
+ *
+ * note: that "shminfo.shmall * getpagesize()" is greater than ULONG_MAX (32bit)
+ * it means that better is "/" before "*" or use "long long"
+ */
printf (_("max total shared memory (kbytes) = %lu\n"),
- (getpagesize()*((unsigned long) shminfo.shmall))/1024UL);
+ getpagesize()/1024 * (unsigned long) shminfo.shmall);
printf (_("min seg size (bytes) = %lu\n"),
(unsigned long) shminfo.shmmin);
return;
util-linux-2.12p-login-hang.patch:
login.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
--- NEW FILE util-linux-2.12p-login-hang.patch ---
--- util-linux-2.12p/login-utils/login.c.hang 2006-01-03 17:40:09.000000000 +0100
+++ util-linux-2.12p/login-utils/login.c 2006-01-03 17:41:03.000000000 +0100
@@ -281,7 +281,8 @@
if (lstat(ttyn, &statbuf)
|| !S_ISCHR(statbuf.st_mode)
- || (statbuf.st_nlink > 1 && strncmp(ttyn, "/dev/", 5))) {
+ || (statbuf.st_nlink > 1 && strncmp(ttyn, "/dev/", 5))
+ || (access(ttyn, R_OK | W_OK) != 0)) {
syslog(LOG_ERR, _("FATAL: bad tty"));
sleep(1);
exit(1);
@@ -392,6 +393,7 @@
pid = getpid();
signal(SIGALRM, timedout);
+ siginterrupt(SIGALRM,1); /* we have to interrupt syscalls like ioclt() */
alarm((unsigned int)timeout);
signal(SIGQUIT, SIG_IGN);
signal(SIGINT, SIG_IGN);
util-linux-2.12p-mount-twiceloop.patch:
fstab.c | 21 +++++++++++++++++++++
mount.c | 9 +++++++--
2 files changed, 28 insertions(+), 2 deletions(-)
--- NEW FILE util-linux-2.12p-mount-twiceloop.patch ---
--- util-linux-2.12p/mount/fstab.c.twiceloop 2006-01-03 13:02:26.000000000 +0100
+++ util-linux-2.12p/mount/fstab.c 2006-01-03 16:52:42.000000000 +0100
@@ -257,6 +257,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) {
--- util-linux-2.12p/mount/mount.c.twiceloop 2006-01-03 16:39:42.000000000 +0100
+++ util-linux-2.12p/mount/mount.c 2006-01-03 17:01:38.000000000 +0100
@@ -671,7 +671,7 @@
static int
loop_check(const char **spec, const char **type, int *flags,
- int *loop, const char **loopdev, const char **loopfile) {
+ int *loop, const char **loopdev, const char **loopfile, const char *dir) {
int looptype;
unsigned long long offset;
@@ -709,6 +709,11 @@
} else {
int loopro = (*flags & MS_RDONLY);
+ if (is_mounted_same_loopfile(*loopfile, dir)) {
+ error(_("mount: %s already mounted on %s"), *loopfile, dir);
+ return EX_FAIL;
+ }
+
if (!*loopdev || !**loopdev)
*loopdev = find_unused_loop_device();
if (!*loopdev)
@@ -856,7 +861,7 @@
* stale assignments of files to loop devices. Nasty when used for
* encryption.
*/
- res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile);
+ res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile, node);
if (res)
goto out;
}
Index: util-linux.spec
===================================================================
RCS file: /cvs/dist/rpms/util-linux/FC-4/util-linux.spec,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- util-linux.spec 2 Jan 2006 17:02:14 -0000 1.88
+++ util-linux.spec 3 Jan 2006 16:53:25 -0000 1.89
@@ -27,7 +27,7 @@
Summary: A collection of basic system utilities.
Name: util-linux
Version: 2.12p
-Release: 9.12
+Release: 9.13
License: distributable
Group: System Environment/Base
@@ -149,11 +149,17 @@
Patch207: util-linux-2.12p-umount-remount.patch
# 155559 - /usr/bin/floppy doesn't work with generic device
Patch208: util-linux-2.12p-floppy-generic.patch
-
# better wide chars usage in the cal command (based on old 'moremisc' patch)
Patch209: util-linux-2.12p-cal-wide.patch
# 176441: col truncates data
Patch210: util-linux-2.12p-col-EILSEQ.patch
+# 174111 - mount allows loopback devices to be mounted more than once to the same mount point
+Patch211: util-linux-2.12p-mount-twiceloop.patch
+# 168436 - login will attempt to run if it has no read/write access to its terminal
+# 168434 - login's timeout can fail - needs to call siginterrupt(SIGALRM,1)
+Patch212: util-linux-2.12p-login-hang.patch
+# 170171 - ipcs -lm always report "max total shared memory (kbytes) = 0"
+Patch213: util-linux-2.12p-ipcs-shmax.patch
# When adding patches, please make sure that it is easy to find out what bug # the
# patch fixes.
@@ -251,8 +257,8 @@
%patch151 -p1
%patch153 -p1
-%patch157 -p1 -b .pamstart
-%patch159 -p1 -b .console
+%patch157 -p1
+%patch159 -p1
%if %{include_raw}
%patch160 -p1
@@ -264,15 +270,15 @@
#%patch168 -p1
%patch169 -p1
-%patch170 -p1 -b .nfsv4
+%patch170 -p1
%patch171 -p1
%patch172 -p1
%patch173 -p1
%patch174 -p1
-%patch180 -p1 -b .lastlog
+%patch180 -p1
%patch181 -p1
-%patch182 -p1 -b .typo
+%patch182 -p1
%patch183 -p1
%patch184 -p1
@@ -283,15 +289,18 @@
%patch189 -p1
%patch200 -p1
%patch201 -p1
-%patch202 -p1 -b .audit
-%patch203 -p1 -b .gpt
+%patch202 -p1
+%patch203 -p1
%patch204 -p1
%patch205 -p1
%patch206 -p1
%patch207 -p1
-%patch208 -p1 -b .generic
+%patch208 -p1
%patch209 -p1
-%patch210 -p1 -b .EILSEQ
+%patch210 -p1
+%patch211 -p1
+%patch212 -p1
+%patch213 -p1
%build
unset LINGUAS || :
@@ -683,6 +692,14 @@
/sbin/losetup
%changelog
+* Tue Jan 3 2006 Karel Zak <kzak at redhat.com> 2.12p-9.13
+- fix #174111 - mount allows loopback devices to be mounted more than once to the same mount point
+- fix #176441: col truncates data
+- fix #168436 - login will attempt to run if it has no read/write access to its terminal
+- fix #168434 - login's timeout can fail - needs to call siginterrupt(SIGALRM,1)
+- fix #170171 - ipcs -lm always report "max total shared memory (kbytes) = 0"
+- better wide chars usage in the cal command (based on old 'moremisc' patch)
+
* Fri Sep 30 2005 Karel Zak <kzak at redhat.com> 2.12p-9.12
- fix #155559 - /usr/bin/floppy doesn't work with generic device
More information about the fedora-cvs-commits
mailing list