- Update to 8.5:

Bug fixes
  * cp and mv once again support preserving extended attributes.
  * cp now preserves "capabilities" when also preserving file ownership.7
  * ls --color once again honors the 'NORMAL' dircolors directive.
    [bug introduced in coreutils-6.11]
  * sort -M now handles abbreviated months that are aligned using
    blanks in the locale database.  Also locales with 8 bit characters
    are handled correctly, including multi byte locales with the caveat
    that multi byte characters are matched case sensitively.
  * sort again handles obsolescent key formats (+POS -POS) correctly. 
    Previously if -POS was specified, 1 field too many was used in the
    sort. [bug introduced in coreutils-7.2]
  New features
  * join now accepts the --header option, to treat the first line of
    each file as a header line to be joined and printed
    unconditionally.
  * timeout now accepts the --kill-after option which sends a kill
    signal to the monitored command if it's still running the specified
    duration after the initial signal was sent.
  * who: the "+/-" --mesg (-T) indicator of whether a user/tty is
    accepting messages could be incorrectly listed as "+", when in
    fact, the user was not accepting messages (mesg no).  Before, who
    would examine only the permission bits, and not consider the group
    of the TTY device file.  Thus, if a login tty's group would change
    somehow e.g., to "root", that would make it unwritable (via
    write(1)) by normal users, in spite of whatever the permission bits
    might imply.  Now, when configured using the
    --with-tty-group[=NAME] option, who also compares the group of the
    TTY device with NAME (or "tty" if no group name is specified).
  Changes in behavior
  * ls --color no longer emits the final 3-byte color-resetting escape
    sequence when it would be a no-op.
  * join -t '' no longer emits an error and instead operates on each
    line as a whole (even if they contain NUL characters).
  For other changes since 7.1 see NEWS.
- Split-up coreutils-%%{version}.diff as far as possible.
- Prefix all patches with coreutils-.
- All patches have the .patch suffix.
- Use the i18n patch from Archlinux as it fixes at least one test
  suite failure.

OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=9
This commit is contained in:
Philipp Thomas 2010-05-07 15:54:35 +00:00 committed by Git OBS Bridge
parent 3d1a43cebf
commit d58c8ecf79
28 changed files with 4673 additions and 4692 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
Index: src/su.c Index: src/su.c
=================================================================== ===================================================================
--- src/su.c.orig 2010-05-04 17:29:12.779359204 +0200 --- src/su.c.orig 2010-05-05 14:46:48.000000000 +0200
+++ src/su.c 2010-05-04 17:29:12.939359620 +0200 +++ src/su.c 2010-05-05 14:48:55.023359308 +0200
@@ -467,6 +467,117 @@ correct_password (const struct passwd *p @@ -454,6 +454,117 @@ correct_password (const struct passwd *p
#endif /* !USE_PAM */ #endif /* !USE_PAM */
} }
@ -120,7 +120,7 @@ Index: src/su.c
/* 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. */ the value for the SHELL environment variable. */
@@ -506,6 +617,22 @@ modify_environment (const struct passwd @@ -493,6 +604,22 @@ modify_environment (const struct passwd
DEFAULT_LOGIN_PATH) DEFAULT_LOGIN_PATH)
: getdef_str ("SUPATH", : getdef_str ("SUPATH",
DEFAULT_ROOT_LOGIN_PATH))); DEFAULT_ROOT_LOGIN_PATH)));
@ -140,6 +140,6 @@ Index: src/su.c
+ free (new); + free (new);
+ } + }
+ } + }
if (pw->pw_uid) if (pw->pw_uid)
{ {
xsetenv ("USER", pw->pw_name); xsetenv ("USER", pw->pw_name);

View File

@ -1,6 +1,10 @@
--- Makefile.in Add pam support in su
+++ Makefile.in
@@ -732,6 +732,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ Index: Makefile.in
===================================================================
--- Makefile.in.orig 2010-04-23 17:58:41.000000000 +0200
+++ Makefile.in 2010-05-06 19:37:44.784359208 +0200
@@ -961,6 +961,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
@ -8,41 +12,35 @@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@ PERL = @PERL@
POSIX_SHELL = @POSIX_SHELL@ POSIX_SHELL = @POSIX_SHELL@
--- configure Index: configure
+++ configure ===================================================================
@@ -612,6 +612,7 @@ OPTIONAL_BIN_PROGS --- configure.orig 2010-05-06 19:37:44.688359301 +0200
+++ configure 2010-05-06 19:37:44.816359169 +0200
@@ -631,6 +631,7 @@ OPTIONAL_BIN_PROGS
INSTALL_SU INSTALL_SU
LIB_GMP LIB_GMP
LIB_CRYPT LIB_CRYPT
+PAM_LIBS +PAM_LIBS
GNULIB_WARN_CFLAGS
WERROR_CFLAGS WERROR_CFLAGS
SEQ_LIBM SEQ_LIBM
LIB_CAP @@ -1501,6 +1502,7 @@ enable_xattr
@@ -1231,6 +1232,7 @@ with_included_regex
enable_xattr
enable_libcap enable_libcap
with_tty_group
enable_gcc_warnings enable_gcc_warnings
+enable_pam +enable_pam
with_gmp with_gmp
enable_install_program enable_install_program
enable_no_install_program enable_no_install_program
@@ -1877,6 +1879,7 @@ Optional Features: @@ -2152,6 +2154,7 @@ Optional Features:
--disable-xattr do not support extended attributes --disable-xattr do not support extended attributes
--disable-libcap disable libcap support --disable-libcap disable libcap support
--enable-gcc-warnings turn on lots of GCC warnings (not recommended) --enable-gcc-warnings turn on lots of GCC warnings (for developers)
+ --disable-pam Enable PAM support in su (default=auto) + --disable-pam Disable PAM support in su (default=auto)
--enable-install-program=PROG_LIST --enable-install-program=PROG_LIST
install the programs in PROG_LIST (comma-separated, install the programs in PROG_LIST (comma-separated,
default: none) default: none)
@@ -26931,7 +26934,6 @@ fi @@ -51989,6 +51992,111 @@ $as_echo "#define HAVE_WORKING_FORK 1" >
-
XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
@@ -39096,6 +39098,111 @@ $as_echo "#define HAVE_WORKING_FORK 1" >
fi fi
@ -152,11 +150,13 @@
+$as_echo "$enable_pam" >&6; } +$as_echo "$enable_pam" >&6; }
+ +
optional_bin_progs= optional_bin_progs=
for ac_func in uname for ac_func in chroot
do do :
--- configure.ac Index: configure.ac
+++ configure.ac ===================================================================
@@ -79,6 +79,20 @@ fi --- configure.ac.orig 2010-03-13 16:14:09.000000000 +0100
+++ configure.ac 2010-05-06 19:37:44.843292013 +0200
@@ -128,6 +128,20 @@ fi
AC_FUNC_FORK AC_FUNC_FORK
@ -175,11 +175,13 @@
+AC_MSG_RESULT([$enable_pam]) +AC_MSG_RESULT([$enable_pam])
+ +
optional_bin_progs= optional_bin_progs=
AC_CHECK_FUNCS([uname], AC_CHECK_FUNCS([chroot],
gl_ADD_PROG([optional_bin_progs], [uname])) gl_ADD_PROG([optional_bin_progs], [chroot]))
--- doc/Makefile.in Index: doc/Makefile.in
+++ doc/Makefile.in ===================================================================
@@ -713,6 +713,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ --- doc/Makefile.in.orig 2010-04-23 17:58:37.000000000 +0200
+++ doc/Makefile.in 2010-05-06 19:37:44.868359246 +0200
@@ -957,6 +957,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
@ -187,9 +189,11 @@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@ PERL = @PERL@
POSIX_SHELL = @POSIX_SHELL@ POSIX_SHELL = @POSIX_SHELL@
--- gnulib-tests/Makefile.in Index: gnulib-tests/Makefile.in
+++ gnulib-tests/Makefile.in ===================================================================
@@ -1421,6 +1421,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ --- gnulib-tests/Makefile.in.orig 2010-04-23 18:00:33.000000000 +0200
+++ gnulib-tests/Makefile.in 2010-05-06 19:37:44.871374260 +0200
@@ -2191,6 +2191,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
@ -197,9 +201,11 @@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@ PERL = @PERL@
POSIX_SHELL = @POSIX_SHELL@ POSIX_SHELL = @POSIX_SHELL@
--- lib/Makefile.in Index: lib/Makefile.in
+++ lib/Makefile.in ===================================================================
@@ -763,6 +763,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ --- lib/Makefile.in.orig 2010-04-23 17:58:38.000000000 +0200
+++ lib/Makefile.in 2010-05-06 19:37:59.594863753 +0200
@@ -1006,6 +1006,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
@ -207,9 +213,11 @@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@ PERL = @PERL@
POSIX_SHELL = @POSIX_SHELL@ POSIX_SHELL = @POSIX_SHELL@
--- man/Makefile.in Index: man/Makefile.in
+++ man/Makefile.in ===================================================================
@@ -703,6 +703,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ --- man/Makefile.in.orig 2010-05-06 19:37:44.618920753 +0200
+++ man/Makefile.in 2010-05-06 19:37:44.934868934 +0200
@@ -926,6 +926,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
@ -217,24 +225,28 @@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@ PERL = @PERL@
POSIX_SHELL = @POSIX_SHELL@ POSIX_SHELL = @POSIX_SHELL@
--- src/Makefile.am Index: src/Makefile.am
+++ src/Makefile.am ===================================================================
@@ -147,7 +147,8 @@ tail_LDADD = $(nanosec_libs) --- src/Makefile.am.orig 2010-04-23 15:44:14.000000000 +0200
# If necessary, add -lm to resolve use of pow in lib/strtod.c. +++ src/Makefile.am 2010-05-06 19:37:59.594863753 +0200
uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS) @@ -364,7 +364,8 @@ factor_LDADD += $(LIB_GMP)
uptime_LDADD += $(GETLOADAVG_LIBS)
-su_LDADD = $(LDADD) $(LIB_CRYPT) # for crypt
-su_LDADD += $(LIB_CRYPT)
+su_SOURCES = su.c getdef.c +su_SOURCES = su.c getdef.c
+su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS) +su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS)
dir_LDADD += $(LIB_ACL) # for various ACL functions
ls_LDADD += $(LIB_ACL) copy_LDADD += $(LIB_ACL)
--- src/Makefile.in Index: src/Makefile.in
+++ src/Makefile.in ===================================================================
@@ -605,9 +605,10 @@ stty_OBJECTS = stty.$(OBJEXT) --- src/Makefile.in.orig 2010-04-23 18:35:11.000000000 +0200
stty_LDADD = $(LDADD) +++ src/Makefile.in 2010-05-06 19:37:59.594863753 +0200
stty_DEPENDENCIES = libver.a ../lib/libcoreutils.a \ @@ -553,9 +553,10 @@ stdbuf_DEPENDENCIES = $(am__DEPENDENCIES
$(am__DEPENDENCIES_1) ../lib/libcoreutils.a stty_SOURCES = stty.c
stty_OBJECTS = stty.$(OBJEXT)
stty_DEPENDENCIES = $(am__DEPENDENCIES_2)
-su_SOURCES = su.c -su_SOURCES = su.c
-su_OBJECTS = su.$(OBJEXT) -su_OBJECTS = su.$(OBJEXT)
-su_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) -su_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
@ -244,40 +256,28 @@
+ $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1)
sum_SOURCES = sum.c sum_SOURCES = sum.c
sum_OBJECTS = sum.$(OBJEXT) sum_OBJECTS = sum.$(OBJEXT)
sum_LDADD = $(LDADD) sum_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -735,11 +736,11 @@ SOURCES = $(nodist_libver_a_SOURCES) $(_ @@ -665,8 +666,8 @@ SOURCES = $(nodist_libver_a_SOURCES) $(_
$(rm_SOURCES) $(rmdir_SOURCES) runcon.c seq.c setuidgid.c \
$(sha1sum_SOURCES) $(sha224sum_SOURCES) $(sha256sum_SOURCES) \
$(sha384sum_SOURCES) $(sha512sum_SOURCES) shred.c shuf.c \
- sleep.c sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c \
- tail.c tee.c test.c $(timeout_SOURCES) touch.c tr.c true.c \
- truncate.c tsort.c tty.c $(uname_SOURCES) unexpand.c uniq.c \
- unlink.c uptime.c users.c $(vdir_SOURCES) wc.c who.c whoami.c \
- yes.c
+ sleep.c sort.c split.c stat.c stty.c $(su_SOURCES) sum.c \
+ sync.c tac.c tail.c tee.c test.c $(timeout_SOURCES) touch.c \
+ tr.c true.c truncate.c tsort.c tty.c $(uname_SOURCES) \
+ unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \
+ wc.c who.c whoami.c yes.c
DIST_SOURCES = $(__SOURCES) $(arch_SOURCES) base64.c basename.c cat.c \
chcon.c $(chgrp_SOURCES) chmod.c $(chown_SOURCES) chroot.c \
cksum.c comm.c $(cp_SOURCES) csplit.c cut.c date.c dd.c df.c \
@@ -754,10 +755,10 @@ DIST_SOURCES = $(__SOURCES) $(arch_SOURC
$(rmdir_SOURCES) runcon.c seq.c setuidgid.c $(sha1sum_SOURCES) \ $(rmdir_SOURCES) runcon.c seq.c setuidgid.c $(sha1sum_SOURCES) \
$(sha224sum_SOURCES) $(sha256sum_SOURCES) $(sha384sum_SOURCES) \ $(sha224sum_SOURCES) $(sha256sum_SOURCES) $(sha384sum_SOURCES) \
$(sha512sum_SOURCES) shred.c shuf.c sleep.c sort.c split.c \ $(sha512sum_SOURCES) shred.c shuf.c sleep.c sort.c split.c \
- stat.c stty.c su.c sum.c sync.c tac.c tail.c tee.c test.c \ - stat.c stdbuf.c stty.c su.c sum.c sync.c tac.c tail.c tee.c \
- $(timeout_SOURCES) touch.c tr.c true.c truncate.c tsort.c \ - test.c $(timeout_SOURCES) touch.c tr.c true.c truncate.c \
- tty.c $(uname_SOURCES) unexpand.c uniq.c unlink.c uptime.c \ + stat.c stdbuf.c stty.c $(su_SOURCES) sum.c sync.c tac.c tail.c \
- users.c $(vdir_SOURCES) wc.c who.c whoami.c yes.c + tee.c test.c $(timeout_SOURCES) touch.c tr.c true.c truncate.c \
+ stat.c stty.c $(su_SOURCES) sum.c sync.c tac.c tail.c tee.c \ tsort.c tty.c $(uname_SOURCES) unexpand.c uniq.c unlink.c \
+ test.c $(timeout_SOURCES) touch.c tr.c true.c truncate.c \ uptime.c users.c $(vdir_SOURCES) wc.c who.c whoami.c yes.c
+ tsort.c tty.c $(uname_SOURCES) unexpand.c uniq.c unlink.c \ DIST_SOURCES = $(__SOURCES) $(arch_SOURCES) base64.c basename.c cat.c \
+ uptime.c users.c $(vdir_SOURCES) wc.c who.c whoami.c yes.c @@ -683,7 +684,7 @@ DIST_SOURCES = $(__SOURCES) $(arch_SOURC
HEADERS = $(noinst_HEADERS) $(rm_SOURCES) $(rmdir_SOURCES) runcon.c seq.c setuidgid.c \
ETAGS = etags $(sha1sum_SOURCES) $(sha224sum_SOURCES) $(sha256sum_SOURCES) \
CTAGS = ctags $(sha384sum_SOURCES) $(sha512sum_SOURCES) shred.c shuf.c \
@@ -1209,6 +1210,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ - sleep.c sort.c split.c stat.c stdbuf.c stty.c su.c sum.c \
+ sleep.c sort.c split.c stat.c stdbuf.c stty.c $(su_SOURCES) sum.c \
sync.c tac.c tail.c tee.c test.c $(timeout_SOURCES) touch.c \
tr.c true.c truncate.c tsort.c tty.c $(uname_SOURCES) \
unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \
@@ -1338,6 +1339,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
@ -285,17 +285,17 @@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@ PERL = @PERL@
POSIX_SHELL = @POSIX_SHELL@ POSIX_SHELL = @POSIX_SHELL@
@@ -1511,7 +1513,8 @@ tail_LDADD = $(nanosec_libs) @@ -1743,7 +1745,8 @@ stdbuf_LDADD = $(LDADD) $(LIBICONV)
stty_LDADD = $(LDADD)
# If necessary, add -lm to resolve use of pow in lib/strtod.c. # for crypt
uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS)
-su_LDADD = $(LDADD) $(LIB_CRYPT) -su_LDADD = $(LDADD) $(LIB_CRYPT)
+su_SOURCES = su.c getdef.c +su_SOURCES = su.c getdef.c
+su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS) +su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS)
stat_LDADD = $(LDADD) $(LIB_SELINUX) sum_LDADD = $(LDADD)
sync_LDADD = $(LDADD)
# programs that use getaddrinfo (e.g., via canon_host) tac_LDADD = $(LDADD) $(LIB_GETHRXTIME)
@@ -2040,6 +2043,7 @@ distclean-compile: @@ -2386,6 +2389,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/false.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/false.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fold.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fold.Po@am__quote@
@ -303,8 +303,10 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlimits.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlimits.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-copy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-copy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-cp-hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-cp-hash.Po@am__quote@
--- src/getdef.c Index: src/getdef.c
+++ src/getdef.c ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ src/getdef.c 2010-05-06 19:37:45.014990147 +0200
@@ -0,0 +1,259 @@ @@ -0,0 +1,259 @@
+/* Copyright (C) 2003, 2004, 2005 Thorsten Kukuk +/* Copyright (C) 2003, 2004, 2005 Thorsten Kukuk
+ Author: Thorsten Kukuk <kukuk@suse.de> + Author: Thorsten Kukuk <kukuk@suse.de>
@ -565,8 +567,10 @@
+} +}
+ +
+#endif +#endif
--- src/getdef.h Index: src/getdef.h
+++ src/getdef.h ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ src/getdef.h 2010-05-06 19:37:45.054863903 +0200
@@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
+/* Copyright (C) 2003, 2005 Thorsten Kukuk +/* Copyright (C) 2003, 2005 Thorsten Kukuk
+ Author: Thorsten Kukuk <kukuk@suse.de> + Author: Thorsten Kukuk <kukuk@suse.de>
@ -597,8 +601,10 @@
+extern void free_getdef_data (void); +extern void free_getdef_data (void);
+ +
+#endif /* _GETDEF_H_ */ +#endif /* _GETDEF_H_ */
--- src/su.c Index: src/su.c
+++ src/su.c ===================================================================
--- src/su.c.orig 2010-01-01 14:06:47.000000000 +0100
+++ src/su.c 2010-05-06 19:37:59.538860383 +0200
@@ -37,6 +37,16 @@ @@ -37,6 +37,16 @@
restricts who can su to UID 0 accounts. RMS considers that to restricts who can su to UID 0 accounts. RMS considers that to
be fascist. be fascist.
@ -616,7 +622,7 @@
Compile-time options: Compile-time options:
-DSYSLOG_SUCCESS Log successful su's (by default, to root) with syslog. -DSYSLOG_SUCCESS Log successful su's (by default, to root) with syslog.
-DSYSLOG_FAILURE Log failed su's (by default, to root) with syslog. -DSYSLOG_FAILURE Log failed su's (by default, to root) with syslog.
@@ -52,6 +62,13 @@ @@ -52,12 +62,22 @@
#include <sys/types.h> #include <sys/types.h>
#include <pwd.h> #include <pwd.h>
#include <grp.h> #include <grp.h>
@ -628,9 +634,8 @@
+#include <sys/fsuid.h> +#include <sys/fsuid.h>
+#endif +#endif
/* Hide any system prototype for getusershell. #include "system.h"
This is necessary because some Cray systems have a conflicting #include "getpass.h"
@@ -65,6 +82,9 @@
#if HAVE_SYSLOG_H && HAVE_SYSLOG #if HAVE_SYSLOG_H && HAVE_SYSLOG
# include <syslog.h> # include <syslog.h>
@ -640,7 +645,7 @@
#else #else
# undef SYSLOG_SUCCESS # undef SYSLOG_SUCCESS
# undef SYSLOG_FAILURE # undef SYSLOG_FAILURE
@@ -98,19 +118,13 @@ @@ -91,19 +111,13 @@
# include <paths.h> # include <paths.h>
#endif #endif
@ -664,18 +669,20 @@
/* The shell to run if none is given in the user's passwd entry. */ /* The shell to run if none is given in the user's passwd entry. */
#define DEFAULT_SHELL "/bin/sh" #define DEFAULT_SHELL "/bin/sh"
@@ -118,13 +132,22 @@ @@ -111,8 +125,9 @@
/* The user to become if none is specified. */ /* The user to become if none is specified. */
#define DEFAULT_USER "root" #define DEFAULT_USER "root"
+#ifndef USE_PAM +#ifndef USE_PAM
char *crypt (char const *key, char const *salt); char *crypt (char const *key, char const *salt);
-
+#endif +#endif
char *getusershell (void); static void run_shell (char const *, char const *, char **, size_t)
void endusershell (void); ATTRIBUTE_NORETURN;
void setusershell (void);
extern char **environ; @@ -125,6 +140,13 @@ static bool simulate_login;
/* If true, change some environment vars to indicate the user su'd to. */
static bool change_environment;
+#ifdef USE_PAM +#ifdef USE_PAM
+static bool _pam_session_opened; +static bool _pam_session_opened;
@ -684,10 +691,10 @@
+static void create_watching_parent (void); +static void create_watching_parent (void);
+#endif +#endif
+ +
static void run_shell (char const *, char const *, char **, size_t) static struct option const longopts[] =
ATTRIBUTE_NORETURN; {
{"command", required_argument, NULL, 'c'},
@@ -212,7 +235,162 @@ log_su (struct passwd const *pw, bool su @@ -200,7 +222,162 @@ log_su (struct passwd const *pw, bool su
} }
#endif #endif
@ -772,7 +779,7 @@
+ /* the child proceeds to run the shell */ + /* the child proceeds to run the shell */
+ if (child == 0) + if (child == 0)
+ return; + return;
+ +
+ /* In the parent watch the child. */ + /* In the parent watch the child. */
+ +
+ /* su without pam support does not have a helper that keeps + /* su without pam support does not have a helper that keeps
@ -850,7 +857,7 @@
Return true if the user gives the correct password for entry PW, 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 false if not. Return true without asking for a password if run by UID 0
or if PW has an empty password. */ or if PW has an empty password. */
@@ -220,10 +398,52 @@ log_su (struct passwd const *pw, bool su @@ -208,10 +385,52 @@ log_su (struct passwd const *pw, bool su
static bool static bool
correct_password (const struct passwd *pw) correct_password (const struct passwd *pw)
{ {
@ -904,7 +911,7 @@
endspent (); endspent ();
if (sp) if (sp)
@@ -244,6 +464,7 @@ correct_password (const struct passwd *p @@ -232,6 +451,7 @@ correct_password (const struct passwd *p
encrypted = crypt (unencrypted, correct); encrypted = crypt (unencrypted, correct);
memset (unencrypted, 0, strlen (unencrypted)); memset (unencrypted, 0, strlen (unencrypted));
return STREQ (encrypted, correct); return STREQ (encrypted, correct);
@ -912,33 +919,33 @@
} }
/* Update `environ' for the new shell based on PW, with SHELL being /* Update `environ' for the new shell based on PW, with SHELL being
@@ -268,8 +489,8 @@ modify_environment (const struct passwd @@ -256,8 +476,8 @@ modify_environment (const struct passwd
xsetenv ("USER", pw->pw_name); xsetenv ("USER", pw->pw_name);
xsetenv ("LOGNAME", pw->pw_name); xsetenv ("LOGNAME", pw->pw_name);
xsetenv ("PATH", (pw->pw_uid xsetenv ("PATH", (pw->pw_uid
- ? DEFAULT_LOGIN_PATH - ? DEFAULT_LOGIN_PATH
- : DEFAULT_ROOT_LOGIN_PATH)); - : DEFAULT_ROOT_LOGIN_PATH));
+ ? getdef_str ("PATH", DEFAULT_LOGIN_PATH) + ? getdef_str ("PATH", DEFAULT_LOGIN_PATH)
+ : getdef_str ("SUPATH", DEFAULT_ROOT_LOGIN_PATH))); + : getdef_str ("SUPATH", DEFAULT_ROOT_LOGIN_PATH)));
} }
else else
{ {
@@ -279,6 +500,12 @@ modify_environment (const struct passwd @@ -267,6 +487,12 @@ modify_environment (const struct passwd
{ {
xsetenv ("HOME", pw->pw_dir); xsetenv ("HOME", pw->pw_dir);
xsetenv ("SHELL", shell); xsetenv ("SHELL", shell);
+ if (getdef_bool ("ALWAYS_SET_PATH", 0)) + if (getdef_bool ("ALWAYS_SET_PATH", 0))
+ xsetenv ("PATH", (pw->pw_uid + xsetenv ("PATH", (pw->pw_uid
+ ? getdef_str ("PATH", + ? getdef_str ("PATH",
+ DEFAULT_LOGIN_PATH) + DEFAULT_LOGIN_PATH)
+ : getdef_str ("SUPATH", + : getdef_str ("SUPATH",
+ DEFAULT_ROOT_LOGIN_PATH))); + DEFAULT_ROOT_LOGIN_PATH)));
if (pw->pw_uid) if (pw->pw_uid)
{ {
xsetenv ("USER", pw->pw_name); xsetenv ("USER", pw->pw_name);
@@ -286,19 +513,41 @@ modify_environment (const struct passwd @@ -274,19 +500,41 @@ modify_environment (const struct passwd
} }
} }
} }
+ +
+#ifdef USE_PAM +#ifdef USE_PAM
@ -955,7 +962,7 @@
#ifdef HAVE_INITGROUPS #ifdef HAVE_INITGROUPS
errno = 0; errno = 0;
if (initgroups (pw->pw_name, pw->pw_gid) == -1) if (initgroups (pw->pw_name, pw->pw_gid) == -1)
- error (EXIT_FAILURE, errno, _("cannot set groups")); - error (EXIT_CANCELED, errno, _("cannot set groups"));
+ { + {
+#ifdef USE_PAM +#ifdef USE_PAM
+ cleanup_pam (PAM_ABORT); + cleanup_pam (PAM_ABORT);
@ -978,17 +985,17 @@
+change_identity (const struct passwd *pw) +change_identity (const struct passwd *pw)
+{ +{
if (setgid (pw->pw_gid)) if (setgid (pw->pw_gid))
error (EXIT_FAILURE, errno, _("cannot set group id")); error (EXIT_CANCELED, errno, _("cannot set group id"));
if (setuid (pw->pw_uid)) if (setuid (pw->pw_uid))
@@ -491,6 +740,7 @@ main (int argc, char **argv) @@ -479,6 +727,7 @@ main (int argc, char **argv)
#ifdef SYSLOG_FAILURE #ifdef SYSLOG_FAILURE
log_su (pw, false); log_su (pw, false);
#endif #endif
+ sleep (getdef_num ("FAIL_DELAY", 1)); + sleep (getdef_num ("FAIL_DELAY", 1));
error (EXIT_FAILURE, 0, _("incorrect password")); error (EXIT_CANCELED, 0, _("incorrect password"));
} }
#ifdef SYSLOG_SUCCESS #ifdef SYSLOG_SUCCESS
@@ -512,9 +762,21 @@ main (int argc, char **argv) @@ -500,9 +749,21 @@ main (int argc, char **argv)
shell = NULL; shell = NULL;
} }
shell = xstrdup (shell ? shell : pw->pw_shell); shell = xstrdup (shell ? shell : pw->pw_shell);
@ -1011,9 +1018,11 @@
if (simulate_login && chdir (pw->pw_dir) != 0) if (simulate_login && chdir (pw->pw_dir) != 0)
error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir); error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
--- tests/Makefile.in Index: tests/Makefile.in
+++ tests/Makefile.in ===================================================================
@@ -677,6 +677,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ --- tests/Makefile.in.orig 2010-04-23 17:58:39.000000000 +0200
+++ tests/Makefile.in 2010-05-06 19:37:45.091861849 +0200
@@ -986,6 +986,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@

View File

@ -1,28 +1,35 @@
--- lib/Makefile.am Index: lib/Makefile.am
+++ lib/Makefile.am ===================================================================
@@ -18,6 +18,7 @@ --- lib/Makefile.am.orig 2010-01-01 14:06:47.000000000 +0100
+++ lib/Makefile.am 2010-05-05 14:38:03.083359277 +0200
@@ -17,7 +17,7 @@
include gnulib.mk include gnulib.mk
AM_CFLAGS = $(WARN_CFLAGS) # $(WERROR_CFLAGS) -AM_CFLAGS += $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
+AM_CFLAGS += -fpie +AM_CFLAGS += $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) -fpie
libcoreutils_a_SOURCES += \ libcoreutils_a_SOURCES += \
buffer-lcm.c buffer-lcm.h \ buffer-lcm.c buffer-lcm.h \
--- lib/Makefile.in Index: lib/Makefile.in
+++ lib/Makefile.in ===================================================================
@@ -1169,7 +1169,7 @@ GPERF = gperf --- lib/Makefile.in.orig 2010-05-05 14:37:08.000000000 +0200
LINK_WARNING_H = $(top_srcdir)/build-aux/link-warning.h +++ lib/Makefile.in 2010-05-05 14:38:31.946859277 +0200
charset_alias = $(DESTDIR)$(libdir)/charset.alias @@ -1432,7 +1432,7 @@ DISTCLEANFILES =
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp MAINTAINERCLEANFILES = getdate.c iconv_open-aix.h iconv_open-hpux.h \
-AM_CFLAGS = $(WARN_CFLAGS) # $(WERROR_CFLAGS) iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h
+AM_CFLAGS = $(WARN_CFLAGS) -fpie AM_CPPFLAGS =
all: $(BUILT_SOURCES) config.h -AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
$(MAKE) $(AM_MAKEFLAGS) all-recursive +AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) -fpie
libcoreutils_a_SOURCES = set-mode-acl.c copy-acl.c file-has-acl.c \
--- src/Makefile.am areadlink.c areadlink-with-size.c areadlinkat.c argv-iter.c \
+++ src/Makefile.am argv-iter.h base64.h base64.c bitrotate.h c-ctype.h c-ctype.c \
@@ -149,6 +149,10 @@ uptime_LDADD = $(LDADD) $(POW_LIB) $(GET Index: src/Makefile.am
===================================================================
--- src/Makefile.am.orig 2010-05-05 14:37:08.000000000 +0200
+++ src/Makefile.am 2010-05-05 14:39:20.956359221 +0200
@@ -366,6 +366,10 @@ uptime_LDADD += $(GETLOADAVG_LIBS)
# for crypt
su_SOURCES = su.c getdef.c su_SOURCES = su.c getdef.c
su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS) su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS)
+su_CFLAGS = -fpie +su_CFLAGS = -fpie
@ -30,14 +37,16 @@
+timeout_CFLAGS = -fpie +timeout_CFLAGS = -fpie
+timeout_LDFLAGS = -pie +timeout_LDFLAGS = -pie
dir_LDADD += $(LIB_ACL) # for various ACL functions
ls_LDADD += $(LIB_ACL) copy_LDADD += $(LIB_ACL)
--- src/Makefile.in Index: src/Makefile.in
+++ src/Makefile.in ===================================================================
@@ -605,10 +605,12 @@ stty_OBJECTS = stty.$(OBJEXT) --- src/Makefile.in.orig 2010-05-05 14:37:08.000000000 +0200
stty_LDADD = $(LDADD) +++ src/Makefile.in 2010-05-05 14:46:02.318905172 +0200
stty_DEPENDENCIES = libver.a ../lib/libcoreutils.a \ @@ -553,10 +553,12 @@ stdbuf_DEPENDENCIES = $(am__DEPENDENCIES
$(am__DEPENDENCIES_1) ../lib/libcoreutils.a stty_SOURCES = stty.c
stty_OBJECTS = stty.$(OBJEXT)
stty_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_su_OBJECTS = su.$(OBJEXT) getdef.$(OBJEXT) -am_su_OBJECTS = su.$(OBJEXT) getdef.$(OBJEXT)
+am_su_OBJECTS = su-su.$(OBJEXT) su-getdef.$(OBJEXT) +am_su_OBJECTS = su-su.$(OBJEXT) su-getdef.$(OBJEXT)
su_OBJECTS = $(am_su_OBJECTS) su_OBJECTS = $(am_su_OBJECTS)
@ -47,8 +56,8 @@
+ $@ + $@
sum_SOURCES = sum.c sum_SOURCES = sum.c
sum_OBJECTS = sum.$(OBJEXT) sum_OBJECTS = sum.$(OBJEXT)
sum_LDADD = $(LDADD) sum_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -633,9 +635,12 @@ tee_DEPENDENCIES = libver.a ../lib/libco @@ -576,9 +578,12 @@ tee_DEPENDENCIES = $(am__DEPENDENCIES_2)
test_SOURCES = test.c test_SOURCES = test.c
test_OBJECTS = test.$(OBJEXT) test_OBJECTS = test.$(OBJEXT)
test_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
@ -62,36 +71,36 @@
touch_SOURCES = touch.c touch_SOURCES = touch.c
touch_OBJECTS = touch.$(OBJEXT) touch_OBJECTS = touch.$(OBJEXT)
touch_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) touch_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
@@ -1515,6 +1520,10 @@ tail_LDADD = $(nanosec_libs) @@ -1747,6 +1752,10 @@ stty_LDADD = $(LDADD)
uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS) # for crypt
su_SOURCES = su.c getdef.c su_SOURCES = su.c getdef.c
su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS) su_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS)
+su_CFLAGS = -fpie +su_CFLAGS = -fpie
+su_LDFLAGS = -pie +su_LDFLAGS = -pie
+timeout_CFLAGS = -fpie +timeout_CFLAGS = -fpie
+timeout_LDFLAGS = -pie +timeout_LDFLAGS = -pie
stat_LDADD = $(LDADD) $(LIB_SELINUX) sum_LDADD = $(LDADD)
sync_LDADD = $(LDADD)
# programs that use getaddrinfo (e.g., via canon_host) tac_LDADD = $(LDADD) $(LIB_GETHRXTIME)
@@ -1933,7 +1942,7 @@ stty$(EXEEXT): $(stty_OBJECTS) $(stty_DE @@ -2279,7 +2288,7 @@ stty$(EXEEXT): $(stty_OBJECTS) $(stty_DE
$(LINK) $(stty_OBJECTS) $(stty_LDADD) $(LIBS) $(AM_V_CCLD)$(LINK) $(stty_OBJECTS) $(stty_LDADD) $(LIBS)
su$(EXEEXT): $(su_OBJECTS) $(su_DEPENDENCIES) su$(EXEEXT): $(su_OBJECTS) $(su_DEPENDENCIES)
@rm -f su$(EXEEXT) @rm -f su$(EXEEXT)
- $(LINK) $(su_OBJECTS) $(su_LDADD) $(LIBS) - $(AM_V_CCLD)$(LINK) $(su_OBJECTS) $(su_LDADD) $(LIBS)
+ $(su_LINK) $(su_OBJECTS) $(su_LDADD) $(LIBS) + $(AM_V_CCLD)$(su_LINK) $(su_OBJECTS) $(su_LDADD) $(LIBS)
sum$(EXEEXT): $(sum_OBJECTS) $(sum_DEPENDENCIES) sum$(EXEEXT): $(sum_OBJECTS) $(sum_DEPENDENCIES)
@rm -f sum$(EXEEXT) @rm -f sum$(EXEEXT)
$(LINK) $(sum_OBJECTS) $(sum_LDADD) $(LIBS) $(AM_V_CCLD)$(LINK) $(sum_OBJECTS) $(sum_LDADD) $(LIBS)
@@ -1954,7 +1963,7 @@ test$(EXEEXT): $(test_OBJECTS) $(test_DE @@ -2300,7 +2309,7 @@ test$(EXEEXT): $(test_OBJECTS) $(test_DE
$(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) $(AM_V_CCLD)$(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS)
timeout$(EXEEXT): $(timeout_OBJECTS) $(timeout_DEPENDENCIES) timeout$(EXEEXT): $(timeout_OBJECTS) $(timeout_DEPENDENCIES)
@rm -f timeout$(EXEEXT) @rm -f timeout$(EXEEXT)
- $(LINK) $(timeout_OBJECTS) $(timeout_LDADD) $(LIBS) - $(AM_V_CCLD)$(LINK) $(timeout_OBJECTS) $(timeout_LDADD) $(LIBS)
+ $(timeout_LINK) $(timeout_OBJECTS) $(timeout_LDADD) $(LIBS) + $(AM_V_CCLD)$(timeout_LINK) $(timeout_OBJECTS) $(timeout_LDADD) $(LIBS)
touch$(EXEEXT): $(touch_OBJECTS) $(touch_DEPENDENCIES) touch$(EXEEXT): $(touch_OBJECTS) $(touch_DEPENDENCIES)
@rm -f touch$(EXEEXT) @rm -f touch$(EXEEXT)
$(LINK) $(touch_OBJECTS) $(touch_LDADD) $(LIBS) $(AM_V_CCLD)$(LINK) $(touch_OBJECTS) $(touch_LDADD) $(LIBS)
@@ -2043,7 +2052,6 @@ distclean-compile: @@ -2389,7 +2398,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/false.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/false.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fold.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fold.Po@am__quote@
@ -99,9 +108,9 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlimits.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlimits.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-copy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-copy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-cp-hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ginstall-cp-hash.Po@am__quote@
@@ -2104,14 +2112,16 @@ distclean-compile: @@ -2453,14 +2461,16 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/split.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdbuf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stty.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stty.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su-getdef.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su-getdef.Po@am__quote@
@ -118,9 +127,9 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/touch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/touch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/true.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/true.Po@am__quote@
@@ -2286,6 +2296,62 @@ sha512sum-md5sum.obj: md5sum.c @@ -2649,6 +2659,62 @@ sha512sum-md5sum.obj: md5sum.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha512sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha512sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi` @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sha512sum_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha512sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi`
+su-su.o: su.c +su-su.o: su.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(su_CFLAGS) $(CFLAGS) -MT su-su.o -MD -MP -MF $(DEPDIR)/su-su.Tpo -c -o su-su.o `test -f 'su.c' || echo '$(srcdir)/'`su.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(su_CFLAGS) $(CFLAGS) -MT su-su.o -MD -MP -MF $(DEPDIR)/su-su.Tpo -c -o su-su.o `test -f 'su.c' || echo '$(srcdir)/'`su.c

View File

@ -1,194 +0,0 @@
--- configure
+++ configure
@@ -3029,7 +3029,6 @@ as_fn_append ac_func_list " fchmod"
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"
-gl_printf_safe=yes
as_fn_append ac_func_list " readlink"
as_fn_append ac_header_list " utmp.h"
as_fn_append ac_header_list " utmpx.h"
--- doc/coreutils.texi
+++ doc/coreutils.texi
@@ -66,8 +66,6 @@
* fold: (coreutils)fold invocation. Wrap long input lines.
* groups: (coreutils)groups invocation. Print group names a user is in.
* head: (coreutils)head invocation. Output the first part of files.
-* hostid: (coreutils)hostid invocation. Print numeric host identifier.
-* hostname: (coreutils)hostname invocation. Print or set system name.
* id: (coreutils)id invocation. Print user identity.
* install: (coreutils)install invocation. Copy and change attributes.
* join: (coreutils)join invocation. Join lines on a common field.
@@ -195,7 +193,7 @@ Free Documentation License''.
* File name manipulation:: dirname basename pathchk
* Working context:: pwd stty printenv tty
* User information:: id logname whoami groups users who
-* System context:: date uname hostname hostid uptime
+* System context:: date uname uptime
* SELinux context:: chcon runcon
* Modified command invocation:: chroot env nice nohup su timeout
* Process control:: kill
@@ -409,8 +407,6 @@ System context
* arch invocation:: Print machine hardware name
* date invocation:: Print or set system date and time
* uname invocation:: Print system information
-* hostname invocation:: Print or set system name
-* hostid invocation:: Print numeric host identifier
* uptime invocation:: Print system uptime and load
@command{date}: Print or set system date and time
@@ -12969,8 +12965,6 @@ information.
* arch invocation:: Print machine hardware name.
* date invocation:: Print or set system date and time.
* uname invocation:: Print system information.
-* hostname invocation:: Print or set system name.
-* hostid invocation:: Print numeric host identifier.
* uptime invocation:: Print system uptime and load
@end menu
@@ -13928,54 +13922,6 @@ Print the kernel version.
@exitstatus
-@node hostname invocation
-@section @command{hostname}: Print or set system name
-
-@pindex hostname
-@cindex setting the hostname
-@cindex printing the hostname
-@cindex system name, printing
-@cindex appropriate privileges
-
-With no arguments, @command{hostname} prints the name of the current host
-system. With one argument, it sets the current host name to the
-specified string. You must have appropriate privileges to set the host
-name. Synopsis:
-
-@example
-hostname [@var{name}]
-@end example
-
-The only options are @option{--help} and @option{--version}. @xref{Common
-options}.
-
-@exitstatus
-
-
-@node hostid invocation
-@section @command{hostid}: Print numeric host identifier.
-
-@pindex hostid
-@cindex printing the host identifier
-
-@command{hostid} prints the numeric identifier of the current host
-in hexadecimal. This command accepts no arguments.
-The only options are @option{--help} and @option{--version}.
-@xref{Common options}.
-
-For example, here's what it prints on one system I use:
-
-@example
-$ hostid
-1bac013d
-@end example
-
-On that system, the 32-bit quantity happens to be closely
-related to the system's Internet address, but that isn't always
-the case.
-
-@exitstatus
-
@node uptime invocation
@section @command{uptime}: Print system uptime and load
--- gnulib-tests/test-isnanl.h
+++ gnulib-tests/test-isnanl.h
@@ -75,7 +75,7 @@ main ()
/* Quiet NaN. */
ASSERT (isnanl (0.0L / 0.0L));
-#if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT
+#if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT && 0
/* A bit pattern that is different from a Quiet NaN. With a bit of luck,
it's a Signalling NaN. */
{
@@ -117,6 +117,7 @@ main ()
{ LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
ASSERT (isnanl (x.value));
}
+#if 0
/* 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:
@@ -150,6 +151,7 @@ main ()
ASSERT (isnanl (x.value));
}
#endif
+#endif
return 0;
}
--- m4/gnulib-comp.m4
+++ m4/gnulib-comp.m4
@@ -287,7 +287,6 @@ AC_DEFUN([gl_INIT],
gl_POSIXVER
gl_FUNC_PRINTF_FREXP
gl_FUNC_PRINTF_FREXPL
- m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_XGETTEXT_OPTION([--keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'])
AM_XGETTEXT_OPTION([--keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'])])
--- man/Makefile.am
+++ man/Makefile.am
@@ -184,7 +184,7 @@ check-x-vs-1:
PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
t=ls-files.$$$$; \
(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
- (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \
+ (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) hostid \
| tr -s ' ' '\n' | sed 's/\.1$$//') \
| $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
rm $$t
--- man/Makefile.in
+++ man/Makefile.in
@@ -1275,7 +1275,7 @@ check-x-vs-1:
PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
t=ls-files.$$$$; \
(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
- (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \
+ (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) hostid \
| tr -s ' ' '\n' | sed 's/\.1$$//') \
| $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
rm $$t
--- src/system.h
+++ src/system.h
@@ -156,7 +156,7 @@ enum
# define DEV_BSIZE BBSIZE
#endif
#ifndef DEV_BSIZE
-# define DEV_BSIZE 4096
+# define DEV_BSIZE 512
#endif
/* Extract or fake data from a `struct stat'.
--- tests/misc/help-version
+++ tests/misc/help-version
@@ -182,6 +182,7 @@ lbracket_args=": ]"
for i in $built_programs; do
# Skip these.
case $i in chroot|stty|tty|false|chcon|runcon) continue;; esac
+ case $i in df) continue;; esac
rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out
echo > $tmp_in
--- tests/other-fs-tmpdir
+++ tests/other-fs-tmpdir
@@ -42,6 +42,8 @@ for d in $CANDIDATE_TMP_DIRS; do
fi
done
+# Autobuild hack
+test -f /bin/uname.bin && other_partition_tmpdir=
if test -z "$other_partition_tmpdir"; then
skip_test_ \

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a584c6ce92f390c684dac00032e5c790ecc15cb0fa3e61891ac62401832ae108
size 3967824

4066
coreutils-8.5-i18n.patch Normal file

File diff suppressed because it is too large Load Diff

67
coreutils-8.5.patch Normal file
View File

@ -0,0 +1,67 @@
Index: gnulib-tests/test-isnanl.h
===================================================================
--- gnulib-tests/test-isnanl.h.orig 2010-03-13 16:21:09.000000000 +0100
+++ gnulib-tests/test-isnanl.h 2010-05-05 13:47:16.003024388 +0200
@@ -63,7 +63,7 @@ main ()
/* Quiet NaN. */
ASSERT (isnanl (NaNl ()));
-#if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT
+#if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT && 0
/* A bit pattern that is different from a Quiet NaN. With a bit of luck,
it's a Signalling NaN. */
{
@@ -105,6 +105,7 @@ main ()
{ LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
ASSERT (isnanl (x.value));
}
+#if 0
/* 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:
@@ -138,6 +139,7 @@ main ()
ASSERT (isnanl (x.value));
}
#endif
+#endif
return 0;
}
Index: src/system.h
===================================================================
--- src/system.h.orig 2010-04-20 21:52:05.000000000 +0200
+++ src/system.h 2010-05-05 13:38:20.923127872 +0200
@@ -138,7 +138,7 @@ enum
# define DEV_BSIZE BBSIZE
#endif
#ifndef DEV_BSIZE
-# define DEV_BSIZE 4096
+# define DEV_BSIZE 512
#endif
/* Extract or fake data from a `struct stat'.
Index: tests/misc/help-version
===================================================================
--- tests/misc/help-version.orig 2010-04-20 21:52:05.000000000 +0200
+++ tests/misc/help-version 2010-05-05 13:44:11.919859133 +0200
@@ -239,6 +239,7 @@ lbracket_setup () { args=": ]"; }
for i in $built_programs; do
# Skip these.
case $i in chroot|stty|tty|false|chcon|runcon) continue;; esac
+ case $i in df) continue;; esac
rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out $bigZ_in $zin $zin2
echo z |gzip > $zin
Index: tests/other-fs-tmpdir
===================================================================
--- tests/other-fs-tmpdir.orig 2010-01-01 14:06:47.000000000 +0100
+++ tests/other-fs-tmpdir 2010-05-05 13:38:20.982872202 +0200
@@ -43,6 +43,8 @@ for d in $CANDIDATE_TMP_DIRS; do
fi
done
+# Autobuild hack
+test -f /bin/uname.bin && other_partition_tmpdir=
if test -z "$other_partition_tmpdir"; then
skip_test_ \

3
coreutils-8.5.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5aa855caa08b94ccd632510d9ab265646d2ee11498c7efff205b27c2437dec5a
size 4531488

View File

@ -1,6 +1,8 @@
--- src/dircolors.hin Index: src/dircolors.hin
+++ src/dircolors.hin ===================================================================
@@ -151,6 +151,7 @@ --- src/dircolors.hin.orig 2010-04-20 21:52:04.000000000 +0200
+++ src/dircolors.hin 2010-05-05 16:22:16.375859309 +0200
@@ -158,6 +158,7 @@ EXEC 01;32
.m2v 01;35 .m2v 01;35
.mkv 01;35 .mkv 01;35
.ogm 01;35 .ogm 01;35

View File

@ -1,35 +0,0 @@
--- src/fs.h
+++ src/fs.h
@@ -5,10 +5,12 @@
#if defined __linux__
# define S_MAGIC_ADFS 0xADF5
# define S_MAGIC_AFFS 0xADFF
+# define S_MAGIC_AFS 0x6B414653
# define S_MAGIC_AUTOFS 0x187
# define S_MAGIC_BEFS 0x42465331
# define S_MAGIC_BFS 0x1BADFACE
# define S_MAGIC_BINFMT_MISC 0x42494e4d
+# define S_MAGIC_CIFS 0xFF534D42
# define S_MAGIC_CODA 0x73757245
# define S_MAGIC_COH 0x012FF7B7
# define S_MAGIC_CRAMFS 0x28CD3D45
--- src/stat.c
+++ src/stat.c
@@ -219,6 +219,8 @@ human_fstype (STRUCT_STATVFS const *stat
return "adfs";
case S_MAGIC_AFFS: /* 0xADFF */
return "affs";
+ case S_MAGIC_AFS: /* 0x6B414653 */
+ return "afs";
case S_MAGIC_AUTOFS: /* 0x187 */
return "autofs";
case S_MAGIC_BEFS: /* 0x42465331 */
@@ -227,6 +229,8 @@ human_fstype (STRUCT_STATVFS const *stat
return "bfs";
case S_MAGIC_BINFMT_MISC: /* 0x42494e4d */
return "binfmt_misc";
+ case S_MAGIC_CIFS: /* 0xFF534D42 */
+ return "cifs";
case S_MAGIC_CODA: /* 0x73757245 */
return "coda";
case S_MAGIC_COH: /* 0x012FF7B7 */

View File

@ -1,80 +0,0 @@
Index: maint.mk
===================================================================
--- maint.mk.orig 2009-02-18 16:13:19.000000000 +0100
+++ maint.mk 2010-05-04 17:45:14.515359143 +0200
@@ -623,14 +623,14 @@ bin=bin-$$$$
write_loser = printf '\#!%s\necho $$0: bad path 1>&2; exit 1\n' '$(SHELL)'
-TMPDIR ?= /tmp
-t=$(TMPDIR)/$(PACKAGE)/test
+tmpdir = $(abs_top_builddir)/tests/torture
+
pfx=$(t)/i
# More than once, tainted build and source directory names would
# have caused at least one "make check" test to apply "chmod 700"
# to all directories under $HOME. Make sure it doesn't happen again.
-tp := $(shell echo "$(TMPDIR)/$(PACKAGE)-$$$$")
+tp = $(tmpdir)/taint
t_prefix = $(tp)/a
t_taint = '$(t_prefix) b'
fake_home = $(tp)/home
@@ -648,10 +648,11 @@ taint-distcheck: $(DIST_ARCHIVES)
touch $(fake_home)/f
mkdir -p $(fake_home)/d/e
ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-before
+ HOME=$(fake_home); export HOME; \
cd $(t_taint)/$(distdir) \
&& ./configure \
&& $(MAKE) \
- && HOME=$(fake_home) $(MAKE) check \
+ && $(MAKE) check \
&& ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-after \
&& diff $(tp)/.ls-before $(tp)/.ls-after \
&& test -d $(t_prefix)
@@ -670,6 +671,7 @@ endef
# Install, then verify that all binaries and man pages are in place.
# Note that neither the binary, ginstall, nor the ].1 man page is installed.
define my-instcheck
+ echo running my-instcheck; \
$(MAKE) prefix=$(pfx) install \
&& test ! -f $(pfx)/bin/ginstall \
&& { fail=0; \
@@ -688,6 +690,7 @@ endef
define coreutils-path-check
{ \
+ echo running coreutils-path-check; \
if test -f $(srcdir)/src/true.c; then \
fail=1; \
mkdir $(bin) \
@@ -732,19 +735,20 @@ my-distcheck: $(DIST_ARCHIVES) $(local-c
-rm -rf $(t)
mkdir -p $(t)
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
- cd $(t)/$(distdir) \
- && ./configure --disable-nls \
- && $(MAKE) CFLAGS='$(warn_cflags)' \
- AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
- && $(MAKE) dvi \
- && $(install-transform-check) \
- && $(my-instcheck) \
- && $(coreutils-path-check) \
+ cd $(t)/$(distdir) \
+ && ./configure --quiet --enable-gcc-warnings --disable-nls \
+ && $(MAKE) CFLAGS='$(warn_cflags)' \
+ AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
+ && $(MAKE) dvi \
+ && $(install-transform-check) \
+ && $(my-instcheck) \
+ && $(coreutils-path-check) \
&& $(MAKE) distclean
(cd $(t) && mv $(distdir) $(distdir).old \
&& $(AMTAR) -zxf - ) < $(distdir).tar.gz
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
-rm -rf $(t)
+ rmdir $(tmpdir)/$(PACKAGE) $(tmpdir)
@echo "========================"; \
echo "$(distdir).tar.gz is ready for distribution"; \
echo "========================"

View File

@ -1,16 +0,0 @@
Index: coreutils-6.9.90/gnulib-tests/test-getaddrinfo.c
================================================================================
--- coreutils-7.1/gnulib-tests/test-getaddrinfo.c
+++ coreutils-7.1/gnulib-tests/test-getaddrinfo.c
@@ -71,10 +71,7 @@ int simple (char *host, char *service)
the test merely because someone is down the country on their
in-law's farm. */
if (res == EAI_AGAIN)
- {
- fprintf (stderr, "skipping getaddrinfo test: no network?\n");
- return 77;
- }
+ return 0;
/* IRIX reports EAI_NONAME for "https". Don't fail the test
merely because of this. */
if (res == EAI_NONAME)

View File

@ -0,0 +1,17 @@
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
the test merely because someone is down the country on their
in-law's farm. */
if (res == EAI_AGAIN)
- {
- skip++;
- fprintf (stderr, "skipping getaddrinfo test: no network?\n");
- return 77;
- }
+ return 0;
/* IRIX reports EAI_NONAME for "https". Don't fail the test
merely because of this. */
if (res == EAI_NONAME)

View File

@ -0,0 +1,24 @@
Index: configure
===================================================================
--- configure.orig 2010-04-23 18:06:40.000000000 +0200
+++ configure 2010-05-05 13:40:11.419859163 +0200
@@ -3340,7 +3340,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 " utmp.h"
as_fn_append ac_header_list " utmpx.h"
as_fn_append ac_func_list " utmpname"
Index: m4/gnulib-comp.m4
===================================================================
--- m4/gnulib-comp.m4.orig 2010-04-21 20:12:06.000000000 +0200
+++ m4/gnulib-comp.m4 2010-05-05 13:40:58.875859176 +0200
@@ -1158,7 +1158,6 @@ AC_DEFUN([gl_INIT],
# Code from module printf-frexpl:
gl_FUNC_PRINTF_FREXPL
# Code from module printf-safe:
- m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
# Code from module priv-set:
gl_PRIV_SET
# Code from module progname:

View File

@ -0,0 +1,14 @@
Index: src/sort.c
===================================================================
--- src/sort.c.orig 2010-05-07 16:52:08.068491875 +0200
+++ src/sort.c 2010-05-07 16:53:44.704992155 +0200
@@ -2720,7 +2720,8 @@ keycompare_mb (const struct line *a, con
if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1) \
STATE = state_bak; \
if (!ignore) \
- COPY[NEW_LEN++] = TEXT[i++]; \
+ COPY[NEW_LEN++] = TEXT[i]; \
+ i++; \
continue; \
} \
\

View File

@ -1,8 +1,8 @@
Index: src/sort.c Index: src/sort.c
=================================================================== ===================================================================
--- src/sort.c.orig 2010-05-04 17:29:12.419359202 +0200 --- src/sort.c.orig 2010-05-05 16:22:15.815859271 +0200
+++ src/sort.c 2010-05-04 17:29:12.479359419 +0200 +++ src/sort.c 2010-05-05 16:22:15.875859173 +0200
@@ -1731,7 +1731,7 @@ limfield_mb (const struct line *line, co @@ -1845,7 +1845,7 @@ limfield_mb (const struct line *line, co
GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
ptr += mblength; ptr += mblength;
} }
@ -11,7 +11,7 @@ Index: src/sort.c
{ {
GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
ptr += mblength; ptr += mblength;
@@ -1742,11 +1742,6 @@ limfield_mb (const struct line *line, co @@ -1856,11 +1856,6 @@ limfield_mb (const struct line *line, co
{ {
while (ptr < lim && ismbblank (ptr, &mblength)) while (ptr < lim && ismbblank (ptr, &mblength))
ptr += mblength; ptr += mblength;
@ -23,7 +23,7 @@ Index: src/sort.c
while (ptr < lim && !ismbblank (ptr, &mblength)) while (ptr < lim && !ismbblank (ptr, &mblength))
ptr += mblength; ptr += mblength;
} }
@@ -1756,20 +1751,19 @@ limfield_mb (const struct line *line, co @@ -1870,20 +1865,19 @@ limfield_mb (const struct line *line, co
/* Make LIM point to the end of (one byte past) the current field. */ /* Make LIM point to the end of (one byte past) the current field. */
if (tab != NULL) if (tab != NULL)
{ {
@ -56,7 +56,7 @@ Index: src/sort.c
} }
else else
{ {
@@ -1778,24 +1772,20 @@ limfield_mb (const struct line *line, co @@ -1892,24 +1886,20 @@ limfield_mb (const struct line *line, co
while (newlim < lim && ismbblank (newlim, &mblength)) while (newlim < lim && ismbblank (newlim, &mblength))
newlim += mblength; newlim += mblength;
@ -86,7 +86,7 @@ Index: src/sort.c
/* Advance PTR by ECHAR (if possible), but no further than LIM. */ /* Advance PTR by ECHAR (if possible), but no further than LIM. */
for (i = 0; i < echar; i++) for (i = 0; i < echar; i++)
@@ -1803,9 +1793,9 @@ limfield_mb (const struct line *line, co @@ -1917,9 +1907,9 @@ limfield_mb (const struct line *line, co
GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state);
if (ptr + mblength > lim) if (ptr + mblength > lim)

View File

@ -1,8 +1,8 @@
Index: src/sort.c Index: src/sort.c
=================================================================== ===================================================================
--- src/sort.c.orig 2010-05-04 17:28:43.820359291 +0200 --- src/sort.c.orig 2010-05-05 16:22:15.487859132 +0200
+++ src/sort.c 2010-05-04 17:30:44.507859357 +0200 +++ src/sort.c 2010-05-05 16:23:20.267859249 +0200
@@ -1285,7 +1285,7 @@ inittables_mb (void) @@ -1402,7 +1402,7 @@ inittables_mb (void)
else else
{ {
j += mblength; j += mblength;

View File

@ -1,8 +1,8 @@
Index: src/sort.c Index: src/sort.c
=================================================================== ===================================================================
--- src/sort.c.orig 2010-05-04 17:29:12.395359111 +0200 --- src/sort.c.orig 2010-05-06 15:16:27.475859128 +0200
+++ src/sort.c 2010-05-04 17:29:59.979859336 +0200 +++ src/sort.c 2010-05-06 15:16:53.899859247 +0200
@@ -2494,7 +2494,10 @@ keycompare_mb (const struct line *a, con @@ -2712,7 +2712,10 @@ keycompare_mb (const struct line *a, con
size_t lenb = limb <= textb ? 0 : limb - textb; size_t lenb = limb <= textb ? 0 : limb - textb;
/* Actually compare the fields. */ /* Actually compare the fields. */

View File

@ -0,0 +1,16 @@
Index: src/cut.c
===================================================================
--- src/cut.c.orig 2010-05-06 15:16:26.851859241 +0200
+++ src/cut.c 2010-05-06 15:16:27.095859170 +0200
@@ -878,7 +878,10 @@ cut_fields_mb (FILE *stream)
c = getc (stream);
empty_input = (c == EOF);
if (c != EOF)
- ungetc (c, stream);
+ {
+ ungetc (c, stream);
+ wc = 0;
+ }
else
wc = WEOF;

View File

@ -0,0 +1,26 @@
While uid_t and gid_t are both unsigned, the values (uid_t) -1 and
(gid_t) -1 are reserved. A uid or gid argument of -1 to the chown(2)
system call means to leave the uid/gid unchanged. Catch this case
so that trying to set a uid or gid to -1 will result in an error.
Test cases:
chown 4294967295 file
chown :4294967295 file
chgrp 4294967295 file
Andreas Gruenbacher <agruen@suse.de>
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)
{
unsigned long int tmp;
if (! (xstrtoul (name, NULL, 10, &tmp, "") == LONGINT_OK
- && tmp <= GID_T_MAX))
+ && tmp <= GID_T_MAX && (gid_t) tmp != (gid_t) -1))
error (EXIT_FAILURE, 0, _("invalid group: %s"), quote (name));
gid = tmp;
}

View File

@ -0,0 +1,122 @@
Index: doc/coreutils.texi
===================================================================
--- doc/coreutils.texi.orig 2010-05-06 15:17:48.132359317 +0200
+++ doc/coreutils.texi 2010-05-06 15:21:02.631693747 +0200
@@ -65,8 +65,6 @@
* fold: (coreutils)fold invocation. Wrap long input lines.
* groups: (coreutils)groups invocation. Print group names a user is in.
* head: (coreutils)head invocation. Output the first part of files.
-* hostid: (coreutils)hostid invocation. Print numeric host identifier.
-* hostname: (coreutils)hostname invocation. Print or set system name.
* id: (coreutils)id invocation. Print user identity.
* install: (coreutils)install invocation. Copy and change attributes.
* join: (coreutils)join invocation. Join lines on a common field.
@@ -197,7 +195,7 @@ Free Documentation License''.
* File name manipulation:: dirname basename pathchk mktemp
* Working context:: pwd stty printenv tty
* User information:: id logname whoami groups users who
-* System context:: date arch nproc uname hostname hostid uptime
+* System context:: date arch nproc uname uptime
* SELinux context:: chcon runcon
* Modified command invocation:: chroot env nice nohup stdbuf su timeout
* Process control:: kill
@@ -413,8 +411,6 @@ System context
* date invocation:: Print or set system date and time
* nproc invocation:: Print the number of processors
* uname invocation:: Print system information
-* hostname invocation:: Print or set system name
-* hostid invocation:: Print numeric host identifier
* uptime invocation:: Print system uptime and load
@command{date}: Print or set system date and time
@@ -13449,8 +13445,6 @@ information.
* arch invocation:: Print machine hardware name.
* nproc invocation:: Print the number of processors.
* uname invocation:: Print system information.
-* hostname invocation:: Print or set system name.
-* hostid invocation:: Print numeric host identifier.
* uptime invocation:: Print system uptime and load.
@end menu
@@ -14272,55 +14266,6 @@ Print the kernel version.
@exitstatus
-
-@node hostname invocation
-@section @command{hostname}: Print or set system name
-
-@pindex hostname
-@cindex setting the hostname
-@cindex printing the hostname
-@cindex system name, printing
-@cindex appropriate privileges
-
-With no arguments, @command{hostname} prints the name of the current host
-system. With one argument, it sets the current host name to the
-specified string. You must have appropriate privileges to set the host
-name. Synopsis:
-
-@example
-hostname [@var{name}]
-@end example
-
-The only options are @option{--help} and @option{--version}. @xref{Common
-options}.
-
-@exitstatus
-
-
-@node hostid invocation
-@section @command{hostid}: Print numeric host identifier
-
-@pindex hostid
-@cindex printing the host identifier
-
-@command{hostid} prints the numeric identifier of the current host
-in hexadecimal. This command accepts no arguments.
-The only options are @option{--help} and @option{--version}.
-@xref{Common options}.
-
-For example, here's what it prints on one system I use:
-
-@example
-$ hostid
-1bac013d
-@end example
-
-On that system, the 32-bit quantity happens to be closely
-related to the system's Internet address, but that isn't always
-the case.
-
-@exitstatus
-
@node uptime invocation
@section @command{uptime}: Print system uptime and load
Index: man/Makefile.am
===================================================================
--- man/Makefile.am.orig 2010-05-06 15:17:48.136359276 +0200
+++ man/Makefile.am 2010-05-06 15:18:44.844359168 +0200
@@ -197,7 +197,7 @@ check-x-vs-1:
@PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
t=$@-t; \
(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
- (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \
+ (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) hostid \
| tr -s ' ' '\n' | sed 's/\.1$$//') \
| $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
rm $$t
Index: man/Makefile.in
===================================================================
--- man/Makefile.in.orig 2010-05-06 15:17:48.136359276 +0200
+++ man/Makefile.in 2010-05-06 15:18:44.875852631 +0200
@@ -1574,7 +1574,7 @@ check-x-vs-1:
@PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
t=$@-t; \
(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
- (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \
+ (echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) hostid \
| tr -s ' ' '\n' | sed 's/\.1$$//') \
| $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
rm $$t

View File

@ -1,10 +1,10 @@
Index: src/uname.c Index: src/uname.c
=================================================================== ===================================================================
--- src/uname.c.orig 2010-05-04 17:27:48.679359310 +0200 --- src/uname.c.orig 2010-01-01 14:06:47.000000000 +0100
+++ src/uname.c 2010-05-04 17:29:03.011859260 +0200 +++ src/uname.c 2010-05-05 13:58:03.471359120 +0200
@@ -339,6 +339,36 @@ main (int argc, char **argv) @@ -339,6 +339,36 @@ main (int argc, char **argv)
# endif # endif
} }
#endif #endif
+ if (element == unknown) + if (element == unknown)
+ { + {
@ -37,11 +37,11 @@ Index: src/uname.c
+#endif +#endif
+ } + }
if (! (toprint == UINT_MAX && element == unknown)) if (! (toprint == UINT_MAX && element == unknown))
print_element (element); print_element (element);
} }
@@ -364,6 +394,18 @@ main (int argc, char **argv) @@ -364,6 +394,18 @@ main (int argc, char **argv)
element = hardware_platform; element = hardware_platform;
} }
#endif #endif
+ if (element == unknown) + if (element == unknown)
+ { + {
@ -56,5 +56,5 @@ Index: src/uname.c
+ element = hardware_platform; + element = hardware_platform;
+ } + }
if (! (toprint == UINT_MAX && element == unknown)) if (! (toprint == UINT_MAX && element == unknown))
print_element (element); print_element (element);
} }

View File

@ -1,8 +1,55 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jun 29 20:18:04 CEST 2010 - pth@suse.de Fri May 7 15:44:53 UTC 2010 - pth@novell.com
- Fix 'sort -V' not working because the i18n (mb handling) patch - Update to 8.5:
wasn't updated to handle the new option (bnc#615073). Bug fixes
* cp and mv once again support preserving extended attributes.
* cp now preserves "capabilities" when also preserving file ownership.7
* ls --color once again honors the 'NORMAL' dircolors directive.
[bug introduced in coreutils-6.11]
* sort -M now handles abbreviated months that are aligned using
blanks in the locale database. Also locales with 8 bit characters
are handled correctly, including multi byte locales with the caveat
that multi byte characters are matched case sensitively.
* sort again handles obsolescent key formats (+POS -POS) correctly.
Previously if -POS was specified, 1 field too many was used in the
sort. [bug introduced in coreutils-7.2]
New features
* join now accepts the --header option, to treat the first line of
each file as a header line to be joined and printed
unconditionally.
* timeout now accepts the --kill-after option which sends a kill
signal to the monitored command if it's still running the specified
duration after the initial signal was sent.
* who: the "+/-" --mesg (-T) indicator of whether a user/tty is
accepting messages could be incorrectly listed as "+", when in
fact, the user was not accepting messages (mesg no). Before, who
would examine only the permission bits, and not consider the group
of the TTY device file. Thus, if a login tty's group would change
somehow e.g., to "root", that would make it unwritable (via
write(1)) by normal users, in spite of whatever the permission bits
might imply. Now, when configured using the
--with-tty-group[=NAME] option, who also compares the group of the
TTY device with NAME (or "tty" if no group name is specified).
Changes in behavior
* ls --color no longer emits the final 3-byte color-resetting escape
sequence when it would be a no-op.
* join -t '' no longer emits an error and instead operates on each
line as a whole (even if they contain NUL characters).
For other changes since 7.1 see NEWS.
- Split-up coreutils-%%{version}.diff as far as possible.
- Prefix all patches with coreutils-.
- All patches have the .patch suffix.
- Use the i18n patch from Archlinux as it fixes at least one test
suite failure.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 4 17:13:37 UTC 2010 - pth@novell.com Tue May 4 17:13:37 UTC 2010 - pth@novell.com

View File

@ -1,5 +1,5 @@
# #
# spec file for package coreutils (Version 7.1) # spec file for package coreutils (Version 8.5)
# #
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@ -23,10 +23,10 @@ BuildRequires: help2man libacl-devel libcap-devel libselinux-devel pam-devel xz
Url: http://www.gnu.org/software/coreutils/ Url: http://www.gnu.org/software/coreutils/
License: GFDLv1.2 ; GPLv2+ ; GPLv3+ License: GFDLv1.2 ; GPLv2+ ; GPLv3+
Group: System/Base Group: System/Base
Version: 7.1 Version: 8.5
Release: 6 Release: 1
Provides: fileutils sh-utils stat textutils mktemp Provides: fileutils = %{version}, sh-utils = {version}, stat = %version}, textutils = %{version}, mktemp = %{version}
Obsoletes: fileutils sh-utils stat textutils mktemp 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 Obsoletes: libselinux <= 1.23.11-3 libselinux-32bit = 9 libselinux-64bit = 9 libselinux-x86 = 9
AutoReqProv: on AutoReqProv: on
PreReq: %{install_info_prereq} PreReq: %{install_info_prereq}
@ -35,22 +35,19 @@ Source: coreutils-%{version}.tar.xz
Source1: su.pamd Source1: su.pamd
Source2: su.default Source2: su.default
Source3: baselibs.conf Source3: baselibs.conf
Patch: coreutils-%{version}.diff Patch0: coreutils-%{version}.patch
Patch4: coreutils-5.3.0-i18n-0.1.patch Patch1: coreutils-no_hostname_and_hostid.patch
Patch5: i18n-uninit.diff Patch2: coreutils-gl_printf_safe.patch
Patch6: i18n-infloop.diff Patch4: coreutils-8.5-i18n.patch
Patch8: coreutils-sysinfo.diff Patch5: coreutils-i18n-uninit.patch
Patch11: i18n-monthsort.diff Patch6: coreutils-i18n-infloop.patch
Patch12: i18n-random.diff Patch8: coreutils-sysinfo.patch
Patch16: invalid-ids.diff Patch16: coreutils-invalid-ids.patch
Patch17: i18n-limfield.diff Patch20: coreutils-6.8-su.patch
Patch20: coreutils-6.8-su.diff Patch21: coreutils-6.8.0-pie.patch
Patch21: coreutils-6.8.0-pie.diff Patch22: coreutils-5.3.0-sbin4su.patch
Patch22: coreutils-5.3.0-sbin4su.diff Patch23: coreutils-getaddrinfo.patch
Patch23: coreutils-getaddrinfo.diff
Patch25: coreutils-cifs-afs.diff
Patch26: coreutils-add_ogv.patch Patch26: coreutils-add_ogv.patch
Patch27: coreutils-fix_distcheck.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
@ -107,48 +104,44 @@ Authors:
%lang_package %lang_package
%prep %prep
%setup -q %setup -q
%patch4 -p1 %patch4
%patch5 %patch5
%patch6 %patch6
%patch %patch0
%patch1
%patch2
%patch8 %patch8
%patch11
%patch12
%patch16 %patch16
%patch17
%patch20 %patch20
%patch21 %patch21
%patch22 %patch22
%patch23 -p1 %patch23
%patch25
%patch26 %patch26
%patch27
%build %build
#AUTOPOINT=true autoreconf -fi AUTOPOINT=true autoreconf -fi
./configure CFLAGS="$RPM_OPT_FLAGS -Wall" \ export CFLAGS="%optflags -Wall"
--prefix=%{_prefix} --mandir=%{_mandir} \ %configure --without-included-regex \
--infodir=%{_infodir} --without-included-regex \
--enable-install-program=arch,su \ --enable-install-program=arch,su \
gl_cv_func_printf_directive_n=yes \ gl_cv_func_printf_directive_n=yes \
gl_cv_func_isnanl_works=yes \ gl_cv_func_isnanl_works=yes \
DEFAULT_POSIX2_VERSION=199209 DEFAULT_POSIX2_VERSION=199209
make %{?jobs:-j%jobs} PAMLIBS="-lpam -ldl" make %{?jobs:-j%jobs} PAMLIBS="-lpam -ldl" V=1
%check %check
if test $EUID -eq 0; then if test $EUID -eq 0; then
su nobody -c make %{?jobs:-j%jobs} check VERBOSE=yes su nobody -c make %{?jobs:-j%jobs} check VERBOSE=yes V=1
make %{?jobs:-j%jobs} check-root VERBOSE=yes make %{?jobs:-j%jobs} check-root VERBOSE=yes V=1
else else
%ifarch %arm %ifarch %arm
make -k %{?jobs:-j%jobs} check VERBOSE=yes || echo make check failed make -k %{?jobs:-j%jobs} check VERBOSE=yes V=1 || echo make check failed
%else %else
make %{?jobs:-j%jobs} check VERBOSE=yes make %{?jobs:-j%jobs} check VERBOSE=yes V=1
%endif %endif
fi fi
%install %install
make DESTDIR="$RPM_BUILD_ROOT" install %makeinstall
test -f $RPM_BUILD_ROOT%{_bindir}/su || \ test -f $RPM_BUILD_ROOT%{_bindir}/su || \
install src/su $RPM_BUILD_ROOT%{_bindir}/su install src/su $RPM_BUILD_ROOT%{_bindir}/su
install -d $RPM_BUILD_ROOT/bin install -d $RPM_BUILD_ROOT/bin
@ -182,6 +175,7 @@ rm -rf $RPM_BUILD_ROOT
%config /etc/pam.d/su-l %config /etc/pam.d/su-l
%config(noreplace) /etc/default/su %config(noreplace) /etc/default/su
%{_bindir}/* %{_bindir}/*
%{_libdir}/%{name}
%doc %{_infodir}/coreutils.info*.gz %doc %{_infodir}/coreutils.info*.gz
%doc %{_mandir}/man1/*.1.gz %doc %{_mandir}/man1/*.1.gz
%dir %{_prefix}/share/locale/*/LC_TIME %dir %{_prefix}/share/locale/*/LC_TIME

View File

@ -1,14 +0,0 @@
Index: src/sort.c
===================================================================
--- src/sort.c.orig 2010-05-04 17:27:49.103359264 +0200
+++ src/sort.c 2010-05-04 17:28:43.820359291 +0200
@@ -2540,7 +2540,8 @@ keycompare_mb (const struct line *a, con
if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1) \
STATE = state_bak; \
if (!ignore) \
- COPY[NEW_LEN++] = TEXT[i++]; \
+ COPY[NEW_LEN++] = TEXT[i]; \
+ i++; \
continue; \
} \
\

View File

@ -1,29 +0,0 @@
Index: src/cut.c
===================================================================
--- src/cut.c.orig 2010-05-04 17:27:29.879859350 +0200
+++ src/cut.c 2010-05-04 17:27:30.131859395 +0200
@@ -878,7 +878,10 @@ cut_fields_mb (FILE *stream)
c = getc (stream);
empty_input = (c == EOF);
if (c != EOF)
- ungetc (c, stream);
+ {
+ ungetc (c, stream);
+ wc = 0;
+ }
else
wc = WEOF;
Index: src/expand.c
===================================================================
--- src/expand.c.orig 2010-05-04 17:27:29.915859239 +0200
+++ src/expand.c 2010-05-04 17:27:30.155859324 +0200
@@ -404,7 +404,7 @@ expand_multibyte (void)
for (;;)
{
/* Input character, or EOF. */
- wint_t wc;
+ wint_t wc = 0;
/* If true, perform translations. */
bool convert = true;

View File

@ -1,49 +0,0 @@
While uid_t and gid_t are both unsigned, the values (uid_t) -1 and
(gid_t) -1 are reserved. A uid or gid argument of -1 to the chown(2)
system call means to leave the uid/gid unchanged. Catch this case
so that trying to set a uid or gid to -1 will result in an error.
Test cases:
chown 4294967295 file
chown :4294967295 file
chgrp 4294967295 file
Andreas Gruenbacher <agruen@suse.de>
Index: lib/userspec.c
===================================================================
--- lib/userspec.c.orig 2010-05-04 17:27:48.479359439 +0200
+++ lib/userspec.c 2010-05-04 17:29:12.439359267 +0200
@@ -169,7 +169,7 @@ parse_with_separator (char const *spec,
{
unsigned long int tmp;
if (xstrtoul (u, NULL, 10, &tmp, "") == LONGINT_OK
- && tmp <= MAXUID)
+ && tmp <= MAXUID && tmp != (uid_t) -1)
unum = tmp;
else
error_msg = E_invalid_user;
@@ -200,7 +200,8 @@ parse_with_separator (char const *spec,
if (grp == NULL)
{
unsigned long int tmp;
- if (xstrtoul (g, NULL, 10, &tmp, "") == LONGINT_OK && tmp <= MAXGID)
+ if (xstrtoul (g, NULL, 10, &tmp, "") == LONGINT_OK && tmp <= MAXGID
+ && tmp != (gid_t) -1)
gnum = tmp;
else
error_msg = E_invalid_group;
Index: src/chgrp.c
===================================================================
--- src/chgrp.c.orig 2010-05-04 17:27:48.479359439 +0200
+++ src/chgrp.c 2010-05-04 17:29:12.443359269 +0200
@@ -89,7 +89,7 @@ parse_group (const char *name)
{
unsigned long int tmp;
if (! (xstrtoul (name, NULL, 10, &tmp, "") == LONGINT_OK
- && tmp <= GID_T_MAX))
+ && tmp <= GID_T_MAX && tmp != (gid_t) -1))
error (EXIT_FAILURE, 0, _("invalid group: %s"), quote (name));
gid = tmp;
}