rpms/util-linux-ng/devel util-linux-ng-2.13-mount-LU.patch, NONE, 1.1 util-linux-ng-2.13-script-SIGWINCH.patch, NONE, 1.1 util-linux-ng.spec, 1.11, 1.12
Karel Zak (kzak)
fedora-extras-commits at redhat.com
Tue Oct 16 20:24:56 UTC 2007
Author: kzak
Update of /cvs/pkgs/rpms/util-linux-ng/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20882
Modified Files:
util-linux-ng.spec
Added Files:
util-linux-ng-2.13-mount-LU.patch
util-linux-ng-2.13-script-SIGWINCH.patch
Log Message:
* Tue Oct 16 2007 Karel Zak <kzak at redhat.com> 2.13-3
- fix mount -L | -U segfault
- fix script die on SIGWINCH
util-linux-ng-2.13-mount-LU.patch:
--- NEW FILE util-linux-ng-2.13-mount-LU.patch ---
>From 53ca67faf2aa1d742119c3510ef5064e0761ed90 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak at redhat.com>
Date: Thu, 11 Oct 2007 16:18:29 +0200
Subject: [PATCH] mount: -L|-U segfault when label or uuid doesn't exist
# mount -L foo
Segmentation fault
mount(8) calls strcmp() with NULL argument.
Signed-off-by: Karel Zak <kzak at redhat.com>
---
mount/mount.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/mount/mount.c b/mount/mount.c
index 5bc2b30..96776db 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -1699,6 +1699,9 @@ getfs(const char *spec, const char *uuid, const char *label)
struct mntentchn *mc = NULL;
const char *devname = NULL;
+ if (!spec && !uuid && !label)
+ return NULL;
+
/*
* A) 99% of all cases, the spec on cmdline matches
* with spec in fstab
@@ -1761,7 +1764,7 @@ getfs(const char *spec, const char *uuid, const char *label)
* Earlier mtab was tried first, but this would sometimes try the
* wrong mount in case mtab had the root device entry wrong.
*/
- if (!mc)
+ if (!mc && (devname || spec))
mc = getmntfile (devname ? devname : spec);
if (devname)
@@ -1981,12 +1984,17 @@ main(int argc, char *argv[]) {
case 1:
/* mount [-nfrvw] [-o options] special | node
+ * mount -L label (or -U uuid)
* (/etc/fstab is necessary)
*/
if (types != NULL)
usage (stderr, EX_USAGE);
- mc = getfs(*argv, uuid, label);
+ if (uuid || label)
+ mc = getfs(NULL, uuid, label);
+ else
+ mc = getfs(*argv, NULL, NULL);
+
if (!mc) {
if (uuid || label)
die (EX_USAGE, _("mount: no such partition found"));
--
1.5.3.1
util-linux-ng-2.13-script-SIGWINCH.patch:
--- NEW FILE util-linux-ng-2.13-script-SIGWINCH.patch ---
>From 1b1ff2d6edd2db321926f7243004937cb26f9f15 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak at redhat.com>
Date: Fri, 5 Oct 2007 12:22:13 +0200
Subject: [PATCH] script: dies on SIGWINCH
The "doinput" process doesn't make a difference between SIGWINCH and
SIGCHILD. This process also sends unnecessary SIGWINCH to child (the
signal is ignored by child). Fixed.
Signed-off-by: Karel Zak <kzak at redhat.com>
---
misc-utils/script.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/misc-utils/script.c b/misc-utils/script.c
index d3272df..3b957d8 100644
--- a/misc-utils/script.c
+++ b/misc-utils/script.c
@@ -99,6 +99,7 @@ int tflg = 0;
static char *progname;
int die;
+int resized;
static void
die_if_link(char *fn) {
@@ -235,8 +236,14 @@ doinput() {
if (die == 0 && child && kill(child, 0) == -1 && errno == ESRCH)
die = 1;
- while (die == 0 && (cc = read(0, ibuf, BUFSIZ)) > 0)
- (void) write(master, ibuf, cc);
+ while (die == 0) {
+ if ((cc = read(0, ibuf, BUFSIZ)) > 0)
+ (void) write(master, ibuf, cc);
+ else if (cc == -1 && errno == EINTR && resized)
+ resized = 0;
+ else
+ break;
+ }
done();
}
@@ -255,11 +262,10 @@ finish(int dummy) {
void
resize(int dummy) {
+ resized = 1;
/* transmit window change information to the child */
(void) ioctl(0, TIOCGWINSZ, (char *)&win);
(void) ioctl(slave, TIOCSWINSZ, (char *)&win);
-
- kill(child, SIGWINCH);
}
/*
--
1.5.3.1
Index: util-linux-ng.spec
===================================================================
RCS file: /cvs/pkgs/rpms/util-linux-ng/devel/util-linux-ng.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- util-linux-ng.spec 4 Oct 2007 14:23:14 -0000 1.11
+++ util-linux-ng.spec 16 Oct 2007 20:24:23 -0000 1.12
@@ -2,7 +2,7 @@
Summary: A collection of basic system utilities
Name: util-linux-ng
Version: 2.13
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain
Group: System Environment/Base
URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng
@@ -106,6 +106,11 @@
# remove partitions
Patch12: util-linux-ng-2.13-blockdev-rmpart.patch
+# mount -L | -U segfault (upstream patch)
+Patch13: util-linux-ng-2.13-mount-LU.patch
+# script die on SIGWINCH (upstream patch)
+Patch14: util-linux-ng-2.13-script-SIGWINCH.patch
+
%description
The util-linux-ng package contains a large variety of low-level system
@@ -130,6 +135,8 @@
%patch10 -p1
%patch11 -p1
%patch12 -p1
+%patch13 -p1
+%patch14 -p1
%build
unset LINGUAS || :
@@ -526,6 +533,10 @@
/sbin/losetup
%changelog
+* Tue Oct 16 2007 Karel Zak <kzak at redhat.com> 2.13-3
+- fix mount -L | -U segfault
+- fix script die on SIGWINCH
+
* Thu Oct 4 2007 Karel Zak <kzak at redhat.com> 2.13-2
- update to the latest upstream stable branch
More information about the fedora-extras-commits
mailing list