summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-03-29Regenerate .cvsignore and .gitignore files.Jim Meyering
2007-03-29mkfifo, mknod: Accept new "-Z, --context=C" option.Jim Meyering
* src/mkfifo.c, src/mknod.c: Include <selinux/selinux.h>. (main): Honor it. * src/Makefile.am (mkfifo_LDADD, mknod_LDADD): Use $(LIB_SELINUX).
2007-03-29mkdir: Accept new "-Z, --context=C" option.Jim Meyering
* src/mkdir.c: Include <selinux/selinux.h>. (main): Honor it. * src/Makefile.am (mkdir_LDADD): Use $(LIB_SELINUX).
2007-03-29* tests/cp/cp-a-selinux: New file. Test for the bug reported inJim Meyering
* tests/cp/Makefile.am (TESTS): Add cp-a-selinux. * tests/selinux: New file. * tests/Makefile.am (EXTRA_DIST): Add selinux. * tests/misc/selinux: Source the new script, rather than open coding it. Change how "cp -a" and "cp --preserve=context" work with SELinux. Now, cp -a attempts to preserve context, but failure to do so does not change cp's exit status. However "cp --preserve=context" is similar, but failure *does* cause cp to exit with nonzero status. * src/copy.h (struct cp_options) [require_preserve_context]: New member. * src/copy.c (copy_reg, copy_internal): Implement the above. * src/mv.c (cp_option_init): Initialize the new member. * src/install.c (cp_option_init): Likewise. * src/cp.c (cp_option_init): Likewise. (decode_preserve_arg): Set it or reset it. FIXME: add an on-writable-NFS-only test
2007-03-29* src/system.h (GETOPT_SELINUX_CONTEXT_OPTION_DECL): Define.Jim Meyering
2007-03-29cp, mv, install: add SELinux support, but unlike with the Red HatJim Meyering
patch, mv and cp do not provide the "-Z context" option. * src/copy.c: Include <selinux/selinux.h>. (restore_default_fscreatecon): New function. (copy_reg): Make cp --preserve=context work for existing destination. (copy_internal): Likewise for new destinations. * src/copy.h (cp_options) [preserve_security_context]: New member. * src/cp.c: Include <selinux/selinux.h>. (selinux_enabled): New global. (usage): Mention new --preserve=context option. (PRESERVE_CONTEXT): Define/use. (decode_preserve_arg): Handle PRESERVE_CONTEXT. (main): Remove an obsolete comment. If --preserve=context is specified on a system without SELinux enabled, give a diagnostic and fail. * src/mv.c: Include <selinux/selinux.h>. Set x->preserve_security_context if SELinux is enabled. * src/install.c: Accept new "-Z, --context=C" option. Accept --preserve-context option (but not -P option). Accept alternate spelling: --preserve_context, for now. Include <selinux/selinux.h> and "quotearg.h". (selinux_enabled, use_default_selinux_context): New globals. (PRESERVE_CONTEXT_OPTION): Define. (cp_option_init): Default: do not preserve security context. (setdefaultfilecon): New function. (main): Honor new options. * src/Makefile.am (mv_LDADD, cp_LDADD, ginstall_LDADD): Add $(LIB_SELINUX).
2007-03-29* tests/misc/selinux [VERBOSE]: Print version info for eachJim Meyering
of the tested tools, not just ls.
2007-03-29* src/c99-to-c89.diff: Remove the ls.c patch, now that I'veJim Meyering
temporarily removed the offending c99'ism.
2007-03-29* src/chcon.c (usage): Split a string literal that was longer than 509.Jim Meyering
2007-03-29* src/ls.c (gobble_file): Don't call getfilecon unless print_scontext.Jim Meyering
Upon failed getfilecon, accept not just ENOTSUP, but also ENODATA.
2007-03-29* src/c99-to-c89.diff: Adjust offsets.Jim Meyering
2007-03-29* AUTHORS: Add chcon.Jim Meyering
2007-03-29* src/c99-to-c89.diff: Remove trailing blanks.Jim Meyering
2007-03-29* src/chcon.c: Don't include "dirname.h". system.h already includes it.Jim Meyering
2007-03-29* gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.Jim Meyering
2007-03-29* src/c99-to-c89.diff: Handle a new c99'ism in ls.c.Jim Meyering
2007-03-29* src/id.c (main): Tweak id -Z diagnostic.Jim Meyering
2007-03-29* POTFILES.in: Add src/chcon.c.Jim Meyering
2007-03-29id: Add SELinux support: -Z option.Jim Meyering
* src/id.c (main): Apply patches from Fedora, with these changes: Remove #ifdef WITH_SELINUX. Use error (EXIT_FAILURE, not fprintf+exit(1). * src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).
2007-03-29Keep SELinux-related ChangLog entries here.Jim Meyering
2007-03-29stat: Add support for SELinux in the form of a %C format directive.Jim Meyering
* src/stat.c (follow_links): Make this variable file-global. (out_file_context): New function. (print_statfs): Honor %C. (print_stat): Honor %C. (do_stat): Remove follow_links parameter. (usage): Document the two %C directives. (main): Accept -Z (though it's a no-op). * src/Makefile.am (stat_LDADD): Define.
2007-03-29add chconJim Meyering
2007-03-29ls: Add support for SELinux and a slightly modified -Z option.Jim Meyering
I started with the patches from Red Hat. The entries below tell how the code evolved. * src/ls.c (print_long_format, print_file_name_and_frills): When there is no security context (due to getfilecon/lgetfilecon failing with e.g. ENOTSUP), print it as "?", not "". * src/ls.c (print_file_name_and_frills): Make -Z work without -l. (length_of_file_name_and_frills): Likewise. * src/ls.c: Remove the --lcontext and --scontext options. Change the way -Z, --context work so that it no longer implies -l. Thus, -Z -l will work like -lcontext and -Z without -l will work like --scontext. Adjust tests to reflect new 'ls -l' syntax -- affects only systems with SELinux when operating on a file with no ACL. These tests assumed that everything before the first space on each line is the 10-byte mode string. But there may also be a "+" in the 11th column, just before the space. However, note that this is not new. The same thing would have happened even without the change below, when listing a file with an ACL. * tests/chmod/equals, tests/cp/cp-parents, tests/cp/fail-perm: * tests/cp/link-preserve, tests/install/basic-1, tests/misc/mknod: * tests/mkdir/parents, tests/mkdir/special-1, tests/mv/partition-perm: Don't make compilation depend on USE_ACL. An SELinux security context counts as an "alternate access control method", so ls must output a "+" for each file with a security context. * src/ls.c [struct fileinfo] (have_acl): Declare unconditionally. (FILE_HAS_ACL): Remove macro definition. Use f->have_acl directly. (gobble_file): Record whether a file has a security context, and update the condition used to determine whether to print the "+". (gobble_file): Call getfilecon/lgetfilecon also when format == long_format, so that we get the "+". * src/ls.c (gobble_file): Add a comment explaining why (with a security context option) ls doesn't exit nonzero due to e.g., getfilecon failing with errno == ENOTSUP. * src/ls.c (gobble_file): Ignore failure of getfilecon if it's due to ENOTSUP. * src/ls.c (gobble_file): Factor out three small blocks using getfilecon and lgetfilecon. Don't ignore return value from getfilecon and lgetfilecon. * src/ls.c (print_long_format): Don't use ?: (empty 2nd arg with C ternary operator). (print_scontext_format): Likewise. (print_scontext): Declare to be "bool", not int. Adjust uses. * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Add $(LIB_SELINUX). * tests/misc/chcon: New file. * tests/misc/chcon-fail: New file. * tests/Makefile.am (check-root): Run new, root-only misc/chcon test. * tests/misc/Makefile.am (TESTS): Add chcon and chcon-fail. * tests/misc/Makefile.am (TESTS): Add selinux. * tests/misc/selinux: New file. * tests/help-version: Skip chcon.
2007-03-29* man/chcon.x: New file.Jim Meyering
* man/Makefile.am: Build chcon.1.
2007-03-29.cvsignore, .gitignore: updateJim Meyering
2007-03-29New program: chconJim Meyering
* gl/modules/selinux-at: New module. Check for libselinux and set LIB_SELINUX here, unconditionally, rather than depending on the configure-time --enable-selinux option. * gl/modules/selinux-h: New module. * bootstrap.conf (gnulib_modules): Add selinux-at. * gl/lib/selinux-at.c, gl/lib/selinux-at.h: New files. * gl/lib/se-selinux_.h: New file. * gl/lib/se-context_.h: New file. * gl/m4/selinux-selinux-h.m4: New file. * gl/m4/selinux-context-h.m4: New file. * src/Makefile.am (bin_PROGRAMS): Add chcon. (chcon_LDADD): Define. * README: Add chcon to the list of programs. * src/chcon.c: Rewrite the original (Red Hat) chcon to use fts.
2007-03-29Merge branch 'master' of /cuJim Meyering
2007-03-29* .vg-suppressions: Add libc-getpwuid-leak.Jim Meyering
2007-03-28Merge branch 'master' of /cuJim Meyering
2007-03-28Help translators include translation team's web or email address.Jim Meyering
* src/system.h (emit_bug_reporting_address): New function. * src/base64.c: Use it rather than a literal printf. * src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c: * src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c: * src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c: * src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c: * src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c: * src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c: * src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c: * src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c: * src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c: * src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c: * src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c: * src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c: * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c: * src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c: * src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c: * src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c: * src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c: * src/who.c, src/whoami.c, src/yes.c: Likewise.
2007-03-28Add to .cvsignore and .gitignore files.Jim Meyering
2007-03-28* src/stty.c: Don't include "vasprintf.h", now that itsJim Meyering
declarations are guaranteed to be in gnulib's stdio.h. * src/who.c: Likewise.
2007-03-27* README: Use "install", not "ginstall" in the list of program names.Jim Meyering
* src/Makefile.am (check-README): Substitute s/ginstall/install/.
2007-03-25Add to .cvsignore and .gitignore files.Jim Meyering
2007-03-25* src/c99-to-c89.diff: Regenerate.Jim Meyering
2007-03-25Avoid the need for euidaccess and/or lstat on every directory entryPaul Eggert
with 'rm -r dir' (without -f), if we are root, or if we are removing a directory tree that is full of symbolic links. * bootstrap.conf (gnulib_modules): Add write-any-file. * src/copy.c: Include write-any-file.h. (UNWRITABLE): Remove macro, replacing with.... (writable_destination): New function, which uses can_write_any_file to avoid the need for euidaccess when we are privileged. (overwrite_prompt, abandon_move): Use it. * src/remove.c: Include write-any-file.h. (D_TYPE): New macro. (DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New macros. (write_protected_non_symlink): Don't bother to stat if we can write any file. (prompt): New arg PDIRENT_TYPE. All callers changed. Use readdir dirent type to avoid the need for 'lstat' on each directory entry in cases like 'rm -r dir', if we are root, or if the tree is full of symbolic links. (DT_IS_KNOWN, DT_MUST_BE): Remove. (remove_entry): New arg DIRENT_TYPE_ARG. All callers changed.
2007-03-24If strace malfunctions, skip the test rather than failing it.Jim Meyering
* tests/mv/atomic: Required on a mips-unknown-linux-gnu system running the aging linux-2.4.27-mipscvs-20040814.
2007-03-23* src/pathchk.c: Don't include euidaccess.h, as we don't callJim Meyering
euidaccess.
2007-03-23* README-package-renamed-to-coreutils: Add a URL for the FAQ,Jim Meyering
and a couple more archive links.
2007-03-23Post-release version change.Jim Meyering
* NEWS: Add a line for 6.9+. * configure.ac (AC_INIT): Set new version string.
2007-03-22.prev-version: Record previous version: 6.9.Jim Meyering
2007-03-22Version 6.9.Jim Meyering
* NEWS: Record release date and new version number. * configure.ac (AC_INIT): New version number.
2007-03-22* tests/mv/hard-3: Correct the preceding change: $3 -> $2.Jim Meyering
2007-03-22* coreutils.texi (md5sum invocation): Document escapes in outputEric Blake
format. Reported by Armijn Hemel.
2007-03-22Improve a test script.Paul Eggert
* tests/mv/hard-3: Check for 'ls' failure, too. Generate more-useful debugging output when 'ls' fails.
2007-03-21Fix a test script not to claim an ext2 file system is of type xfs.Jim Meyering
* tests/du/slink: When using df --local and df --type=TYPE, test only the exit code. Don't bother with stdout. Prompted by a report by Thomas Schwinge of an inaccurate diagnostic.
2007-03-21Add to .cvsignore and .gitignore files.Jim Meyering
2007-03-21* gl/lib/savewd.c: Remove this file, since the savewd_save changeJim Meyering
is now in gnulib. The other wasn't useful.
2007-03-20Skip part of this test when "." is not a local file system.Jim Meyering
* tests/mkdir/p-3: Likewise.
2007-03-20* gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.Jim Meyering