From 2a866b469824325ad7b672aee021f92d89265c4b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 19 Nov 2009 22:07:56 +0000 Subject: [PATCH] - up to 8.1 Changed files: coreutils-getgid.patch -> 1.15 coreutils-pam.patch -> 1.15 coreutils-runuser.patch -> 1.12 coreutils.spec -> 1.154 --- coreutils-getgid.patch | 17 ++++++------- coreutils-pam.patch | 45 +++++++++++++++++---------------- coreutils-runuser.patch | 56 ++++++++++++++++++++++------------------- coreutils.spec | 4 +-- 4 files changed, 63 insertions(+), 59 deletions(-) diff --git a/coreutils-getgid.patch b/coreutils-getgid.patch index 47965b3..4f326e9 100644 --- a/coreutils-getgid.patch +++ b/coreutils-getgid.patch @@ -69,15 +69,14 @@ diff -Nur coreutils-4.5.3.orig/man/pl/getgid.1 coreutils-4.5.3/man/pl/getgid.1 +.BR id (1) --- coreutils-6.10/src/Makefile.am.orig 2008-03-02 02:12:29.418058752 +0100 +++ coreutils-6.10/src/Makefile.am 2008-03-02 02:14:46.205853844 +0100 -@@ -36,7 +36,7 @@ - cat cksum comm csplit cut expand fmt fold head join md5sum \ - nl od paste pr ptx sha1sum sha224sum sha256sum sha384sum sha512sum \ - shuf sort split sum tac tail tr tsort unexpand uniq wc \ -- basename date dirname echo env expr factor false \ -+ basename date dirname echo env expr factor false getgid \ - id kill logname pathchk printenv printf pwd \ - runcon seq sleep tee \ - test true tty whoami yes \ +@@ -69,6 +69,7 @@ + false \ + fmt \ + fold \ ++ getgid \ + ginstall \ + groups \ + head \ diff -Nur coreutils-4.5.3.orig/src/getgid.c coreutils-4.5.3/src/getgid.c --- coreutils-4.5.3.orig/src/getgid.c Thu Jan 1 01:00:00 1970 +++ coreutils-4.5.3/src/getgid.c Sun Oct 27 21:52:01 2002 diff --git a/coreutils-pam.patch b/coreutils-pam.patch index 98ecce2..6c2b01e 100644 --- a/coreutils-pam.patch +++ b/coreutils-pam.patch @@ -1,14 +1,14 @@ --- coreutils-6.7/src/Makefile.am.pam 2006-11-24 21:28:10.000000000 +0000 +++ coreutils-6.7/src/Makefile.am 2007-01-09 17:00:01.000000000 +0000 -@@ -103,7 +103,7 @@ - # If necessary, add -lm to resolve use of pow in lib/strtod.c. - uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS) +@@ -359,7 +359,7 @@ + uptime_LDADD += $(GETLOADAVG_LIBS) --su_LDADD = $(LDADD) $(LIB_CRYPT) -+su_LDADD = $(LDADD) $(LIB_CRYPT) $(LIB_PAM) + # for crypt +-su_LDADD += $(LIB_CRYPT) ++su_LDADD += $(LIB_CRYPT) $(LIB_PAM) - dir_LDADD += $(LIB_ACL) - ls_LDADD += $(LIB_ACL) + # for various ACL functions + copy_LDADD += $(LIB_ACL) --- coreutils-6.10/src/su.c.orig 2007-11-25 14:23:31.000000000 +0100 +++ coreutils-6.10/src/su.c 2008-03-02 02:07:13.568059486 +0100 @@ -37,6 +37,16 @@ @@ -43,31 +43,26 @@ + #include "system.h" #include "getpass.h" - -@@ -118,15 +137,22 @@ + +@@ -130,10 +130,17 @@ /* The user to become if none is specified. */ #define DEFAULT_USER "root" +#ifndef USE_PAM char *crypt (char const *key, char const *salt); +#endif - char *getusershell (void); - void endusershell (void); - void setusershell (void); - - extern char **environ; -static void run_shell (char const *, char const *, char **, size_t) +static void run_shell (char const *, char const *, char **, size_t, -+ const struct passwd *) ++ const struct passwd *) +#ifdef USE_PAM + ; +#else ATTRIBUTE_NORETURN; +#endif - /* The name this program was run with. */ - char *program_name; + /* If true, pass the `-f' option to the subshell. */ + static bool fast_startup; @@ -215,7 +241,26 @@ } #endif @@ -167,17 +162,17 @@ xsetenv ("HOME", pw->pw_dir); xsetenv ("SHELL", shell); xsetenv ("USER", pw->pw_name); -@@ -298,8 +388,13 @@ +@@ -373,8 +373,13 @@ { #ifdef HAVE_INITGROUPS errno = 0; - if (initgroups (pw->pw_name, pw->pw_gid) == -1) + if (initgroups (pw->pw_name, pw->pw_gid) == -1) { +#ifdef USE_PAM -+ pam_close_session(pamh, 0); -+ pam_end(pamh, PAM_ABORT); ++ pam_close_session(pamh, 0); ++ pam_end(pamh, PAM_ABORT); +#endif - error (EXIT_FAILURE, errno, _("cannot set groups")); + error (EXIT_CANCELED, errno, _("cannot set groups")); + } endgrent (); #endif @@ -332,7 +327,7 @@ } /* Return true if SHELL is a restricted shell (one not returned by -@@ -517,9 +729,9 @@ +@@ -714,9 +714,9 @@ shell = xstrdup (shell ? shell : pw->pw_shell); modify_environment (pw, shell); @@ -342,6 +337,12 @@ - error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir); +#endif + /* error() flushes stderr, but does not check for write failure. + Normally, we would catch this via our atexit() hook of +@@ -726,5 +726,5 @@ + if (ferror (stderr)) + exit (EXIT_CANCELED); + - run_shell (shell, command, argv + optind, MAX (0, argc - optind)); + run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw); } diff --git a/coreutils-runuser.patch b/coreutils-runuser.patch index a25a515..3dcd609 100644 --- a/coreutils-runuser.patch +++ b/coreutils-runuser.patch @@ -3,7 +3,7 @@ @@ -12,7 +12,7 @@ factor false fmt fold groups head hostid hostname id install join kill link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup - od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir + nproc od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir - runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf + runcon runuser seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf sleep sort split stat stdbuf stty su sum sync tac tail tee test timeout @@ -37,27 +37,27 @@ #if HAVE_PATHS_H # include -@@ -150,6 +156,10 @@ - #ifndef USE_PAM +@@ -149,6 +149,10 @@ char *crypt (char const *key, char const *salt); #endif + +#ifndef CHECKPASSWD +#define CHECKPASSWD 1 +#endif + - char *getusershell (void); - void endusershell (void); - void setusershell (void); -@@ -157,7 +167,11 @@ - extern char **environ; + static void run_shell (char const *, char const *, char **, size_t, + const struct passwd *) + #ifdef USE_PAM +@@ -154,7 +154,11 @@ + #endif static void run_shell (char const *, char const *, char **, size_t, -- const struct passwd *) -+ const struct passwd * +- const struct passwd *) ++ const struct passwd * +#ifdef RUNUSER -+ , gid_t *groups, int num_groups ++ , gid_t *groups, int num_groups +#endif -+ ) ++ ) #ifdef USE_PAM ; #else @@ -233,36 +233,40 @@ { #ifdef SYSLOG_FAILURE log_su (pw, false); -@@ -771,8 +861,16 @@ +@@ -814,7 +814,11 @@ modify_environment (pw, shell); #ifndef USE_PAM - change_identity (pw); + change_identity (pw +#ifdef RUNUSER -+ , groups, num_supp_groups ++ , groups, num_supp_groups +#endif -+ ); ++ ); #endif + /* error() flushes stderr, but does not check for write failure. +@@ -825,5 +829,9 @@ + if (ferror (stderr)) + exit (EXIT_CANCELED); + - run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw); + run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw +#ifdef RUNUSER -+ , groups, num_supp_groups ++ , groups, num_supp_groups +#endif -+ ); ++ ); } --- coreutils-6.10/src/Makefile.am.orig 2008-03-02 14:22:53.223435095 +0100 +++ coreutils-6.10/src/Makefile.am 2008-03-02 14:25:58.317983032 +0100 -@@ -24,7 +24,7 @@ - arch hostname su - - build_if_possible__progs = \ -- chroot df hostid nice pinky stdbuf libstdbuf.so stty su uname uptime users who -+ chroot df hostid nice pinky stdbuf libstdbuf.so stty su runuser uname uptime users who - - AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) - +@@ -101,6 +101,7 @@ + rm \ + rmdir \ + runcon \ ++ runuser \ + seq \ + sha1sum \ + sha224sum \ @@ -135,6 +135,10 @@ stat_LDADD = $(LDADD) $(LIB_SELINUX) diff --git a/coreutils.spec b/coreutils.spec index 7a61e43..767221b 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -2,12 +2,12 @@ Summary: GNU Core-utils - basic command line utilities Summary(pl.UTF-8): GNU Core-utils - podstawowe narzędzia działające z linii poleceń Name: coreutils -Version: 7.6 +Version: 8.1 Release: 1 License: GPL v3+ Group: Applications/System Source0: http://ftp.gnu.org/gnu/coreutils/%{name}-%{version}.tar.xz -# Source0-md5: a9fb9368e40205d70fc37b9fe441e8ec +# Source0-md5: e8ab20814c61924197c0951ee292c38a Source1: %{name}-non-english-man-pages.tar.bz2 # Source1-md5: f7c986ebc74ccb8d08ed70141063f14c Source2: DIR_COLORS -- 2.44.0