Hello community, here is the log from the commit of package coreutils for openSUSE:Factory checked in at 2012-04-23 09:12:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/coreutils (Old) and /work/SRC/openSUSE:Factory/.coreutils.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "coreutils", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/coreutils/coreutils.changes 2012-03-11 20:03:44.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.coreutils.new/coreutils.changes 2012-04-23 09:12:23.000000000 +0200 @@ -1,0 +2,62 @@ +Mon Apr 16 13:23:56 CEST 2012 - [email protected] + +- Update to 8.16: + + - Improvements: + * As a GNU extension, 'chmod', 'mkdir', and 'install' now accept + operators '-', '+', '=' followed by octal modes; + * Also, ordinary numeric modes with five or more digits no longer + preserve setuid and setgid bits, so that 'chmod 00755 FOO' now + clears FOO's setuid and setgid bits. + * dd now accepts the count_bytes, skip_bytes iflags and the + seek_bytes oflag, to more easily allow processing portions of a + file. + * dd now accepts the conv=sparse flag to attempt to create sparse + output, by seeking rather than writing to the output file. + * ln now accepts the --relative option, to generate a relative + symbolic link to a target, irrespective of how the target is + specified. + * split now accepts an optional "from" argument to + --numeric-suffixes, which changes the start number from the + default of 0. + * split now accepts the --additional-suffix option, to append an + additional static suffix to output file names. + * basename now supports the -a and -s options, which allow + processing of more than one argument at a time. Also the + complementary -z option was added to delimit output items with + the NUL character. + * dirname now supports more than one argument. Also the complementary + z option was added to delimit output items with the NUL character. + + - Bug fixes + * du --one-file-system (-x) would ignore any non-directory + specified on the command line. For example, "touch f; du -x f" + would print nothing. [bug introduced in coreutils-8.15] + * mv now lets you move a symlink onto a same-inode destination + file that has two or more hard links. + * "mv A B" could succeed, yet A would remain. + * realpath no longer mishandles a root directory. + + - Improvements + * ls can be much more efficient, especially with large directories + on file systems for which getfilecon-, ACL-check- and XATTR- + check-induced syscalls fail with ENOTSUP or similar. + * 'realpath --relative-base=dir' in isolation now implies + '--relative-to=dir' instead of causing a usage failure. + * split now supports an unlimited number of split files as default + behavior. + + For a detaild list se NEWS in the documentation. + +- Add up-to-date german translation. + +------------------------------------------------------------------- +Mon Apr 16 12:00:34 CEST 2012 - [email protected] + +- Add two upstream patches that speed up ls (bnc#752943): + * Cache (l)getfilecon calls to avoid the vast majority of the failing + underlying getxattr syscalls. + * Avoids always-failing queries for whether a file has a nontrivial + ACL and for whether a file has certain "capabilities". + +------------------------------------------------------------------- Old: ---- coreutils-8.15.de.po.xz coreutils-8.15.tar.xz coreutils-8.6-i18n.patch coreutils-one-file-system_ignores_non-directory_arguments.patch New: ---- coreutils-8.16.de.po.xz coreutils-8.16.tar.xz coreutils-bnc#697897-setsid.patch coreutils-i18n.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ coreutils.spec ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -28,11 +28,22 @@ BuildRequires: pam-devel BuildRequires: xz Url: http://www.gnu.org/software/coreutils/ -Version: 8.15 +Version: 8.16 Release: 0 -Provides: fileutils = %{version}, sh-utils = %{version}, stat = %version}, textutils = %{version}, mktemp = %{version} -Obsoletes: fileutils < %{version}, sh-utils < %{version}, stat < %version}, textutils < %{version}, mktemp < %{version} -Obsoletes: libselinux <= 1.23.11-3 libselinux-32bit = 9 libselinux-64bit = 9 libselinux-x86 = 9 +Provides: fileutils = %{version} +Provides: mktemp = %{version} +Provides: sh-utils = %{version} +Provides: stat = %version} +Provides: textutils = %{version} +Obsoletes: fileutils < %{version} +Obsoletes: libselinux <= 1.23.11-3 +Obsoletes: libselinux-32bit = 9 +Obsoletes: libselinux-64bit = 9 +Obsoletes: libselinux-x86 = 9 +Obsoletes: mktemp < %{version} +Obsoletes: sh-utils < %{version} +Obsoletes: stat < %version} +Obsoletes: textutils < %{version} PreReq: %{install_info_prereq} Recommends: %{name}-lang = %version Requires: pam >= 1.1.1.90 @@ -44,7 +55,8 @@ Patch0: coreutils-misc.patch Patch1: coreutils-remove_hostname_documentation.patch Patch2: coreutils-gl_printf_safe.patch -Patch4: coreutils-8.6-i18n.patch +#Remove the bogus coreutils version from the i18n patch name +Patch4: coreutils-i18n.patch Patch5: coreutils-i18n-uninit.patch Patch6: coreutils-i18n-infloop.patch Patch8: coreutils-sysinfo.patch @@ -61,8 +73,8 @@ Patch32: coreutils-ptr_int_casts.patch Patch33: coreutils-8.9-singlethreaded-sort.patch Patch34: coreutils-acl-nofollow.patch -Patch35: coreutils-one-file-system_ignores_non-directory_arguments.patch Patch36: coreutils-basename_documentation.patch +Patch37: coreutils-bnc#697897-setsid.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # this will create a cycle, broken up randomly - coreutils is just too core to have other # prerequires @@ -96,18 +108,18 @@ %patch21 %patch22 -p1 %patch23 -p1 -%patch24 -p1 -%patch25 -p1 +%patch24 +%patch25 # -%patch30 -p1 +%patch30 %patch31 %patch32 %patch33 %patch34 -%patch35 %patch36 +%patch37 -#xz -dc %{S:4} >po/de.po +xz -dc %{S:4} >po/de.po %build AUTOPOINT=true autoreconf -fi ++++++ coreutils-8.6-compile-su-with-fpie.diff ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -8,11 +8,11 @@ src/Makefile.am | 5 +++++ 2 files changed, 6 insertions(+), 1 deletions(-) -diff --git a/lib/Makefile.am b/lib/Makefile.am -index b4a591b..059928e 100644 ---- a/lib/Makefile.am -+++ b/lib/Makefile.am -@@ -17,7 +17,7 @@ +Index: lib/Makefile.am +=================================================================== +--- lib/Makefile.am.orig 2012-04-16 13:18:02.444819167 +0200 ++++ lib/Makefile.am 2012-04-16 13:18:07.729692419 +0200 +@@ -28,7 +28,7 @@ noinst_LIBRARIES = include gnulib.mk @@ -21,11 +21,11 @@ libcoreutils_a_SOURCES += \ buffer-lcm.c buffer-lcm.h -diff --git a/src/Makefile.am b/src/Makefile.am -index 484f6c2..17600af 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -355,6 +355,11 @@ uptime_LDADD += $(GETLOADAVG_LIBS) +Index: src/Makefile.am +=================================================================== +--- src/Makefile.am.orig 2012-04-16 13:18:07.714692779 +0200 ++++ src/Makefile.am 2012-04-16 13:18:07.730692395 +0200 +@@ -361,6 +361,11 @@ uptime_LDADD += $(GETLOADAVG_LIBS) su_SOURCES = su.c getdef.c su_LDADD += $(LIB_CRYPT) $(PAM_LIBS) @@ -37,6 +37,3 @@ # for various ACL functions copy_LDADD += $(LIB_ACL) ls_LDADD += $(LIB_ACL) --- -1.7.1 - ++++++ coreutils-8.6-honor-settings-in-etc-default-su-resp-etc-login.defs.diff ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -12,11 +12,11 @@ create mode 100644 src/getdef.c create mode 100644 src/getdef.h -diff --git a/src/Makefile.am b/src/Makefile.am -index bc27274..484f6c2 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -352,6 +352,7 @@ factor_LDADD += $(LIB_GMP) +Index: src/Makefile.am +=================================================================== +--- src/Makefile.am.orig 2012-04-16 13:18:07.682693547 +0200 ++++ src/Makefile.am 2012-04-16 13:18:34.609047413 +0200 +@@ -358,6 +358,7 @@ factor_LDADD += $(LIB_GMP) uptime_LDADD += $(GETLOADAVG_LIBS) # for crypt and pam @@ -24,11 +24,10 @@ su_LDADD += $(LIB_CRYPT) $(PAM_LIBS) # for various ACL functions -diff --git a/src/getdef.c b/src/getdef.c -new file mode 100644 -index 0000000..e1872cf ---- /dev/null -+++ b/src/getdef.c +Index: src/getdef.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ src/getdef.c 2012-04-16 13:18:07.714692779 +0200 @@ -0,0 +1,259 @@ +/* Copyright (C) 2003, 2004, 2005 Thorsten Kukuk + Author: Thorsten Kukuk <[email protected]> @@ -289,11 +288,10 @@ +} + +#endif -diff --git a/src/getdef.h b/src/getdef.h -new file mode 100644 -index 0000000..2e86cf9 ---- /dev/null -+++ b/src/getdef.h +Index: src/getdef.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ src/getdef.h 2012-04-16 13:18:07.714692779 +0200 @@ -0,0 +1,29 @@ +/* Copyright (C) 2003, 2005 Thorsten Kukuk + Author: Thorsten Kukuk <[email protected]> @@ -324,10 +322,10 @@ +extern void free_getdef_data (void); + +#endif /* _GETDEF_H_ */ -diff --git a/src/su.c b/src/su.c -index 0071622..eaef195 100644 ---- a/src/su.c -+++ b/src/su.c +Index: src/su.c +=================================================================== +--- src/su.c.orig 2012-04-16 13:18:07.706692971 +0200 ++++ src/su.c 2012-04-16 13:18:34.630046909 +0200 @@ -111,6 +111,8 @@ # include <paths.h> #endif @@ -337,7 +335,7 @@ /* The default PATH for simulated logins to non-superuser accounts. */ #define DEFAULT_LOGIN_PATH "/usr/local/bin:/bin:/usr/bin" -@@ -475,8 +477,8 @@ modify_environment (const struct passwd *pw, const char *shell) +@@ -478,8 +480,8 @@ modify_environment (const struct passwd xsetenv ("USER", pw->pw_name); xsetenv ("LOGNAME", pw->pw_name); xsetenv ("PATH", (pw->pw_uid @@ -348,7 +346,7 @@ } else { -@@ -486,6 +488,12 @@ modify_environment (const struct passwd *pw, const char *shell) +@@ -489,6 +491,12 @@ modify_environment (const struct passwd { xsetenv ("HOME", pw->pw_dir); xsetenv ("SHELL", shell); @@ -361,7 +359,7 @@ if (pw->pw_uid) { xsetenv ("USER", pw->pw_name); -@@ -720,6 +728,7 @@ main (int argc, char **argv) +@@ -722,6 +730,7 @@ main (int argc, char **argv) #ifdef SYSLOG_FAILURE log_su (pw, false); #endif @@ -369,6 +367,3 @@ error (EXIT_CANCELED, 0, _("incorrect password")); } #ifdef SYSLOG_SUCCESS --- -1.7.1 - ++++++ coreutils-8.6-make-sure-sbin-resp-usr-sbin-are-in-PATH.diff ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -7,11 +7,11 @@ src/su.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 127 insertions(+), 0 deletions(-) -diff --git a/src/su.c b/src/su.c -index eaef195..d78f968 100644 ---- a/src/su.c -+++ b/src/su.c -@@ -455,6 +455,117 @@ correct_password (const struct passwd *pw) +Index: src/su.c +=================================================================== +--- src/su.c.orig 2012-04-16 13:00:25.489424170 +0200 ++++ src/su.c 2012-04-16 13:01:12.161193827 +0200 +@@ -458,6 +458,117 @@ correct_password (const struct passwd *p #endif /* !USE_PAM */ } @@ -126,10 +126,10 @@ + return ret; +} + - /* Update `environ' for the new shell based on PW, with SHELL being + /* Update 'environ' for the new shell based on PW, with SHELL being the value for the SHELL environment variable. */ -@@ -494,6 +605,22 @@ modify_environment (const struct passwd *pw, const char *shell) +@@ -497,6 +608,22 @@ modify_environment (const struct passwd DEFAULT_LOGIN_PATH) : getdef_str ("SUPATH", DEFAULT_ROOT_LOGIN_PATH))); @@ -152,6 +152,3 @@ if (pw->pw_uid) { xsetenv ("USER", pw->pw_name); --- -1.7.1 - ++++++ coreutils-8.6-pam-support-for-su.diff ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -11,9 +11,9 @@ Index: configure.ac =================================================================== ---- configure.ac.orig 2011-01-03 13:27:37.268088087 +0100 -+++ configure.ac 2011-01-03 13:28:05.256895209 +0100 -@@ -134,6 +134,20 @@ fi +--- configure.ac.orig 2012-03-24 19:22:13.000000000 +0100 ++++ configure.ac 2012-04-16 12:59:28.737919405 +0200 +@@ -185,6 +185,20 @@ fi AC_FUNC_FORK @@ -36,9 +36,9 @@ gl_ADD_PROG([optional_bin_progs], [chroot])) Index: src/Makefile.am =================================================================== ---- src/Makefile.am.orig 2011-01-03 13:27:37.268088087 +0100 -+++ src/Makefile.am 2011-01-03 13:28:16.038206110 +0100 -@@ -351,8 +351,8 @@ factor_LDADD += $(LIB_GMP) +--- src/Makefile.am.orig 2012-03-24 19:22:13.000000000 +0100 ++++ src/Makefile.am 2012-04-16 12:59:28.737919405 +0200 +@@ -357,8 +357,8 @@ factor_LDADD += $(LIB_GMP) # for getloadavg uptime_LDADD += $(GETLOADAVG_LIBS) @@ -51,8 +51,8 @@ copy_LDADD += $(LIB_ACL) Index: src/su.c =================================================================== ---- src/su.c.orig 2011-01-03 13:27:37.268088087 +0100 -+++ src/su.c 2011-01-03 13:28:16.177210120 +0100 +--- src/su.c.orig 2012-03-24 19:22:13.000000000 +0100 ++++ src/su.c 2012-04-16 13:00:06.496924665 +0200 @@ -37,6 +37,16 @@ restricts who can su to UID 0 accounts. RMS considers that to be fascist. @@ -106,7 +106,7 @@ static struct option const longopts[] = { {"command", required_argument, NULL, 'c'}, -@@ -200,7 +224,164 @@ log_su (struct passwd const *pw, bool su +@@ -203,7 +227,164 @@ log_su (struct passwd const *pw, bool su } #endif @@ -271,7 +271,7 @@ Return true if the user gives the correct password for entry PW, false if not. Return true without asking for a password if run by UID 0 or if PW has an empty password. */ -@@ -208,10 +389,52 @@ log_su (struct passwd const *pw, bool su +@@ -211,10 +392,52 @@ log_su (struct passwd const *pw, bool su static bool correct_password (const struct passwd *pw) { @@ -325,15 +325,15 @@ endspent (); if (sp) -@@ -232,6 +455,7 @@ correct_password (const struct passwd *p +@@ -235,6 +458,7 @@ correct_password (const struct passwd *p encrypted = crypt (unencrypted, correct); memset (unencrypted, 0, strlen (unencrypted)); return STREQ (encrypted, correct); +#endif /* !USE_PAM */ } - /* Update `environ' for the new shell based on PW, with SHELL being -@@ -274,19 +498,41 @@ modify_environment (const struct passwd + /* Update 'environ' for the new shell based on PW, with SHELL being +@@ -277,19 +501,41 @@ modify_environment (const struct passwd } } } @@ -377,7 +377,7 @@ if (setgid (pw->pw_gid)) error (EXIT_CANCELED, errno, _("cannot set group id")); if (setuid (pw->pw_uid)) -@@ -500,9 +746,21 @@ main (int argc, char **argv) +@@ -502,9 +748,21 @@ main (int argc, char **argv) shell = NULL; } shell = xstrdup (shell ? shell : pw->pw_shell); ++++++ coreutils-8.6-update-man-page-for-pam.diff ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -9,9 +9,9 @@ Index: doc/coreutils.texi =================================================================== ---- doc/coreutils.texi.orig 2011-01-05 14:27:40.715232991 +0100 -+++ doc/coreutils.texi 2011-01-05 14:27:41.929267939 +0100 -@@ -15290,8 +15290,11 @@ to certain shells, etc.). +--- doc/coreutils.texi.orig 2012-04-16 13:18:07.651694291 +0200 ++++ doc/coreutils.texi 2012-04-16 13:18:14.825522204 +0200 +@@ -15796,8 +15796,11 @@ to certain shells, etc.). @findex syslog @command{su} can optionally be compiled to use @code{syslog} to report failed, and optionally successful, @command{su} attempts. (If the system @@ -25,7 +25,7 @@ The program accepts the following options. Also see @ref{Common options}. -@@ -15372,33 +15375,6 @@ Exit status: +@@ -15878,33 +15881,6 @@ Exit status: the exit status of the subshell otherwise @end display ++++++ coreutils-8.9-singlethreaded-sort.patch ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -1,8 +1,8 @@ Index: src/sort.c =================================================================== ---- src/sort.c.orig -+++ src/sort.c -@@ -5263,8 +5263,8 @@ main (int argc, char **argv) +--- src/sort.c.orig 2012-04-16 13:17:12.342019601 +0200 ++++ src/sort.c 2012-04-16 13:17:12.463016705 +0200 +@@ -5288,8 +5288,8 @@ main (int argc, char **argv) { if (!nthreads) { ++++++ coreutils-acl-nofollow.patch ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -12,9 +12,9 @@ Index: lib/acl-internal.h =================================================================== ---- lib/acl-internal.h.orig 2011-10-05 17:31:39.000000000 +0200 -+++ lib/acl-internal.h 2011-10-13 16:02:40.895813897 +0200 -@@ -133,6 +133,12 @@ rpl_acl_set_fd (int fd, acl_t acl) +--- lib/acl-internal.h.orig 2012-03-09 08:31:00.000000000 +0100 ++++ lib/acl-internal.h 2012-04-16 13:17:12.470016537 +0200 +@@ -142,6 +142,12 @@ rpl_acl_set_fd (int fd, acl_t acl) # endif /* Linux-specific */ @@ -29,9 +29,9 @@ # define acl_from_mode(mode) (NULL) Index: lib/file-has-acl.c =================================================================== ---- lib/file-has-acl.c.orig 2011-10-05 17:31:39.000000000 +0200 -+++ lib/file-has-acl.c 2011-10-13 16:02:40.895813897 +0200 -@@ -454,12 +454,20 @@ file_has_acl (char const *name, struct s +--- lib/file-has-acl.c.orig 2012-03-09 08:31:00.000000000 +0100 ++++ lib/file-has-acl.c 2012-04-16 13:17:12.471016513 +0200 +@@ -492,12 +492,20 @@ file_has_acl (char const *name, struct s /* Linux, FreeBSD, MacOS X, IRIX, Tru64 */ int ret; @@ -55,8 +55,8 @@ { Index: m4/acl.m4 =================================================================== ---- m4/acl.m4.orig 2011-10-05 17:31:39.000000000 +0200 -+++ m4/acl.m4 2011-10-13 16:02:40.895813897 +0200 +--- m4/acl.m4.orig 2012-01-06 10:14:31.000000000 +0100 ++++ m4/acl.m4 2012-04-16 13:17:12.471016513 +0200 @@ -33,7 +33,7 @@ AC_DEFUN([gl_FUNC_ACL], AC_CHECK_FUNCS( [acl_get_file acl_get_fd acl_set_file acl_set_fd \ @@ -68,9 +68,9 @@ acl_to_short_text acl_free_text]) Index: ChangeLog =================================================================== ---- ChangeLog.orig 2011-10-12 11:56:55.000000000 +0200 -+++ ChangeLog 2011-10-13 16:04:55.772001787 +0200 -@@ -751,6 +751,14 @@ +--- ChangeLog.orig 2012-03-26 14:15:03.000000000 +0200 ++++ ChangeLog 2012-04-16 13:17:12.474016441 +0200 +@@ -2815,6 +2815,14 @@ MacOS X 10.7 has an fdatasync that is not declared, and is rumored to be ineffective. (Bug#9141) ++++++ coreutils-basename_documentation.patch ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -1,8 +1,8 @@ Index: doc/coreutils.texi =================================================================== ---- doc/coreutils.texi.orig 2012-03-09 17:39:52.000000000 +0100 -+++ doc/coreutils.texi 2012-03-09 17:54:51.848754123 +0100 -@@ -12370,6 +12370,16 @@ This section describes commands that man +--- doc/coreutils.texi.orig 2012-04-16 13:12:04.624344318 +0200 ++++ doc/coreutils.texi 2012-04-16 13:13:08.231837183 +0200 +@@ -12447,6 +12447,16 @@ This section describes commands that man @command{basename} removes any leading directory components from @var{name}. Synopsis: @@ -18,4 +18,4 @@ + @example basename @var{name} [@var{suffix}] - @end example + basename @var{option}... @var{name}... ++++++ coreutils-bnc#697897-setsid.patch ++++++ Index: doc/coreutils.info =================================================================== --- doc/coreutils.info.orig 2012-03-26 14:08:30.000000000 +0200 +++ doc/coreutils.info 2012-04-18 11:17:09.917545246 +0200 @@ -12788,6 +12788,10 @@ and optionally successful, `su' attempts `syslog'.) However, GNU `su' does not check if the user is a member of the `wheel' group; see below. + If the environment variable SU_COMMAND_SAME_SESSION is set, su will +not open a new session for running a command thus making -c behaves just +like -C. + The program accepts the following options. Also see *note Common options::. @@ -12796,6 +12800,12 @@ options::. Pass COMMAND, a single command line to run, to the shell with a `-c' option instead of starting an interactive shell. +`-C COMMAND' +`--session-command=COMMAND' + Pass COMMAND, a single command line to run, to the shell with a + `-c' option instead of starting an interactive and do not create + a new session for it. + `-f' `--fast' Pass the `-f' option to the shell. This probably only makes sense Index: src/su.c =================================================================== --- src/su.c.orig 2012-04-18 11:17:09.856546407 +0200 +++ src/su.c 2012-04-18 11:17:09.917545246 +0200 @@ -141,6 +141,9 @@ static bool simulate_login; /* If true, change some environment vars to indicate the user su'd to. */ static bool change_environment; +/* If true, then don't call setsid() with a command. */ +int same_session = 0; + #ifdef USE_PAM static bool _pam_session_opened; static bool _pam_cred_established; @@ -149,6 +152,7 @@ static bool _pam_cred_established; static struct option const longopts[] = { {"command", required_argument, NULL, 'c'}, + {"session-command", required_argument, NULL, 'C'}, {"fast", no_argument, NULL, 'f'}, {"login", no_argument, NULL, 'l'}, {"preserve-environment", no_argument, NULL, 'p'}, @@ -326,14 +330,29 @@ create_watching_parent (void) sigemptyset (&action.sa_mask); action.sa_flags = 0; sigemptyset (&ourset); - if (sigaddset (&ourset, SIGTERM) - || sigaddset (&ourset, SIGALRM) - || sigaction (SIGTERM, &action, NULL) - || sigprocmask (SIG_UNBLOCK, &ourset, NULL)) - { + + if (!same_session) + { + if (sigaddset(&ourset, SIGINT) || sigaddset(&ourset, SIGQUIT)) + { + error (0, errno, _("cannot set signal handler")); + caught_signal = true; + } + } + if (!caught_signal && (sigaddset(&ourset, SIGTERM) + || sigaddset(&ourset, SIGALRM) + || sigaction(SIGTERM, &action, NULL) + || sigprocmask(SIG_UNBLOCK, &ourset, NULL))) + { error (0, errno, _("cannot set signal handler")); caught_signal = true; } + if (!caught_signal && !same_session && (sigaction(SIGINT, &action, NULL) + || sigaction(SIGQUIT, &action, NULL))) + { + error (0, errno, _("cannot set signal handler")); + caught_signal = true; + } } if (!caught_signal) { @@ -750,6 +769,8 @@ Change the effective user id and group i \n\ -, -l, --login make the shell a login shell\n\ -c, --command=COMMAND pass a single COMMAND to the shell with -c\n\ + --session-command=COMMAND pass a single COMMAND to the shell with -c\n\ + and do not create a new session\n\ -f, --fast pass -f to the shell (for csh or tcsh)\n\ -m, --preserve-environment do not reset environment variables\n\ -p same as -m\n\ @@ -772,6 +793,7 @@ main (int argc, char **argv) int optc; const char *new_user = DEFAULT_USER; char *command = NULL; + int request_same_session = 0; char *shell = NULL; struct passwd *pw; struct passwd pw_copy; @@ -795,6 +817,14 @@ main (int argc, char **argv) { case 'c': command = optarg; + if (NULL != getenv ("SU_COMMAND_SAME_SESSION") || + NULL != getenv ("SU_COMMAND_OPENS_SESSION")) + request_same_session = 1; + break; + + case 'C': + command = optarg; + request_same_session = 1; break; case 'f': @@ -867,6 +897,9 @@ main (int argc, char **argv) } #endif + if (request_same_session || !command || !pw->pw_uid) + same_session = 1; + if (!shell && !change_environment) shell = getenv ("SHELL"); if (shell && getuid () != 0 && restricted_shell (pw->pw_shell)) @@ -889,6 +922,9 @@ main (int argc, char **argv) change_identity (pw); + if (!same_session) + setsid (); + /* Set environment after pam_open_session, which may put KRB5CCNAME into the pam_env, etc. */ ++++++ coreutils-getaddrinfo.patch ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -1,8 +1,8 @@ Index: gnulib-tests/test-getaddrinfo.c =================================================================== ---- gnulib-tests/test-getaddrinfo.c.orig 2010-03-13 16:21:08.000000000 +0100 -+++ gnulib-tests/test-getaddrinfo.c 2010-05-05 14:51:40.343025353 +0200 -@@ -88,11 +88,7 @@ simple (char const *host, char const *se +--- gnulib-tests/test-getaddrinfo.c.orig 2012-04-16 13:18:02.424819645 +0200 ++++ gnulib-tests/test-getaddrinfo.c 2012-04-16 13:18:07.737692228 +0200 +@@ -86,11 +86,7 @@ simple (char const *host, char const *se the test merely because someone is down the country on their in-law's farm. */ if (res == EAI_AGAIN) ++++++ coreutils-gl_printf_safe.patch ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -1,20 +1,8 @@ -Index: configure -=================================================================== ---- configure.orig 2011-10-12 11:45:49.000000000 +0200 -+++ configure 2011-10-13 16:01:35.584691275 +0200 -@@ -3641,7 +3641,6 @@ as_fn_append ac_func_list " alarm" - as_fn_append ac_header_list " sys/statvfs.h" - as_fn_append ac_header_list " sys/select.h" - as_fn_append ac_func_list " nl_langinfo" --gl_printf_safe=yes - as_fn_append ac_header_list " priv.h" - as_fn_append ac_header_list " pthread.h" - as_fn_append ac_header_list " utmp.h" Index: m4/gnulib-comp.m4 =================================================================== ---- m4/gnulib-comp.m4.orig 2011-10-09 19:02:39.000000000 +0200 -+++ m4/gnulib-comp.m4 2011-10-13 16:02:07.582261432 +0200 -@@ -1417,7 +1417,6 @@ gl_POSIXTM +--- m4/gnulib-comp.m4.orig 2012-03-20 23:34:39.000000000 +0100 ++++ m4/gnulib-comp.m4 2012-04-16 12:57:23.373219154 +0200 +@@ -1584,7 +1584,6 @@ gl_POSIXTM gl_POSIXVER gl_FUNC_PRINTF_FREXP gl_FUNC_PRINTF_FREXPL ++++++ coreutils-i18n-infloop.patch ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -1,8 +1,8 @@ Index: src/sort.c =================================================================== ---- src/sort.c.orig 2011-01-05 14:27:40.227218942 +0100 -+++ src/sort.c 2011-01-05 14:27:40.574228931 +0100 -@@ -3134,7 +3134,8 @@ keycompare_mb (const struct line *a, con +--- src/sort.c.orig 2012-04-16 13:23:11.726363043 +0200 ++++ src/sort.c 2012-04-16 13:23:20.474151036 +0200 +@@ -3161,7 +3161,8 @@ keycompare_mb (const struct line *a, con if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1) \ STATE = state_bak; \ if (!ignore) \ ++++++ coreutils-i18n-uninit.patch ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -1,8 +1,8 @@ Index: src/cut.c =================================================================== ---- src/cut.c.orig 2010-11-11 16:28:46.581137538 +0100 -+++ src/cut.c 2010-11-11 16:30:04.886974551 +0100 -@@ -868,7 +868,10 @@ cut_fields_mb (FILE *stream) +--- src/cut.c.orig 2012-04-16 13:17:12.321020103 +0200 ++++ src/cut.c 2012-04-16 13:17:12.333019817 +0200 +@@ -869,7 +869,10 @@ cut_fields_mb (FILE *stream) c = getc (stream); empty_input = (c == EOF); if (c != EOF) ++++++ coreutils-i18n.patch ++++++ ++++ 4160 lines (skipped) ++++++ coreutils-invalid-ids.patch ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -13,9 +13,9 @@ Index: src/chgrp.c =================================================================== ---- src/chgrp.c.orig 2010-01-01 14:06:47.000000000 +0100 -+++ src/chgrp.c 2010-05-05 14:03:28.279359192 +0200 -@@ -89,7 +89,7 @@ parse_group (const char *name) +--- src/chgrp.c.orig 2012-03-24 19:22:13.000000000 +0100 ++++ src/chgrp.c 2012-04-16 13:22:03.004026462 +0200 +@@ -88,7 +88,7 @@ parse_group (const char *name) { unsigned long int tmp; if (! (xstrtoul (name, NULL, 10, &tmp, "") == LONGINT_OK ++++++ coreutils-misc.patch ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -1,8 +1,8 @@ Index: gnulib-tests/test-isnanl.h =================================================================== ---- gnulib-tests/test-isnanl.h.orig 2011-10-09 19:02:27.000000000 +0200 -+++ gnulib-tests/test-isnanl.h 2011-10-13 15:58:39.627054718 +0200 -@@ -49,7 +49,7 @@ main () +--- gnulib-tests/test-isnanl.h.orig 2012-01-06 08:20:50.000000000 +0100 ++++ gnulib-tests/test-isnanl.h 2012-04-16 13:22:02.969027310 +0200 +@@ -47,7 +47,7 @@ main () /* Quiet NaN. */ ASSERT (isnanl (NaNl ())); @@ -11,7 +11,7 @@ /* A bit pattern that is different from a Quiet NaN. With a bit of luck, it's a Signalling NaN. */ { -@@ -91,6 +91,7 @@ main () +@@ -89,6 +89,7 @@ main () { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; ASSERT (isnanl (x.value)); } @@ -19,7 +19,7 @@ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in Intel IA-64 Architecture Software Developer's Manual, Volume 1: -@@ -124,6 +125,7 @@ main () +@@ -122,6 +123,7 @@ main () ASSERT (isnanl (x.value)); } #endif @@ -29,9 +29,9 @@ } Index: tests/misc/help-version =================================================================== ---- tests/misc/help-version.orig 2011-07-28 12:38:27.000000000 +0200 -+++ tests/misc/help-version 2011-10-13 15:58:39.628054705 +0200 -@@ -250,6 +250,7 @@ parted_setup () { args="-s $tmp_in mklab +--- tests/misc/help-version.orig 2012-03-24 19:22:13.000000000 +0100 ++++ tests/misc/help-version 2012-04-16 13:22:02.970027285 +0200 +@@ -251,6 +251,7 @@ parted_setup () { args="-s $tmp_in mklab for i in $built_programs; do # Skip these. case $i in chroot|stty|tty|false|chcon|runcon) continue;; esac @@ -41,9 +41,9 @@ echo z |gzip > $zin Index: tests/other-fs-tmpdir =================================================================== ---- tests/other-fs-tmpdir.orig 2011-07-28 12:38:27.000000000 +0200 -+++ tests/other-fs-tmpdir 2011-10-13 16:01:02.181139986 +0200 -@@ -44,6 +44,9 @@ for d in $CANDIDATE_TMP_DIRS; do +--- tests/other-fs-tmpdir.orig 2012-03-24 19:22:13.000000000 +0100 ++++ tests/other-fs-tmpdir 2012-04-16 13:22:02.970027285 +0200 +@@ -43,6 +43,9 @@ for d in $CANDIDATE_TMP_DIRS; do done ++++++ coreutils-ptr_int_casts.patch ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -1,8 +1,8 @@ Index: src/join.c =================================================================== ---- src/join.c.orig 2010-11-11 16:29:37.000000000 +0100 -+++ src/join.c 2010-11-11 17:04:33.776501344 +0100 -@@ -1273,7 +1273,7 @@ main (int argc, char **argv) +--- src/join.c.orig 2012-04-16 16:54:22.032279169 +0200 ++++ src/join.c 2012-04-16 16:54:22.163275636 +0200 +@@ -1320,7 +1320,7 @@ main (int argc, char **argv) case 't': { @@ -11,7 +11,7 @@ size_t newtablen; newtab = xstrdup (optarg); #if HAVE_MBRTOWC -@@ -1295,7 +1295,7 @@ main (int argc, char **argv) +@@ -1342,7 +1342,7 @@ main (int argc, char **argv) newtablen = 1; if (! newtab) { ++++++ coreutils-remove_hostname_documentation.patch ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -1,7 +1,7 @@ Index: doc/coreutils.texi =================================================================== ---- doc/coreutils.texi.orig 2012-01-03 16:48:48.000000000 +0100 -+++ doc/coreutils.texi 2012-03-09 15:48:33.736415777 +0100 +--- doc/coreutils.texi.orig 2012-03-26 07:38:37.000000000 +0200 ++++ doc/coreutils.texi 2012-04-16 13:22:12.487797130 +0200 @@ -66,7 +66,6 @@ * groups: (coreutils)groups invocation. Print group names a user is in. * head: (coreutils)head invocation. Output the first part of files. @@ -27,7 +27,7 @@ * hostid invocation:: Print numeric host identifier * uptime invocation:: Print system uptime and load -@@ -14010,7 +14008,6 @@ information. +@@ -14135,7 +14133,6 @@ information. * arch invocation:: Print machine hardware name. * nproc invocation:: Print the number of processors. * uname invocation:: Print system information. @@ -35,7 +35,7 @@ * hostid invocation:: Print numeric host identifier. * uptime invocation:: Print system uptime and load. @end menu -@@ -14797,15 +14794,6 @@ easily available, as is the case with Li +@@ -14922,15 +14919,6 @@ easily available, as is the case with Li Print the machine hardware name (sometimes called the hardware class or hardware type). @@ -51,7 +51,7 @@ @item -p @itemx --processor @opindex -p -@@ -14859,30 +14847,6 @@ Print the kernel version. +@@ -14984,30 +14972,6 @@ Print the kernel version. @exitstatus @@ -84,8 +84,8 @@ @section @command{hostid}: Print numeric host identifier Index: man/Makefile.am =================================================================== ---- man/Makefile.am.orig 2012-01-03 16:48:48.000000000 +0100 -+++ man/Makefile.am 2012-03-09 15:47:39.651756452 +0100 +--- man/Makefile.am.orig 2012-03-26 11:50:41.000000000 +0200 ++++ man/Makefile.am 2012-04-16 13:22:02.980027043 +0200 @@ -199,7 +199,7 @@ check-x-vs-1: @PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \ t=$@-t; \ @@ -97,9 +97,9 @@ rm $$t Index: man/Makefile.in =================================================================== ---- man/Makefile.in.orig 2012-01-06 16:49:22.000000000 +0100 -+++ man/Makefile.in 2012-03-09 15:47:39.652756427 +0100 -@@ -1874,7 +1874,7 @@ check-x-vs-1: +--- man/Makefile.in.orig 2012-03-26 11:50:44.000000000 +0200 ++++ man/Makefile.in 2012-04-16 13:22:02.980027043 +0200 +@@ -2030,7 +2030,7 @@ check-x-vs-1: @PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \ t=$@-t; \ (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\ ++++++ coreutils-sysinfo.patch ++++++ --- /var/tmp/diff_new_pack.f5D4Fa/_old 2012-04-23 09:12:25.000000000 +0200 +++ /var/tmp/diff_new_pack.f5D4Fa/_new 2012-04-23 09:12:25.000000000 +0200 @@ -1,8 +1,8 @@ Index: src/uname.c =================================================================== ---- src/uname.c.orig 2010-01-01 14:06:47.000000000 +0100 -+++ src/uname.c 2010-05-05 13:58:03.471359120 +0200 -@@ -339,6 +339,36 @@ main (int argc, char **argv) +--- src/uname.c.orig 2012-03-24 21:26:51.000000000 +0100 ++++ src/uname.c 2012-04-16 13:22:02.996026656 +0200 +@@ -337,6 +337,36 @@ main (int argc, char **argv) # endif } #endif @@ -39,7 +39,7 @@ if (! (toprint == UINT_MAX && element == unknown)) print_element (element); } -@@ -364,6 +394,18 @@ main (int argc, char **argv) +@@ -362,6 +392,18 @@ main (int argc, char **argv) element = hardware_platform; } #endif -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
