diff --git a/util-linux-2.13-login-pam-acct.patch b/util-linux-2.13-login-pam-acct.patch new file mode 100644 index 0000000..24fba08 --- /dev/null +++ b/util-linux-2.13-login-pam-acct.patch @@ -0,0 +1,31 @@ +--- util-linux-2.13-pre6/login-utils/login.c.acct 2006-02-22 21:43:03.000000000 +0100 ++++ util-linux-2.13-pre6/login-utils/login.c 2006-02-22 21:57:55.000000000 +0100 +@@ -602,16 +602,22 @@ + pam_end(pamh, retcode); + exit(0); + } ++ } + +- retcode = pam_acct_mgmt(pamh, 0); +- +- if(retcode == PAM_NEW_AUTHTOK_REQD) { +- retcode = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK); +- } ++ /* ++ * Authentication may be skipped (for example, during krlogin, rlogin, etc...), ++ * but it doesn't mean that we can skip other account checks. The account ++ * could be disabled or password expired (althought kerberos ticket is valid). ++ * -- kzak@redhat.com (22-Feb-2006) ++ */ ++ retcode = pam_acct_mgmt(pamh, 0); + +- PAM_FAIL_CHECK; ++ if(retcode == PAM_NEW_AUTHTOK_REQD) { ++ retcode = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK); + } + ++ PAM_FAIL_CHECK; ++ + /* + * Grab the user information out of the password file for future usage + * First get the username that we are actually using, though. diff --git a/util-linux-2.13-mkswap-selinux.patch b/util-linux-2.13-mkswap-selinux.patch new file mode 100644 index 0000000..599c776 --- /dev/null +++ b/util-linux-2.13-mkswap-selinux.patch @@ -0,0 +1,60 @@ +--- util-linux-2.13-pre6/disk-utils/mkswap.c.selinux 2006-02-22 14:07:47.000000000 +0100 ++++ util-linux-2.13-pre6/disk-utils/mkswap.c 2006-02-22 15:16:05.000000000 +0100 +@@ -39,6 +39,8 @@ + #include /* for _IO */ + #include + #include ++#include ++#include + #include "swapheader.h" + #include "xstrncpy.h" + #include "nls.h" +@@ -76,6 +78,8 @@ + + #define MAKE_VERSION(p,q,r) (65536*(p) + 256*(q) + (r)) + ++#define SELINUX_SWAPFILE_LABEL "swapfile_t" ++ + static int + linux_version_code(void) { + struct utsname my_utsname; +@@ -718,5 +722,30 @@ + if (fsync(DEV)) + die(_("fsync failed")); + #endif ++ ++ if (S_ISREG(statbuf.st_mode)) { ++ char *context = NULL; ++ ++ if (fgetfilecon(DEV, &context) < 0) { ++ if (errno == ENODATA) { ++ context = NULL; ++ } else { ++ perror(device_name); ++ die(_("unable to obtain selinux file label")); ++ return 0; ++ } ++ } ++ if (context==NULL || strcmp(context, SELINUX_SWAPFILE_LABEL)) { ++ if (fsetfilecon(DEV, SELINUX_SWAPFILE_LABEL)) { ++ fprintf(stderr, "%s: unable to relabel %s to %s: %s\n", ++ program_name, device_name, ++ SELINUX_SWAPFILE_LABEL, ++ strerror(errno)); ++ exit(1); ++ } ++ } ++ if (context) ++ freecon(context); ++ } + return 0; + } +--- util-linux-2.13-pre6/disk-utils/Makefile.am.selinux 2006-02-22 15:23:00.000000000 +0100 ++++ util-linux-2.13-pre6/disk-utils/Makefile.am 2006-02-22 15:23:09.000000000 +0100 +@@ -31,5 +31,5 @@ + endif + + if HAVE_UUID +-mkswap_LDADD = -luuid ++mkswap_LDADD = -luuid -lselinux + endif diff --git a/util-linux-2.13-schedutils-man.patch b/util-linux-2.13-schedutils-man.patch new file mode 100644 index 0000000..a5b7e31 --- /dev/null +++ b/util-linux-2.13-schedutils-man.patch @@ -0,0 +1,22 @@ +--- util-linux-2.13-pre6/schedutils/taskset.1.kzak 2006-02-22 16:10:26.000000000 +0100 ++++ util-linux-2.13-pre6/schedutils/taskset.1 2006-02-22 16:10:38.000000000 +0100 +@@ -82,7 +82,7 @@ + .SH USAGE + .TP + The default behavior is to run a new command with a given affinity mask: +-taskset [mask] -- [command] [arguments] ++taskset [mask] [command] [arguments] + .TP + You can also retrieve the CPU affinity of an existing task: + taskset -p [pid] +--- util-linux-2.13-pre6/schedutils/chrt.1.kzak 2006-02-22 16:09:02.000000000 +0100 ++++ util-linux-2.13-pre6/schedutils/chrt.1 2006-02-22 16:09:22.000000000 +0100 +@@ -72,7 +72,7 @@ + .SH USAGE + .TP + The default behavior is to run a new command:: +-chrt [prio] -- [command] [arguments] ++chrt [prio] [command] [arguments] + .TP + You can also retrieve the real-time attributes of an existing task: + chrt -p [pid] diff --git a/util-linux-2.13-umount-sysfs.patch b/util-linux-2.13-umount-sysfs.patch new file mode 100644 index 0000000..0d2d9f0 --- /dev/null +++ b/util-linux-2.13-umount-sysfs.patch @@ -0,0 +1,11 @@ +--- util-linux-2.13-pre6/mount/umount.c.sysfs 2006-02-23 10:09:53.000000000 +0100 ++++ util-linux-2.13-pre6/mount/umount.c 2006-02-23 10:10:39.000000000 +0100 +@@ -734,7 +734,7 @@ + if (all) { + /* nodev stuff: sysfs, usbfs, oprofilefs, ... */ + if (types == NULL) +- types = "noproc,nodevfs,nodevpts"; ++ types = "noproc,nodevfs,nodevpts,nosysfs"; + result = umount_all (types, test_opts); + } else if (argc < 1) { + usage (stderr, 2); diff --git a/util-linux.spec b/util-linux.spec index 823171a..e6efc28 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -169,6 +169,16 @@ Patch221: util-linux-2.12p-col-EILSEQ.patch Patch222: util-linux-2.13-mount-twiceloop.patch # nobug - add --rmpart N and --rmparts Patch223: util-linux-2.13-rmparts.patch +# 181782 - mkswap should automatically add selinux label to swapfile +Patch224: util-linux-2.13-mkswap-selinux.patch +# 181896 - broken example in man pages +Patch225: util-linux-2.13-schedutils-man.patch +# 177331 - login omits pam_acct_mgmt & pam_chauthtok when authentication is skipped. +Patch226: util-linux-2.13-login-pam-acct.patch +# 177523 - umount -a should not unmount sysfs +Patch227: util-linux-2.13-umount-sysfs.patch +# 182553 - fdisk -l inside xen guest shows no disks +Patch228: util-linux-2.13-fdisk-xvd.patch # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -244,6 +254,11 @@ cp %{SOURCE8} %{SOURCE9} . %patch221 -p1 %patch222 -p1 %patch223 -p1 +%patch224 -p1 +%patch225 -p1 +%patch226 -p1 +%patch227 -p1 +%patch228 -p1 %build unset LINGUAS || : @@ -627,8 +642,13 @@ fi /sbin/losetup %changelog -* Tue Feb 21 2006 Karel Zak 2.13-0.16 +* Wed Feb 22 2006 Karel Zak 2.13-0.16 +- fix #181782 - mkswap should automatically add selinux label to swapfile - fix #180730 - col is exiting with 1 (fix util-linux-2.12p-col-EILSEQ.patch) +- fix #181896 - broken example in schedutils man pages +- fix #177331 - login omits pam_acct_mgmt & pam_chauthtok when authentication is skipped. +- fix #177523 - umount -a should not unmount sysfs +- fix #182553 - fdisk -l inside xen guest shows no disks * Fri Feb 10 2006 Jesse Keating - 2.13-0.15.1 - bump again for double-long bug on ppc(64)