From eaacfe3363755ef351d641355c2c1bdebd3d78f8 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 20 Oct 2007 18:37:21 +0000 Subject: [PATCH 1/9] Initialize branch F-8 for util-linux-ng --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..e9e7ccd --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-8 From 87a4e2a580be474bb0ce2b7063e8f21d2bc5c9c0 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 5 Dec 2007 12:48:15 +0000 Subject: [PATCH 2/9] - fix #409551 - hwclock: check for ENODEV (upstream patch) - fix #408391 - setarch: add missing alpha subarchs (upstream patch) - mkswap: possible to crash with SELinux relabeling support (upstream patch) - mount: don't call canonicalize(SPEC) for cifs, smbfs and nfs (upstream patch) --- util-linux-ng-2.13-hwclock-ENODEV.patch | 36 +++++++++++ util-linux-ng-2.13-mkswap-selinux.patch | 53 +++++++++++++++ util-linux-ng-2.13-mount-canonicalize.patch | 72 +++++++++++++++++++++ util-linux-ng-2.13-setarch-alpha.patch | 29 +++++++++ util-linux-ng.spec | 22 ++++++- 5 files changed, 210 insertions(+), 2 deletions(-) create mode 100644 util-linux-ng-2.13-hwclock-ENODEV.patch create mode 100644 util-linux-ng-2.13-mkswap-selinux.patch create mode 100644 util-linux-ng-2.13-mount-canonicalize.patch create mode 100644 util-linux-ng-2.13-setarch-alpha.patch diff --git a/util-linux-ng-2.13-hwclock-ENODEV.patch b/util-linux-ng-2.13-hwclock-ENODEV.patch new file mode 100644 index 0000000..295ee68 --- /dev/null +++ b/util-linux-ng-2.13-hwclock-ENODEV.patch @@ -0,0 +1,36 @@ +From 833dd2913e940a9ce4589730086b124697e92d7a Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Tue, 4 Dec 2007 14:44:05 +0100 +Subject: [PATCH] hwclock: check for ENODEV + +/sbin/hwclock is supposed to fall back to using /dev/rtc0 if /dev/rtc isn't +working (which it isn't, because mkinitrd creates it with the old device +numbers, and we're switching to the new RTC_CLASS driver). + +Unfortunately, it'll only cope if the error it gets is ENOENT (i.e. the device +node doesn't exist). It doesn't fall back to the next device in the list if the +error is ENODEV, which is what happens when the device node exists, but there's +no driver. + +Signed-off-by: David Woodhouse +Signed-off-by: Karel Zak +--- + hwclock/rtc.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/hwclock/rtc.c b/hwclock/rtc.c +index 724daf9..46a5b52 100644 +--- a/hwclock/rtc.c ++++ b/hwclock/rtc.c +@@ -113,7 +113,7 @@ open_rtc(void) { + for (p=fls; *p; ++p) { + int fd = open(*p, O_RDONLY); + +- if (fd < 0 && errno == ENOENT) ++ if (fd < 0 && (errno == ENOENT || errno == ENODEV)) + continue; + rtc_dev_name = *p; + return fd; +-- +1.5.3.1 + diff --git a/util-linux-ng-2.13-mkswap-selinux.patch b/util-linux-ng-2.13-mkswap-selinux.patch new file mode 100644 index 0000000..f0db803 --- /dev/null +++ b/util-linux-ng-2.13-mkswap-selinux.patch @@ -0,0 +1,53 @@ +From fb2da4155d099aad2c9da2eecd138a7668975667 Mon Sep 17 00:00:00 2001 +From: KaiGai Kohei +Date: Mon, 22 Oct 2007 10:30:19 +0200 +Subject: [PATCH] mkswap: possible to crash with SELinux relabeling support + +When fgetfilecon() is failed with -ENODATA, this process does not +exit. However, "oldcontext" is not initialized in this case, so +context_new() will be called with uninitialized "oldcontext" at the +next. + +Finally, it makes a segmentation fault, because context_new() have to +refer an incorrect memory region. + +The attached patch fixes this matter using matchpathcon(). If we +cannot obtain actual file context due to -ENODATA, a context which is +returned by matchpathcon() is applied as oldcontext. Then, the type +of the context is relabeled to "swapfile_t" explicitly. + +Signed-off-by: KaiGai Kohei +Signed-off-by: Karel Zak +--- + disk-utils/mkswap.c | 15 +++++++++------ + 1 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c +index 6af1ff7..2394368 100644 +--- a/disk-utils/mkswap.c ++++ b/disk-utils/mkswap.c +@@ -738,12 +738,15 @@ the -f option to force it.\n"), + security_context_t oldcontext; + context_t newcontext; + +- if ((fgetfilecon(DEV, &oldcontext) < 0) && +- (errno != ENODATA)) { +- fprintf(stderr, _("%s: %s: unable to obtain selinux file label: %s\n"), +- program_name, device_name, +- strerror(errno)); +- exit(1); ++ if (fgetfilecon(DEV, &oldcontext) < 0) { ++ if (errno != ENODATA) { ++ fprintf(stderr, _("%s: %s: unable to obtain selinux file label: %s\n"), ++ program_name, device_name, ++ strerror(errno)); ++ exit(1); ++ } ++ if (matchpathcon(device_name, statbuf.st_mode, &oldcontext)) ++ die(_("unable to matchpathcon()")); + } + if (!(newcontext = context_new(oldcontext))) + die(_("unable to create new selinux context")); +-- +1.5.3.1 + diff --git a/util-linux-ng-2.13-mount-canonicalize.patch b/util-linux-ng-2.13-mount-canonicalize.patch new file mode 100644 index 0000000..8a2dbca --- /dev/null +++ b/util-linux-ng-2.13-mount-canonicalize.patch @@ -0,0 +1,72 @@ +From cd93e3f76272de50592a0eb7c343c65a803ef6d5 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 21 Nov 2007 01:46:57 +0100 +Subject: [PATCH] mount: don't call canonicalize(SPEC) for cifs, smbfs and nfs + +When calling "mount -t smbfs //foo/bar /mnt/foo", mount.smbfs will be +called with /foo/bar if /foo/bar exists locally, and will display its +usage. + +The patch also removes duplicate canonicalize() from mounted() +function. + +Reported-By: Pascal Terjan +Signed-off-by: Karel Zak +--- + mount/mount.c | 21 ++++++++++++--------- + 1 files changed, 12 insertions(+), 9 deletions(-) + +diff --git a/mount/mount.c b/mount/mount.c +index 96776db..7e3336a 100644 +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -1385,11 +1385,6 @@ mount_one (const char *spec, const char *node, const char *types, + /* Merge the fstab and command line options. */ + opts = append_opt(opts, cmdlineopts, NULL); + +- /* Handle possible LABEL= and UUID= forms of spec */ +- nspec = fsprobe_get_devname_for_mounting(spec); +- if (nspec) +- spec = nspec; +- + if (types == NULL && !mounttype && !is_existing_file(spec)) { + if (strchr (spec, ':') != NULL) { + types = "nfs"; +@@ -1406,6 +1401,15 @@ mount_one (const char *spec, const char *node, const char *types, + } + } + ++ /* Handle possible LABEL= and UUID= forms of spec */ ++ if (types == NULL || (strncmp(types, "nfs", 3) && ++ strncmp(types, "cifs", 4) && ++ strncmp(types, "smbfs", 5))) { ++ nspec = fsprobe_get_devname_for_mounting(spec); ++ if (nspec) ++ spec = nspec; ++ } ++ + /* + * Try to mount the file system. When the exit status is EX_BG, + * we will retry in the background. Otherwise, we're done. +@@ -1439,15 +1443,14 @@ mount_one (const char *spec, const char *node, const char *types, + static int + mounted (const char *spec0, const char *node0) { + struct mntentchn *mc, *mc0; +- char *spec, *node; ++ const char *spec, *node; + int ret = 0; + + /* Handle possible UUID= and LABEL= in spec */ +- spec0 = fsprobe_get_devname(spec0); +- if (!spec0) ++ spec = fsprobe_get_devname(spec0); ++ if (!spec) + return ret; + +- spec = canonicalize(spec0); + node = canonicalize(node0); + + mc0 = mtab_head(); +-- +1.5.3.1 + diff --git a/util-linux-ng-2.13-setarch-alpha.patch b/util-linux-ng-2.13-setarch-alpha.patch new file mode 100644 index 0000000..240798f --- /dev/null +++ b/util-linux-ng-2.13-setarch-alpha.patch @@ -0,0 +1,29 @@ +From adf88e666acdd05da134bca50fb52daedb7b8952 Mon Sep 17 00:00:00 2001 +From: Oliver Falk +Date: Mon, 3 Dec 2007 13:34:42 +0100 +Subject: [PATCH] setarch: add missing alpha subarchs + +Signed-off-by: Oliver Falk +Signed-off-by: Karel Zak +--- + sys-utils/setarch.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c +index a544853..aa7c810 100644 +--- a/sys-utils/setarch.c ++++ b/sys-utils/setarch.c +@@ -167,6 +167,10 @@ int set_arch(const char *pers, unsigned long options) + #endif + #if defined(__alpha__) + {PER_LINUX, "alpha", "alpha"}, ++ {PER_LINUX, "alphaev5", "alpha"}, ++ {PER_LINUX, "alphaev56", "alpha"}, ++ {PER_LINUX, "alphaev6", "alpha"}, ++ {PER_LINUX, "alphaev67", "alpha"}, + #endif + {-1, NULL, NULL} + }; +-- +1.5.3.1 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 385bd7f..54e7840 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.13 -Release: 3%{?dist} +Release: 4%{?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 @@ -97,7 +97,7 @@ Patch7: util-linux-ng-2.13-fdisk-b-4096.patch # 231192 - ipcs is not printing correct values on pLinux Patch8: util-linux-ng-2.13-ipcs-32bit.patch # 174111 - mount allows loopback devices to be mounted more than once to the -# same mount point (move to upstream?) +# same mount point Patch9: util-linux-ng-2.13-mount-twiceloop.patch # 165863 - swsusp swaps should be reinitialized Patch10: util-linux-ng-2.13-swapon-swsuspend.patch @@ -110,6 +110,14 @@ Patch12: util-linux-ng-2.13-blockdev-rmpart.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 +# hwclock: check for ENODEV (upstream patch) +Patch15: util-linux-ng-2.13-hwclock-ENODEV.patch +# mkswap: possible to crash with SELinux relabeling support (upstream patch) +Patch16: util-linux-ng-2.13-mkswap-selinux.patch +# mount: don't call canonicalize(SPEC) for cifs, smbfs and nfs (upstream patch) +Patch17: util-linux-ng-2.13-mount-canonicalize.patch +# setarch: add missing alpha subarchs (upstream patch) +Patch18: util-linux-ng-2.13-setarch-alpha.patch %description @@ -137,6 +145,10 @@ cp %{SOURCE8} %{SOURCE9} . %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 %build unset LINGUAS || : @@ -533,6 +545,12 @@ exit 0 /sbin/losetup %changelog +* Wed Dec 5 2007 Karel Zak 2.13-4 +- fix #409551 - hwclock: check for ENODEV (upstream patch) +- fix #408391 - setarch: add missing alpha subarchs (upstream patch) +- mkswap: possible to crash with SELinux relabeling support (upstream patch) +- mount: don't call canonicalize(SPEC) for cifs, smbfs and nfs (upstream patch) + * Tue Oct 16 2007 Karel Zak 2.13-3 - fix mount -L | -U segfault - fix script die on SIGWINCH From 818991aa173284c32418dcdabe61868fd854dd0e Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 5 Dec 2007 12:55:31 +0000 Subject: [PATCH 3/9] fix Release: --- util-linux-ng.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 54e7840..333a03a 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.13 -Release: 4%{?dist} +Release: 3.1%{?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 @@ -545,7 +545,7 @@ exit 0 /sbin/losetup %changelog -* Wed Dec 5 2007 Karel Zak 2.13-4 +* Wed Dec 5 2007 Karel Zak 2.13-3.1 - fix #409551 - hwclock: check for ENODEV (upstream patch) - fix #408391 - setarch: add missing alpha subarchs (upstream patch) - mkswap: possible to crash with SELinux relabeling support (upstream patch) From a2d14ed040eef81f72212ef5df5ff32b8294b0c2 Mon Sep 17 00:00:00 2001 From: kzak Date: Thu, 3 Jan 2008 21:59:09 +0000 Subject: [PATCH 4/9] - fix #427207 - util-linux-ng-2.13-3.1.fc8.src.rpm not rebuilded --- util-linux-ng.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 333a03a..c03e465 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.13 -Release: 3.1%{?dist} +Release: 3.2%{?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 @@ -263,7 +263,7 @@ rm -f $RPM_BUILD_ROOT/usr/{bin,sbin}/{fdformat,tunelp,floppy} $RPM_BUILD_ROOT%{_ %endif # deprecated commands -for I in /sbin/fsck.minix /sbin/mkfs.{bfs,minix} /sbin/sln \ +for I in /sbin/fsck.minix /sbin/mkfs.{bfs,minix} /sbin/sln /usr/bin/floppygtk \ /usr/bin/chkdupexe %{_bindir}/line %{_bindir}/pg %{_bindir}/newgrp \ /sbin/shutdown %{_bindir}/scriptreplay; do rm -f $RPM_BUILD_ROOT$I @@ -545,6 +545,9 @@ exit 0 /sbin/losetup %changelog +* Thu Jan 3 2008 Karel Zak 2.13-3.2 +- fix #427207 - util-linux-ng-2.13-3.1.fc8.src.rpm not rebuilded + * Wed Dec 5 2007 Karel Zak 2.13-3.1 - fix #409551 - hwclock: check for ENODEV (upstream patch) - fix #408391 - setarch: add missing alpha subarchs (upstream patch) From 2c6cd6722cc9346609952493069f020c7bde3c97 Mon Sep 17 00:00:00 2001 From: kzak Date: Wed, 16 Jan 2008 13:39:20 +0000 Subject: [PATCH 5/9] - upgrade to stable util-linux-ng 2.13.1 - fix #427874 - util-linux-ng gets "excess command line argument" on update --- .cvsignore | 2 +- sources | 2 +- util-linux-ng-2.13-hwclock-ENODEV.patch | 36 ----------- util-linux-ng-2.13-mkswap-selinux.patch | 53 --------------- util-linux-ng-2.13-mount-canonicalize.patch | 72 --------------------- util-linux-ng-2.13-script-SIGWINCH.patch | 59 ----------------- util-linux-ng-2.13-setarch-alpha.patch | 29 --------- util-linux-ng.spec | 35 +++------- 8 files changed, 11 insertions(+), 277 deletions(-) delete mode 100644 util-linux-ng-2.13-hwclock-ENODEV.patch delete mode 100644 util-linux-ng-2.13-mkswap-selinux.patch delete mode 100644 util-linux-ng-2.13-mount-canonicalize.patch delete mode 100644 util-linux-ng-2.13-script-SIGWINCH.patch delete mode 100644 util-linux-ng-2.13-setarch-alpha.patch diff --git a/.cvsignore b/.cvsignore index a9b8f24..6837dd2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ floppy-0.16.tar.bz2 -util-linux-ng-2.13-20071004git.tar.bz2 +util-linux-ng-2.13.1.tar.bz2 diff --git a/sources b/sources index 9056518..6e1d8d9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 7eeb9a6f7a258174bf0fa80f1370788d floppy-0.16.tar.bz2 -1fefa573d23d2e365592d00d1f9bd3a6 util-linux-ng-2.13-20071004git.tar.bz2 +424badc1832e4b5291a2ec04e9e244f4 util-linux-ng-2.13.1.tar.bz2 diff --git a/util-linux-ng-2.13-hwclock-ENODEV.patch b/util-linux-ng-2.13-hwclock-ENODEV.patch deleted file mode 100644 index 295ee68..0000000 --- a/util-linux-ng-2.13-hwclock-ENODEV.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 833dd2913e940a9ce4589730086b124697e92d7a Mon Sep 17 00:00:00 2001 -From: David Woodhouse -Date: Tue, 4 Dec 2007 14:44:05 +0100 -Subject: [PATCH] hwclock: check for ENODEV - -/sbin/hwclock is supposed to fall back to using /dev/rtc0 if /dev/rtc isn't -working (which it isn't, because mkinitrd creates it with the old device -numbers, and we're switching to the new RTC_CLASS driver). - -Unfortunately, it'll only cope if the error it gets is ENOENT (i.e. the device -node doesn't exist). It doesn't fall back to the next device in the list if the -error is ENODEV, which is what happens when the device node exists, but there's -no driver. - -Signed-off-by: David Woodhouse -Signed-off-by: Karel Zak ---- - hwclock/rtc.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/hwclock/rtc.c b/hwclock/rtc.c -index 724daf9..46a5b52 100644 ---- a/hwclock/rtc.c -+++ b/hwclock/rtc.c -@@ -113,7 +113,7 @@ open_rtc(void) { - for (p=fls; *p; ++p) { - int fd = open(*p, O_RDONLY); - -- if (fd < 0 && errno == ENOENT) -+ if (fd < 0 && (errno == ENOENT || errno == ENODEV)) - continue; - rtc_dev_name = *p; - return fd; --- -1.5.3.1 - diff --git a/util-linux-ng-2.13-mkswap-selinux.patch b/util-linux-ng-2.13-mkswap-selinux.patch deleted file mode 100644 index f0db803..0000000 --- a/util-linux-ng-2.13-mkswap-selinux.patch +++ /dev/null @@ -1,53 +0,0 @@ -From fb2da4155d099aad2c9da2eecd138a7668975667 Mon Sep 17 00:00:00 2001 -From: KaiGai Kohei -Date: Mon, 22 Oct 2007 10:30:19 +0200 -Subject: [PATCH] mkswap: possible to crash with SELinux relabeling support - -When fgetfilecon() is failed with -ENODATA, this process does not -exit. However, "oldcontext" is not initialized in this case, so -context_new() will be called with uninitialized "oldcontext" at the -next. - -Finally, it makes a segmentation fault, because context_new() have to -refer an incorrect memory region. - -The attached patch fixes this matter using matchpathcon(). If we -cannot obtain actual file context due to -ENODATA, a context which is -returned by matchpathcon() is applied as oldcontext. Then, the type -of the context is relabeled to "swapfile_t" explicitly. - -Signed-off-by: KaiGai Kohei -Signed-off-by: Karel Zak ---- - disk-utils/mkswap.c | 15 +++++++++------ - 1 files changed, 9 insertions(+), 6 deletions(-) - -diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c -index 6af1ff7..2394368 100644 ---- a/disk-utils/mkswap.c -+++ b/disk-utils/mkswap.c -@@ -738,12 +738,15 @@ the -f option to force it.\n"), - security_context_t oldcontext; - context_t newcontext; - -- if ((fgetfilecon(DEV, &oldcontext) < 0) && -- (errno != ENODATA)) { -- fprintf(stderr, _("%s: %s: unable to obtain selinux file label: %s\n"), -- program_name, device_name, -- strerror(errno)); -- exit(1); -+ if (fgetfilecon(DEV, &oldcontext) < 0) { -+ if (errno != ENODATA) { -+ fprintf(stderr, _("%s: %s: unable to obtain selinux file label: %s\n"), -+ program_name, device_name, -+ strerror(errno)); -+ exit(1); -+ } -+ if (matchpathcon(device_name, statbuf.st_mode, &oldcontext)) -+ die(_("unable to matchpathcon()")); - } - if (!(newcontext = context_new(oldcontext))) - die(_("unable to create new selinux context")); --- -1.5.3.1 - diff --git a/util-linux-ng-2.13-mount-canonicalize.patch b/util-linux-ng-2.13-mount-canonicalize.patch deleted file mode 100644 index 8a2dbca..0000000 --- a/util-linux-ng-2.13-mount-canonicalize.patch +++ /dev/null @@ -1,72 +0,0 @@ -From cd93e3f76272de50592a0eb7c343c65a803ef6d5 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 21 Nov 2007 01:46:57 +0100 -Subject: [PATCH] mount: don't call canonicalize(SPEC) for cifs, smbfs and nfs - -When calling "mount -t smbfs //foo/bar /mnt/foo", mount.smbfs will be -called with /foo/bar if /foo/bar exists locally, and will display its -usage. - -The patch also removes duplicate canonicalize() from mounted() -function. - -Reported-By: Pascal Terjan -Signed-off-by: Karel Zak ---- - mount/mount.c | 21 ++++++++++++--------- - 1 files changed, 12 insertions(+), 9 deletions(-) - -diff --git a/mount/mount.c b/mount/mount.c -index 96776db..7e3336a 100644 ---- a/mount/mount.c -+++ b/mount/mount.c -@@ -1385,11 +1385,6 @@ mount_one (const char *spec, const char *node, const char *types, - /* Merge the fstab and command line options. */ - opts = append_opt(opts, cmdlineopts, NULL); - -- /* Handle possible LABEL= and UUID= forms of spec */ -- nspec = fsprobe_get_devname_for_mounting(spec); -- if (nspec) -- spec = nspec; -- - if (types == NULL && !mounttype && !is_existing_file(spec)) { - if (strchr (spec, ':') != NULL) { - types = "nfs"; -@@ -1406,6 +1401,15 @@ mount_one (const char *spec, const char *node, const char *types, - } - } - -+ /* Handle possible LABEL= and UUID= forms of spec */ -+ if (types == NULL || (strncmp(types, "nfs", 3) && -+ strncmp(types, "cifs", 4) && -+ strncmp(types, "smbfs", 5))) { -+ nspec = fsprobe_get_devname_for_mounting(spec); -+ if (nspec) -+ spec = nspec; -+ } -+ - /* - * Try to mount the file system. When the exit status is EX_BG, - * we will retry in the background. Otherwise, we're done. -@@ -1439,15 +1443,14 @@ mount_one (const char *spec, const char *node, const char *types, - static int - mounted (const char *spec0, const char *node0) { - struct mntentchn *mc, *mc0; -- char *spec, *node; -+ const char *spec, *node; - int ret = 0; - - /* Handle possible UUID= and LABEL= in spec */ -- spec0 = fsprobe_get_devname(spec0); -- if (!spec0) -+ spec = fsprobe_get_devname(spec0); -+ if (!spec) - return ret; - -- spec = canonicalize(spec0); - node = canonicalize(node0); - - mc0 = mtab_head(); --- -1.5.3.1 - diff --git a/util-linux-ng-2.13-script-SIGWINCH.patch b/util-linux-ng-2.13-script-SIGWINCH.patch deleted file mode 100644 index 03e0412..0000000 --- a/util-linux-ng-2.13-script-SIGWINCH.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 1b1ff2d6edd2db321926f7243004937cb26f9f15 Mon Sep 17 00:00:00 2001 -From: Karel Zak -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 ---- - 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 - diff --git a/util-linux-ng-2.13-setarch-alpha.patch b/util-linux-ng-2.13-setarch-alpha.patch deleted file mode 100644 index 240798f..0000000 --- a/util-linux-ng-2.13-setarch-alpha.patch +++ /dev/null @@ -1,29 +0,0 @@ -From adf88e666acdd05da134bca50fb52daedb7b8952 Mon Sep 17 00:00:00 2001 -From: Oliver Falk -Date: Mon, 3 Dec 2007 13:34:42 +0100 -Subject: [PATCH] setarch: add missing alpha subarchs - -Signed-off-by: Oliver Falk -Signed-off-by: Karel Zak ---- - sys-utils/setarch.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c -index a544853..aa7c810 100644 ---- a/sys-utils/setarch.c -+++ b/sys-utils/setarch.c -@@ -167,6 +167,10 @@ int set_arch(const char *pers, unsigned long options) - #endif - #if defined(__alpha__) - {PER_LINUX, "alpha", "alpha"}, -+ {PER_LINUX, "alphaev5", "alpha"}, -+ {PER_LINUX, "alphaev56", "alpha"}, -+ {PER_LINUX, "alphaev6", "alpha"}, -+ {PER_LINUX, "alphaev67", "alpha"}, - #endif - {-1, NULL, NULL} - }; --- -1.5.3.1 - diff --git a/util-linux-ng.spec b/util-linux-ng.spec index c03e465..2f06172 100644 --- a/util-linux-ng.spec +++ b/util-linux-ng.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux-ng -Version: 2.13 -Release: 3.2%{?dist} +Version: 2.13.1 +Release: 1%{?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 @@ -36,8 +36,7 @@ BuildRequires: zlib-devel BuildRequires: popt-devel ### Sources -#Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/util-linux-ng-2.13.tar.bz2 -Source0: util-linux-ng-2.13-20071004git.tar.bz2 +Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/util-linux-ng-2.13.1.tar.bz2 Source1: util-linux-ng-login.pamd Source2: util-linux-ng-remote.pamd Source3: util-linux-ng-chsh-chfn.pamd @@ -106,20 +105,6 @@ Patch11: util-linux-ng-2.13-floppy-locale.patch # 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 -# hwclock: check for ENODEV (upstream patch) -Patch15: util-linux-ng-2.13-hwclock-ENODEV.patch -# mkswap: possible to crash with SELinux relabeling support (upstream patch) -Patch16: util-linux-ng-2.13-mkswap-selinux.patch -# mount: don't call canonicalize(SPEC) for cifs, smbfs and nfs (upstream patch) -Patch17: util-linux-ng-2.13-mount-canonicalize.patch -# setarch: add missing alpha subarchs (upstream patch) -Patch18: util-linux-ng-2.13-setarch-alpha.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 @@ -143,12 +128,6 @@ cp %{SOURCE8} %{SOURCE9} . %patch10 -p1 %patch11 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 %build unset LINGUAS || : @@ -333,7 +312,7 @@ find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %post -/sbin/install-info %{_infodir}/ipc.info* %{_infodir}/dir +/sbin/install-info %{_infodir}/ipc.info %{_infodir}/dir # only for minimal buildroots without /var/log [ -d /var/log ] || /bin/mkdir -p /var/log /bin/touch /var/log/lastlog @@ -353,7 +332,7 @@ fi %preun if [ "$1" = 0 ]; then - /sbin/install-info --del %{_infodir}/ipc.info* %{_infodir}/dir + /sbin/install-info --del %{_infodir}/ipc.info %{_infodir}/dir fi exit 0 @@ -545,6 +524,10 @@ exit 0 /sbin/losetup %changelog +* Wed Jan 16 2008 Karel Zak 2.13.1-1 +- upgrade to stable util-linux-ng 2.13.1 +- fix #427874 - util-linux-ng gets "excess command line argument" on update + * Thu Jan 3 2008 Karel Zak 2.13-3.2 - fix #427207 - util-linux-ng-2.13-3.1.fc8.src.rpm not rebuilded From 3d85e96298c079b0a5053c1f39f5b119875fa313 Mon Sep 17 00:00:00 2001 From: kzak Date: Tue, 22 Apr 2008 19:40:51 +0000 Subject: [PATCH 6/9] - fix audit log injection attack via login --- util-linux-ng-2.13-login-audit.patch | 51 ++++++++++++++++++++++++++++ util-linux-ng.spec | 9 ++++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 util-linux-ng-2.13-login-audit.patch diff --git a/util-linux-ng-2.13-login-audit.patch b/util-linux-ng-2.13-login-audit.patch new file mode 100644 index 0000000..d564577 --- /dev/null +++ b/util-linux-ng-2.13-login-audit.patch @@ -0,0 +1,51 @@ +From 8ccf0b253ac0f4f58d64bc9674de18bff5a88782 Mon Sep 17 00:00:00 2001 +From: Steve Grubb +Date: Sat, 19 Apr 2008 11:49:02 -0400 +Subject: [PATCH] login: audit log injection attack via login + +A while back I found a couple audit log injection attacks which became +CVE-2007-3102. I forgot to look at login to see if its vulnerable and Mirek +found that it is. To verify the problem, type: + +root addr=xyz.com + +for the account name while logging in. It will look like root logged in with +an address of xyz.com. + +Signed-off-by: Steve Grubb +--- + login-utils/login.c | 10 +++------- + 1 files changed, 3 insertions(+), 7 deletions(-) + +diff --git a/login-utils/login.c b/login-utils/login.c +index aad2779..2301213 100644 +--- a/login-utils/login.c ++++ b/login-utils/login.c +@@ -324,7 +324,6 @@ static void + logaudit(const char *tty, const char *username, const char *hostname, + struct passwd *pwd, int status) + { +- char buf[64]; + int audit_fd; + + audit_fd = audit_open(); +@@ -332,13 +331,10 @@ logaudit(const char *tty, const char *username, const char *hostname, + return; + if (!pwd && username) + pwd = getpwnam(username); +- if (pwd) +- snprintf(buf, sizeof(buf), "uid=%d", pwd->pw_uid); +- else +- snprintf(buf, sizeof(buf), "acct=%s", username ? username : "(unknown)"); + +- audit_log_user_message(audit_fd, AUDIT_USER_LOGIN, +- buf, hostname, NULL, tty, status); ++ audit_log_acct_message(audit_fd, AUDIT_USER_LOGIN, ++ NULL, "login", username ? username : "(unknown)", ++ pwd ? pwd->pw_uid : -1, hostname, NULL, tty, status); + + close(audit_fd); + } +-- +1.5.4.1 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 2f06172..54af912 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.13.1 -Release: 1%{?dist} +Release: 2%{?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 @@ -104,6 +104,9 @@ Patch10: util-linux-ng-2.13-swapon-swsuspend.patch Patch11: util-linux-ng-2.13-floppy-locale.patch # remove partitions Patch12: util-linux-ng-2.13-blockdev-rmpart.patch +# CVE-2007-3102 +Patch13: util-linux-ng-2.13-login-audit.patch + %description The util-linux-ng package contains a large variety of low-level system @@ -128,6 +131,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %build unset LINGUAS || : @@ -524,6 +528,9 @@ exit 0 /sbin/losetup %changelog +* Tue Apr 22 2008 Karel Zak 2.13.1-2 +- fix audit log injection attack via login + * Wed Jan 16 2008 Karel Zak 2.13.1-1 - upgrade to stable util-linux-ng 2.13.1 - fix #427874 - util-linux-ng gets "excess command line argument" on update From 8303a379c67d1f149d3cedb24a9ff9eef6cd8d89 Mon Sep 17 00:00:00 2001 From: kzak Date: Mon, 28 Apr 2008 10:42:56 +0000 Subject: [PATCH 7/9] - fix #443823 - ionice.1 doesn't to reflect idle class changes in 2.6.25 --- util-linux-ng-2.13-ionice-man-idle.patch | 33 ++++++++++++++++++++++++ util-linux-ng.spec | 9 +++++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 util-linux-ng-2.13-ionice-man-idle.patch diff --git a/util-linux-ng-2.13-ionice-man-idle.patch b/util-linux-ng-2.13-ionice-man-idle.patch new file mode 100644 index 0000000..81b0537 --- /dev/null +++ b/util-linux-ng-2.13-ionice-man-idle.patch @@ -0,0 +1,33 @@ +From 776452cbfcfc2dfe81088e29ae13a681bee64e75 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Mon, 28 Apr 2008 12:23:40 +0200 +Subject: [PATCH] ionice: update man page to reflect IDLE class change in 2.6.25 + +The idle class is safe for non-root users since 2.6.25. +http://lwn.net/Articles/266256/ + +Addresses-Red-Hat-Bugzilla: #443823 +Signed-off-by: Karel Zak +--- + schedutils/ionice.1 | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/schedutils/ionice.1 b/schedutils/ionice.1 +index 8203a5e..93aabe8 100644 +--- a/schedutils/ionice.1 ++++ b/schedutils/ionice.1 +@@ -13,8 +13,9 @@ this writing, Linux supports 3 scheduling classes: + A program running with idle io priority will only get disk time when no other + program has asked for disk io for a defined grace period. The impact of idle + io processes on normal system activity should be zero. This scheduling +-class does not take a priority argument. This scheduling class is not +-permitted for an ordinary (i.e., non-root) user. ++class does not take a priority argument. Presently, this scheduling class ++is permitted for an ordinary user (since kernel 2.6.25). ++ + + \fBBest effort\fR. + This is the default scheduling class for any process that hasn't asked for +-- +1.5.4.1 + diff --git a/util-linux-ng.spec b/util-linux-ng.spec index 54af912..637153c 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.13.1 -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,7 +106,8 @@ Patch11: util-linux-ng-2.13-floppy-locale.patch Patch12: util-linux-ng-2.13-blockdev-rmpart.patch # CVE-2007-3102 Patch13: util-linux-ng-2.13-login-audit.patch - +# 443823 - ionice.1 doesn't to reflect idle class changes in 2.6.25 +Patch14: util-linux-ng-2.13-ionice-man-idle.patch %description The util-linux-ng package contains a large variety of low-level system @@ -132,6 +133,7 @@ cp %{SOURCE8} %{SOURCE9} . %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %build unset LINGUAS || : @@ -528,6 +530,9 @@ exit 0 /sbin/losetup %changelog +* Mon Apr 28 2008 Karel Zak 2.13.1-3 +- fix #443823 - ionice.1 doesn't to reflect idle class changes in 2.6.25 + * Tue Apr 22 2008 Karel Zak 2.13.1-2 - fix audit log injection attack via login From 9d167df93f8657ef0c40682b138884a7de316059 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:16:36 +0000 Subject: [PATCH 8/9] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c0f296d..c5d5fa9 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: util-linux-ng -# $Id$ +# $Id: Makefile,v 1.1 2007/08/17 21:07:02 wtogami Exp $ NAME := util-linux-ng SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From e84cc88fc127944cac498206984e201830470ef4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 14:49:57 +0000 Subject: [PATCH 9/9] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index c5d5fa9..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: util-linux-ng -# $Id: Makefile,v 1.1 2007/08/17 21:07:02 wtogami Exp $ -NAME := util-linux-ng -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index e9e7ccd..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-8