From de4c92fc5af90a831c9ce28ee83f2d05e46d1338 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 10 Dec 2004 18:13:02 +0000 Subject: [PATCH] sync --- .cvsignore | 1 + sources | 2 +- util-linux-2.12j-113790-hotkeys.patch | 44 ++++++++ util-linux-2.12j-pamconsole.patch | 139 ++++++++++++++++++++++++++ util-linux.spec | 33 ++---- 5 files changed, 196 insertions(+), 23 deletions(-) create mode 100644 util-linux-2.12j-113790-hotkeys.patch create mode 100644 util-linux-2.12j-pamconsole.patch diff --git a/.cvsignore b/.cvsignore index b7bcc32..c0b27a1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -2,3 +2,4 @@ cramfs-1.1.tar.gz floppy-0.12.tar.gz kbdrate.tar.gz util-linux-2.12a.tar.gz +util-linux-2.12j.tar.gz diff --git a/sources b/sources index 06a75b3..d135cc9 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ d3912b9f7bf745fbfea68f6a9b9de30f cramfs-1.1.tar.gz 7d3ac81855e26687dada6a31d2677875 floppy-0.12.tar.gz 555e4bd2a23347fddac4268cbf4e1fe4 kbdrate.tar.gz -5fa39c3d8761b48732be137a06853c64 util-linux-2.12a.tar.gz +870bdcd9515b92dad1fdc69be63d6858 util-linux-2.12j.tar.gz diff --git a/util-linux-2.12j-113790-hotkeys.patch b/util-linux-2.12j-113790-hotkeys.patch new file mode 100644 index 0000000..afd8956 --- /dev/null +++ b/util-linux-2.12j-113790-hotkeys.patch @@ -0,0 +1,44 @@ +--- util-linux-2.12j/po/ca.po.sopwith 2004-12-05 14:08:08.000000000 -0500 ++++ util-linux-2.12j/po/ca.po 2004-12-10 13:10:52.411668785 -0500 +@@ -7183,7 +7183,7 @@ + #: login-utils/vipw.c:354 + #, c-format + msgid "Would you like to edit %s now [y/n]? " +-msgstr "Desitgeu editar %s ara? [s/n] " ++msgstr "Desitgeu editar %s ara? [y/n] " + + #: login-utils/wall.c:104 + #, c-format +--- util-linux-2.12j/po/da.po.sopwith 2004-12-05 14:08:09.000000000 -0500 ++++ util-linux-2.12j/po/da.po 2004-12-10 13:09:50.382880759 -0500 +@@ -1470,7 +1470,7 @@ + + #: fdisk/cfdisk.c:1526 + msgid "Do you wish to start with a zero table [y/N] ?" +-msgstr "Vil du starte med nulstillet tabel [j/N] ?" ++msgstr "Vil du starte med nulstillet tabel [y/N] ?" + + #: fdisk/cfdisk.c:1574 + msgid "You specified more cylinders than fit on disk" +--- util-linux-2.12j/po/nl.po.sopwith 2004-12-05 14:08:15.000000000 -0500 ++++ util-linux-2.12j/po/nl.po 2004-12-10 13:09:50.390878282 -0500 +@@ -1493,7 +1493,7 @@ + + #: fdisk/cfdisk.c:1526 + msgid "Do you wish to start with a zero table [y/N] ?" +-msgstr "Wilt u met een lege tabel beginnen [j/N] ?" ++msgstr "Wilt u met een lege tabel beginnen [y/N] ?" + + #: fdisk/cfdisk.c:1574 + msgid "You specified more cylinders than fit on disk" +--- util-linux-2.12j/po/pt_BR.po.sopwith 2004-12-05 14:08:15.000000000 -0500 ++++ util-linux-2.12j/po/pt_BR.po 2004-12-10 13:11:47.560587674 -0500 +@@ -7161,7 +7161,7 @@ + #: login-utils/vipw.c:354 + #, c-format + msgid "Would you like to edit %s now [y/n]? " +-msgstr "Você gostaria de editar %s agora [s/n]" ++msgstr "Você gostaria de editar %s agora [y/n]" + + #: login-utils/wall.c:104 + #, c-format diff --git a/util-linux-2.12j-pamconsole.patch b/util-linux-2.12j-pamconsole.patch new file mode 100644 index 0000000..8e02d1c --- /dev/null +++ b/util-linux-2.12j-pamconsole.patch @@ -0,0 +1,139 @@ +--- util-linux-2.12j/mount/mount.c.console 2004-12-10 12:32:57.887137495 -0500 ++++ util-linux-2.12j/mount/mount.c 2004-12-10 12:43:06.136750656 -0500 +@@ -97,14 +97,16 @@ + #define MS_USER 0x20000000 + #define MS_OWNER 0x10000000 + #define MS_GROUP 0x08000000 ++#define MS_PAMCONSOLE 0x04000000 + #define MS_COMMENT 0x00020000 + #define MS_LOOP 0x00010000 + ++ + /* Options that we keep the mount system call from seeing. */ +-#define MS_NOSYS (MS_NOAUTO|MS_USERS|MS_USER|MS_COMMENT|MS_LOOP) ++#define MS_NOSYS (MS_NOAUTO|MS_USERS|MS_USER|MS_COMMENT|MS_LOOP|MS_PAMCONSOLE) + + /* Options that we keep from appearing in the options field in the mtab. */ +-#define MS_NOMTAB (MS_REMOUNT|MS_NOAUTO|MS_USERS|MS_USER) ++#define MS_NOMTAB (MS_REMOUNT|MS_NOAUTO|MS_USERS|MS_USER|MS_PAMCONSOLE) + + /* Options that we make ordinary users have by default. */ + #define MS_SECURE (MS_NOEXEC|MS_NOSUID|MS_NODEV) +@@ -142,6 +144,8 @@ + { "comment", 0, 0, MS_COMMENT}, /* fstab comment only (kudzu,_netdev)*/ + + /* add new options here */ ++ { "pamconsole", 0, 0, MS_PAMCONSOLE }, /* Allow users at console to mount */ ++ { "nopamconsole", 0, 1, MS_PAMCONSOLE }, /* Console user has no special privs */ + #ifdef MS_NOSUB + { "sub", 0, 1, MS_NOSUB }, /* allow submounts */ + { "nosub", 0, 0, MS_NOSUB }, /* don't allow submounts */ +@@ -265,7 +269,7 @@ + *mask &= ~om->mask; + else + *mask |= om->mask; +- if ((om->mask == MS_USER || om->mask == MS_USERS) ++ if ((om->mask == MS_USER || om->mask == MS_USERS || om->mask == MS_PAMCONSOLE) + && !om->inv) + *mask |= MS_SECURE; + if ((om->mask == MS_OWNER || om->mask == MS_GROUP) +@@ -554,7 +558,29 @@ + } + } + +- /* James Kehl came with a similar patch: ++ /* Red Hat patch: allow users at console to mount when fstab ++ contains the console option. This option should not be used ++ in a high security environment but is useful to give console ++ users the possibility of using locally attached devices ++ such as USB keychains and USB harddisks where it is now suitable ++ to give the console owner write access to the device node */ ++ if (*flags & MS_PAMCONSOLE) { ++ char *username; ++ char pamconsole_file_name[256]; ++ struct stat sb; ++ ++ username = getusername (); ++ ++ if (username != NULL) { ++ snprintf (pamconsole_file_name, sizeof (pamconsole_file_name), ++ "/var/run/console/%s", username); ++ if (stat (pamconsole_file_name, &sb) == 0) { ++ *flags |= MS_USER; ++ } ++ } ++ } ++ ++ /* James Kehl came with a similar patch: + allow an arbitrary user to mount when he is the owner of + the mount-point and has write-access to the device. + This is even less secure. Let me skip it for the time being; +@@ -570,7 +596,7 @@ + *user = getusername(); + } + +- *flags &= ~(MS_OWNER | MS_GROUP); ++ *flags &= ~(MS_OWNER | MS_GROUP | MS_PAMCONSOLE); + } + + static int +--- util-linux-2.12j/mount/umount.c.console 2004-12-10 12:32:57.885138115 -0500 ++++ util-linux-2.12j/mount/umount.c 2004-12-10 12:44:51.494119742 -0500 +@@ -546,7 +546,7 @@ + umount_file (char *arg) { + struct mntentchn *mc, *fs; + const char *file, *options; +- int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group; ++ int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group, fstab_has_pamconsole; + int ok; + + file = canonicalize(arg); /* mtab paths are canonicalized */ +@@ -608,13 +608,16 @@ + fstab_has_users = contains(options, "users"); + fstab_has_owner = contains(options, "owner"); + fstab_has_group = contains(options, "group"); ++ fstab_has_pamconsole = contains(options, "pamconsole"); + ok = 0; + + if (fstab_has_users) + ok = 1; + + if (!ok && (fstab_has_user || fstab_has_owner || +- fstab_has_group)) { ++ fstab_has_group || fstab_has_pamconsole)) { ++ char pamconsole_file_name[256]; ++ struct stat sb; + char *user = getusername(); + + options = mc->m.mnt_opts; +@@ -624,6 +627,14 @@ + + if (user && mtab_user && streq (user, mtab_user)) + ok = 1; ++ ++ /*pam_console user check*/ ++ if (user && fstab_has_pamconsole) { ++ snprintf (pamconsole_file_name, sizeof (pamconsole_file_name), "/var/run/console/%s", user); ++ if (stat (pamconsole_file_name, &sb) == 0) { ++ ok = 1; ++ } ++ } + } + if (!ok) + die (2, _("umount: only %s can unmount %s from %s"), +--- util-linux-2.12j/mount/fstab.5.console 2004-09-28 10:13:42.000000000 -0400 ++++ util-linux-2.12j/mount/fstab.5 2004-12-10 12:59:05.088744506 -0500 +@@ -156,10 +156,10 @@ + .BR nfs (5). + Common for all types of file system are the options ``noauto'' + (do not mount when "mount -a" is given, e.g., at boot time), ``user'' +-(allow a user to mount), and ``owner'' +-(allow device owner to mount), and ``comment'' ++(allow a user to mount), ``owner'' ++(allow device owner to mount), ``pamconsole'' (allow a user at the console to mount), and ``comment'' + (e.g., for use by fstab-maintaining programs). +-The ``owner'' and ``comment'' options are Linux-specific. ++The ``owner'', ``pamconsole'' and ``comment'' options are Linux-specific. + For more details, see + .BR mount (8). + diff --git a/util-linux.spec b/util-linux.spec index 52cded5..945989e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -20,8 +20,8 @@ Summary: A collection of basic system utilities. Name: util-linux -Version: 2.12a -Release: 20 +Version: 2.12j +Release: 1 License: distributable Group: System Environment/Base @@ -63,7 +63,7 @@ Patch100: util-linux-2.12a-managed.patch Patch106: util-linux-2.11w-swaponsymlink-57300.patch Patch107: util-linux-2.11y-procpartitions-37436.patch Patch113: util-linux-2.11r-ctty3.patch -Patch117: util-linux-2.11y-moremisc.patch +#Patch117: util-linux-2.11y-moremisc.patch Patch120: util-linux-2.11y-skipraid2.patch Patch125: util-linux-2.11y-umask-82552.patch @@ -73,24 +73,22 @@ Patch128: util-linux-2.12a-ipcs-84243-86285.patch Patch131: util-linux-2.11y-sysmap-85407.patch Patch138: util-linux-2.11y-chsh-103004.patch Patch139: util-linux-2.11y-fdisksegv-103954.patch -Patch140: util-linux-2.11y-alldevs-101772.patch -Patch142: util-linux-2.11y-mountman-90588.patch +Patch142: util-linux-2.12j-mountman-90588.patch Patch143: cramfs-1.1-blocksize_and_quiet.patch Patch144: cramfs-1.1-pagesize.patch -Patch145: util-linux-2.12.pam.patch Patch147: util-linux-2.12a-126572-fdiskman.patch Patch148: util-linux-2.12a-127097-labelcrash.patch -Patch149: util-linux-2.12a-125531-swaplabel.patch +Patch149: util-linux-2.12j-125531-swaplabel.patch Patch150: floppy-0.12-locale.patch Patch151: util-linux-2.12a-mountbylabel-dm.patch -Patch152: util-linux-2.12a-mountnolabel.patch +Patch152: util-linux-2.12j-mountnolabel.patch Patch153: util-linux-2.12a-16415-rdevman.patch Patch154: util-linux-2.11y-102566-loginman.patch Patch155: util-linux-2.12a-104321-rescuept.patch -Patch156: util-linux-2.12a-fdiskmessage-107824.patch +Patch156: util-linux-2.12j-fdiskmessage-107824.patch # Patch to enabled remote service for login/pam (#91174) Patch157: util-linux-2.12a-pamstart.patch @@ -98,16 +96,12 @@ Patch157: util-linux-2.12a-pamstart.patch Patch158: util-linux-2.12a-moreswaplabel.patch # Patch to enable the pamconsole flag for restricting mounting to users at the console (#133941) -Patch159: util-linux-2.12a-console.patch +Patch159: util-linux-2.12j-pamconsole.patch # Allow raw(8) to bind raw devices whose device nodes do not yet exist. Patch160: raw-handle-nonpresent-devs.patch -# Handle the new Solaris partition ID -Patch161: util-linux-2.12a-solarispart.patch - -Patch162: util-linux-2.12a-140933-loopoffset.patch -Patch163: util-linux-2.12a-140437-sgisectors.patch +Patch163: util-linux-2.12j-140437-sgisectors.patch Patch164: util-linux-2.12a-113790-hotkeys.patch Patch165: util-linux-2.12a-117855-mountman.patch Patch166: util-linux-2.12a-134860-sldocs.patch @@ -197,7 +191,7 @@ mv MCONFIG.new MCONFIG %endif %patch113 -p1 -%patch117 -p1 +#%patch117 -p1 %patch120 -p1 %patch125 -p1 @@ -207,14 +201,12 @@ mv MCONFIG.new MCONFIG %patch131 -p1 %patch138 -p1 %patch139 -p1 -%patch140 -p1 %patch142 -p1 # cramfs %patch143 -p0 %patch144 -p1 -%patch145 -p1 %patch147 -p1 %patch148 -p1 %patch149 -p1 @@ -235,11 +227,8 @@ mv MCONFIG.new MCONFIG %patch160 -p1 %endif -%patch161 -p1 - -%patch162 -p1 %patch163 -p1 -%patch164 -p1 +%patch164 -p1 -b .sopwith %patch165 -p1 %patch166 -p1 %patch167 -p1