summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-03-13chroot: improve --userspec and --groups look-upPádraig Brady
- Support arbitrary numbers in --groups, consistent with what is already done for --userspec - Avoid look-ups entirely for --groups items with a leading '+' - Support names that are actually numbers in --groups - Ignore an empty --groups="" option for consistency with --userspec - Look up both inside and outside the chroot with inside taking precedence. The look-up outside may load required libraries to complete the look-up inside the chroot. This can happen for example with a 32 bit chroot on a 64 bit system, where the 32 bit NSS plugins within the chroot fail to load. * src/chroot.c (parse_additional_groups): A new function refactored from set_addition_groups(), to just do the parsing. The actual setgroups() call is separated out for calling from the chroot later. (main): Call parse_user_spec() and parse_additional_groups() both outside and inside the chroot for the reasons outlined above. * tests/misc/chroot-credentials.sh: Ensure arbitrary numeric IDs can be specified without causing look-up errors. * NEWS: Mention the improvements. * THANKS.in: Add Norihiro Kamae who initially reported the issue with a proposed patch. Also thanks to Dmitry V. Levin for his diagnosis and sample patch.
2014-03-09doc: fix typo in texinfo docsAleksej Serdjukov
* doc/coreutils.texi (Operating on characters): s/This/These/. Fixes http://bug.gnu.org/16973
2014-03-07doc: fix readpath typo in texinfo contentsPádraig Brady
* docs/coreutils.texi: s/readpath/realpath/ Fixes http://bugs.gnu.org/16964
2014-03-05tests: avoid the :> construct which can hide errorsPádraig Brady
On most shells `:>file || framework_failure_` will not evaluate the framework_failure_ even if there was an error writing the file. shells which do evaluate the failure are ksh 93u+ and bash 4.2, while shells wich don't include bash 4.3, solaris, freebsd, dash. Furthermore this construct is problematic on Solaris 10 sh, which will try to optimize away a `:' command in a loop after the first iteration, even if it is redirected. * tests/cp/link-deref.sh: Remove the leading colon on redirections. * tests/cp/reflink-perm.sh: Likewise. * tests/id/zero.sh: Likewise. * tests/install/install-C.sh: Likewise. * tests/misc/env.sh: Likewise. * tests/misc/md5sum-bsd.sh: Likewise. * tests/misc/runcon-no-reorder.sh: Likewise. * tests/mv/partition-perm.sh: Likewise. * tests/rm/r-root.sh: Likewise. * tests/split/l-chunk.sh: Likewise. * tests/split/line-bytes.sh: Likewise. * tests/tail-2/inotify-rotate.sh: Likewise. * tests/tail-2/retry.sh: Likewise. * tests/tail-2/symlink.sh: Likewise. * tests/tail-2/wait.sh: Likewise. * tests/touch/read-only.sh: Likewise. + cfg.mk (sc_prohibit_colon_redirection): A new syntax check to avoid further instances of this creeping in.
2014-03-05tests: fix false failure in nohup.sh in non tty buildsPádraig Brady
* tests/misc/nohup.sh: When running tests without a controlling tty, an exec failure is triggered in a subshell, which causes POSIX shells to immediately exit the subshell. This was brought to notice by the newly conforming bash 4.3. Fixes http:/bugs.gnu.org/16940
2014-03-03doc: improve df --human and --si, help and man pagePádraig Brady
* src/df.c (usage): Adjust the --human and --si descriptions to not depend on each other. Also include an example that is illustrative of the rounding, suffix, width, and localized fractions. * src/system.h (emit_size_note). Adjust so that it's obvious the description is pertaining to the input SIZE argument, and not to any sizes that might be output by df for example. Fixes http://bugs.gnu.org/16922
2014-02-27date: fix crash or infinite loop when parsing a malformed TZ=""Pádraig Brady
* NEWS: Mention the fix. * gnulib: Update to incorporate the fix. This is the only change in this gnulib update. * tests/misc/date.pl: Add a test for this case. Fixes http://bugs.gnu.org/16872
2014-02-27cp: copy files by inode only if that facility is availablePaul Eggert
* src/copy.c (copy_dir): Use the new SAVEDIR_SORT_FASTREAD, not SAVEDIR_SORT_INODE. Problem reported by Bernhard Voelker in: http://lists.gnu.org/archive/html/coreutils/2014-02/msg00037.html
2014-02-27build: update gnulib submodule to latestPaul Eggert
2014-02-26cp: copy files by inodePaul Eggert
Problem reported by Bernhard Voelker in: http://lists.gnu.org/archive/html/coreutils/2014-02/msg00034.html * src/copy.c (copy_dir): Adjust to recent gnulib change.
2014-02-26build: update gnulib submodule to latestPaul Eggert
2014-02-26shuf: convert error diagnostic to lowercaseBernhard Voelker
* src/shuf.c (main): s/No/no/, introduced by commit v8.22-25-g9f60f37. * NEWS: Also adjust the NEWS for that recent commit to make it clear this was new bug rather than a regression. Prompted by the syntax-check rule sc_error_message_uppercase
2014-02-26doc: add dd example for failing disksBernhard Voelker
* doc/coreutils.texi (dd invocation): Add an example for how to call dd to save data from a failing disk. Mention GNU 'ddrescue' as one of the more specialized tools in such a case.
2014-02-23shuf: with -r, don't dump core if the input is emptyPaul Eggert
Problem reported by valiant xiao in <http://bugs.gnu.org/16855>. * NEWS: Document this. * src/shuf.c (main): With -r, report an error if the input is empty. * tests/misc/shuf.sh: Test for the bug.
2014-02-20doc: fix problems with @w and @kbd (Bug#16802)Paul Eggert
* doc/coreutils.texi: Prefer '@allowcodebreaks false' to '@w'. Also, don't use @kbd except for keyboard input.
2014-02-10cp: with --link always use linkat() if availablePádraig Brady
* src/copy.c (copy_reg): If linkat() is available it doesn't matter about the gnulib emulation provided, and thus the LINK_FOLLOWS_SYMLINKS should not have significance here. This was noticed on FreeBSD and the consequence is that cp --link will create hardlinks to symlinks there, rather than emulating with symlinks to symlinks. * tests/cp/link-deref.sh: Adjust the checks to cater for all cases where hardlinks to symlinks are supported.
2014-02-09head,tail: consistently diagnose write errorsPádraig Brady
If we can't output more data, we should immediately diagnose the issue and exit rather than consuming all of input (in some cases). * src/tail.c (xwrite_stdout): Also diagnose the case where only some data is written. Also clearerr() to avoid the redundant less specific error from atexit (close_stdout); * src/head.c (xwrite_stdout): Copy this new function from tail, and use it to write all output. * tests/misc/head-write-error.sh: A new test to ensure we exit immediately on write error. * tests/local.mk: Reference the new test.
2014-02-09head: fix --lines=-0 outputting nothing if no newline at EOFАлексей Шилин
* src/head.c (elide_tail_lines_pipe): Just output all input in this case to avoid the issue and also avoid redundant '\n' processing. (elide_tail_lines_seekable): Likewise. * tests/misc/head-elide-tail.pl: Add tests for no '\n' at EOF. * NEWS: Mention the fix. Fixes http://bugs.gnu.org/16329
2014-02-09dircolors: add a new entry to colorize 'm4a' filesJohn
* src/dircolors.hin: Add entry for mpeg4 audio files. Fixes http://bugs.gnu.org/16700
2014-02-09od: add an --endian option to control byte swappingNiels Möller
* src/od.c (main): Handle the new --endian option, taking "little" and "big" as parameters. (usage): Describe the new option. (PRINT_FIELDS): Adjust to swap bytes if required. * tests/misc/od-endian.sh: A new test to verify the byte swapping operations for hex (ints) and floats for all sizes between 1 and 16 inclusive. * test/local.mk: Reference the new test. * doc/coreutils.texi (od invocation): Describe the new option. * NEWS: Mention the new feature.
2014-01-29stat,tail: improve support for HFS+ and HFSXPádraig Brady
* src/stat.c (human_fstype): Add new file system ID definitions. * NEWS: Mention the improvement. Fixes http://bugs.gnu.org/16336
2014-01-24tests: skip chown/separator with conflicting group IDsAssaf Gordon
* tests/chown/separator.sh: skip test if the user's group has multiple entries. Fixes http://bugs.gnu.org/16532
2014-01-21build: suppress an erroneous warning --with-selinux=noPádraig Brady
* m4/jm-macros.m4: Don't check the SELinux cached variables --without-selinux. Reported-by: Bernhard Voelker
2014-01-17build: remove no longer used spawn-pipe files from POTFILES.inPádraig Brady
This should have been part of the previous commit v8.22-14-gf18999b * po/POTFILES.in: Remove gnulib files no longer used. Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/8288209/
2014-01-17build: avoid unneeded spawn-pipe gnulib modulePádraig Brady
* bootstrap.conf: Reference the used pipe-posix module rather than the uneeded and larger spawn-pipe module, which the pipe module is the deprecated equivalent of.
2014-01-17doc: clarify SMACK related --help and documentationChengwei Yang
* src/ls.c: Remove all mention of SELinux since ls should treat all security context labels equally. * doc/coreutils.texi (ls invocation): Likewise. (id invocation): Clarify that -Z outputs the context inherited by the process, rather than one specific to a user. Note for SMACK this can be set instead by the SMACK64EXEC label, in the unusual case where this is set on the id executable. * src/id.c (usage): Likewise. * src/mkdir.c (usage): Clarify that -Z is specific to SELinux, while --context=CTX is also supported for SMACK. * src/mkfifo.c (usage): Likewise. * src/mknod.c (usage): Likewise.
2014-01-17ln: fix replacing symbolic links whose targets can't existPádraig Brady
* src/ln.c (errno_nonexisting): A new function to determine if the errno implies that a file doesn't or can't (currently) exist. (target_directory_operand): Use the new function to expand the set of errors we handle. * tests/ln/sf-1.sh: Add test cases for the newly handled errors. * THANKS.in: Mention the reporter. * NEWS: Mention the bug fix.
2014-01-14tests: restrict a recent SELinux test to SELinux systemsPádraig Brady
* tests/cp/no-ctx.sh: Since the test diagnoses whether the intercepted lgetfilecon() calls are actually called or not, restrict the test to systems where that occurs. The test cases are minimal on non SELinux systems and should be well covered by other tests. Reported-by: Bernhard Voelker
2014-01-13copy: fix a segfault in SELinux context copying codeNicolas Iooss
* src/selinux.c (restorecon_private): On ArchLinux the `fakeroot cp -a file1 file2` command segfaulted due to getfscreatecon() returning a NULL context. So map this to the sometimes ignored ENODATA error, rather than crashing. * tests/cp/no-ctx.sh: Add a new test case. * tests/local.mk: Reference the new test. * NEWS: Mention the fix. Fixes http://bugs.gnu.org/16335
2014-01-13maint: tests: refactor gcc commands for building shared libPádraig Brady
* init.cfg (gcc_shared_): A new function refactored from tests. (require_gcc_shared_): Adjust to call gcc_shared_() to build the test library, and remove that library before the function returns. * tests/cp/nfs-removal-race.sh: Call the new gcc_shared_(). * tests/df/no-mtab-status.sh: Likewise. * tests/df/skip-duplicates.sh: Likewise. * tests/ls/getxattr-speedup.sh: Likewise. * tests/rm/r-root.sh: Likewise.
2014-01-13copy: fix SELinux context preservation for existing directoriesPádraig Brady
* src/copy.c (copy_internal): Use the global process context to set the context of existing directories before they're populated. This is more consistent with the new directory case, and fixes a bug for existing directories where we erroneously set the context to the last copied descendent, rather than to that of the source directory itself. * tests/cp/cp-a-selinux.sh: Add a test for this case. * NEWS: Mention the fix. * THANKS.in: Add reporter Michal Trunecka.
2014-01-10tests: improve test for a working setfaclBernhard Voelker
Prompted by a test framework failure of tests/mkdir/p-acl.sh on armv7l: The previous test for a working setfacl was not sufficient in some circumstances. * init.cfg (require_setfacl_): Call setfacl twice with conflictive ACL specs, and use ACL specs which can't be mapped into regular file permission bits. Document the reasons.
2014-01-09tests: avoid FP failure when cp fails for /proc/cpuinfoBernhard Voelker
On emulated aarch64 systems like in the qemu-based OpenBuildService of openSUSE, cp fails to copy /proc/cpuinfo because the inode number changes between the initial stat() call and copying the file: $ cp /proc/cpuinfo exp cp: skipping file '/proc/cpuinfo', as it was \ replaced while being copied * tests/cp/proc-zero-len.sh: When cp fails, check on the above error message to skip the test.
2014-01-02maint: fix copyright holder and year in selinux sourcesBernhard Voelker
* src/selinux.c: As the copyright is assigned to the FSF for all of coreutils, replace the copyright holder from "Red Hat, Inc." to "Free Software Foundation, Inc.". Prompted by a warning of 'make update-copyright'. Also update the copyright year.
2014-01-02maint: update all copyright year number rangesBernhard Voelker
Run "make update-copyright", but then also run this, perl -pi -e 's/2\d\d\d-//' tests/sample-test to make that one script use the single most recent year number.
2014-01-02maint: prevent update-copyright from updating files from gnulibBernhard Voelker
The files 'bootstrap' and 'tests/init.sh' are taken from the gnulib submodule. Therefore, 'make update-copyright' there should already have updated the copyright year in these 2 files. * .x-update-copyright: Add entries for the above mentioned files.
2014-01-02build: update gnulib submodule, bootstrap and tests/init.sh to latestBernhard Voelker
* gnulib: Update to latest. * bootstrap: Update from gnulib. * tests/init.sh: Likewise.
2013-12-13maint: post-release administriviaPádraig Brady
* NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
2013-12-13version 8.22Pádraig Brady
* NEWS: Record release date.
2013-12-13stat,tail: improve support for hostfs and smackfsPádraig Brady
hostfs is provided by the Linux UML subsystem. smackfs is provided by the Linux Smack security module. * src/stat.c (human_fstype): Add new file system ID definitions. * NEWS: Mention the improvement, and adjust for the fact that SNFS is a remote file system.
2013-12-13tests: avoid unlikely deadlock in dd/no-allocate on some shellsPádraig Brady
* test/dd/no-allocate.sh: Use 'wait' to ensure we don't have multiple writers to the fifo, which was seen to trigger a very hard to reproduce deadlock with make -j20 on solaris. Also avoid writing to the fifo with the shell; instead using dd. (check_dd_seek_alloc): A new function refactored from the various cases, which are now constructed from function parameters.
2013-12-13tests: restrict cp --link inode comparisons to compatible systemsPádraig Brady
* tests/cp/link-deref.sh: On systems were cp can't determine if gnulib linkat() emulation might create a symlink instead of a hardlink to a symlink, copy.c will create a symlink to the symlink so that it has more control over its metadata. Also even if the system supports this operation, the particular file system under test may not. So avoid the hardlinked symlink verification in these cases. This fixes a false failure on aix, solaris and freebsd.
2013-12-13build: default to avoiding openssl system librariesPádraig Brady
* configure.ac: Don't change the gnulib default of 'no' for whether to link with openssl system libraries if available. Distributions can explicitly enable this as their policy allows. * NEWS: Adjust accordingly.
2013-12-12doc: fix typo in numfmt invocationTiger Lee
* doc/coreutils.texi (numfmt invocation): s/nun/num/. Fixes http://bugs.gnu.org/16122
2013-12-11tests: df/total-unprocessed: fix false failure with lofsPádraig Brady
* tests/df/total-unprocessed.sh: Skip the test when we can't determine the file system type as the exclusion filter is not applied in that case. "lofs" being ignored is effectively an unknown file system type.
2013-12-11tests: avoid warnings due to new filefrag -v formatPádraig Brady
* tests/cp/sparse-fiemap.sh: Newer versions of filefrag output more fields, in different orders, so handle that to avoid warnings.
2013-12-09build: update gnulib to fix a tests build failurePádraig Brady
* gnulib: Update to incorporate a fix for building tests with -Werror=old-style-declaration
2013-12-09tests: fix false failure due to xargs usagePádraig Brady
* tests/readlink/multi.sh: Ensure there is a trailing delimeter or xargs may (on AIX 7 at least) suppress the last argument.
2013-12-09tests: fix false failure on systems without /dev/stdinPádraig Brady
* tests/rm/interactive-once.sh: Ensure the expected output matches with the output on systems without /dev/stdin (like AIX 7). Also change some fail=1 to a more appropriate framework_failure_.
2013-12-09build: update gnulib and improve --with-openssl configure helpPádraig Brady
* configure.ac: Use gl_SET_CRYPTO_CHECK_DEFAULT() to set the coreutils default for --with-openssl early, so that the help text can be provided in a standard and complete form. * gnulib: Update to incorporate a build fix on platforms with only some of md5 and sha* implemented by libcrypto.