<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src, branch v8.1</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.1</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2009-11-16T08:30:50Z</updated>
<entry>
<title>true, false: perform initialization only when argc == 2</title>
<updated>2009-11-16T08:30:50Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-11-15T21:23:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=161e5120d4c586950ad6a110baa039ab11af1038'/>
<id>urn:sha1:161e5120d4c586950ad6a110baa039ab11af1038</id>
<content type='text'>
* src/true.c (main): There is no reason to examine argv[0],
call atexit, etc., in the usual case in which we're about to exit.
This has the side effect of making it so that these programs
no longer segfault when subjected to execve abuse.
Before this change, these commands would make "true" segfault:
  printf '%s\n' '#include &lt;unistd.h&gt;' 'int main(int c, char**v)' \
    '{ execve (v[1], 0, 0); }' &gt; k.c &amp;&amp; gcc k.c &amp;&amp; ./a.out $PWD/true
Now it succeeds.  Reported by Tetsuo Handa and Bart Van Assche
via Ondřej Vašík in http://bugzilla.redhat.com/537684.
</content>
</entry>
<entry>
<title>tail -F can fail to track a file after it's been rotated</title>
<updated>2009-11-16T08:30:43Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-11-15T08:25:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3b997a9bcb05198c880e5d1605a3c96c1d7f9c5d'/>
<id>urn:sha1:3b997a9bcb05198c880e5d1605a3c96c1d7f9c5d</id>
<content type='text'>
Tailing forever and by-name (--follow=name, -F), tail would
sometimes fail to follow a file that had been removed via rename.
If you can't apply this patch and have tail 7.6 or newer, you can
work around the bug via the undocumented --disable-inotify option.
* src/tail.c (tail_forever_inotify): When tailing by name (-F),
do not un-watch a file upon receipt of the IN_MOVE_SELF event.
Reported by Arjan Opmeer in http://bugs.debian.org/548439.
* NEWS (Bug fixes): Mention it.
Also see http://marc.info/?l=coreutils-bug&amp;m=125829031916515
* tests/Makefile.am (TESTS): Add tail-2/inotify-rotate.
* tests/tail-2/inotify-rotate: New test.
</content>
</entry>
<entry>
<title>build: update gnulib, for getgroups improvements</title>
<updated>2009-11-13T14:50:20Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-11-12T18:59:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6a31fd8d732afd232d6a99708192170e13129374'/>
<id>urn:sha1:6a31fd8d732afd232d6a99708192170e13129374</id>
<content type='text'>
A replacement getgroups is now guaranteed to exist, but it may
fail with ENOSYS.  mgetgroups is moved to gnulib, and now takes
gid_t instead of GETGROUPS_T (but setgroups still needs GETGROUPS_T).

* gnulib: Update to latest.
* gl/modules/mgetgroups: Delete, moved to gnulib.
* gl/m4/mgetgroups.m4: Likewise.
* gl/lib/mgetgroups.h: Likewise.
* gl/lib/mgetgroups.c: Likewise.
* src/group-list.c (print_group_list): Adjust callers.
* src/id.c (print_full_info): Likewise.
</content>
</entry>
<entry>
<title>ls: fix capability coloring</title>
<updated>2009-11-09T08:16:20Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-11-08T03:45:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=10d97b31910b0030f7716474a48b3fc8e00dd216'/>
<id>urn:sha1:10d97b31910b0030f7716474a48b3fc8e00dd216</id>
<content type='text'>
Capability checking was incorrectly done on just the base name
rather than on the whole path.  Consequently there could be both
false positives and negatives when coloring files with capabilities.
Also capability checking was not done at all in certain cases for
non executable files.  Note passing absolute rather than relative
names to cap_get_file() reduces the has_capability() overhead
from around 33% to 30%.  I.E. ls --color is now around 3% faster.

* src/ls.c (struct fileinfo): Add a has_capability member.
(print_color_indicator): Refactor to pass just a fileinfo pointer
and a flag to say if we're dealing with a symlink target.
(print_name_with_quoting): Likewise.
(gobble_file): Set has_capability in the fileinfo struct.  Also do
a capability check even if executable coloring is disabled.
Ditto for SETUID and SETUID coloring.
Comment on how expensive has_capability() is.
(print_long_format): Adjust to refactored print_name_with_quoting.
(quote_name): Likewise.
(print_file_name_and_frills): Likewise.
* tests/ls/capability: Test the various false positive and negatives.
* THANKS: Add reporter (Ivan Labath).
* NEWS: Mention the fix.
</content>
</entry>
<entry>
<title>build: consistently use freopen-safer</title>
<updated>2009-11-07T17:10:28Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-11-05T23:48:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=56b85e035b77e48e7ec241b54da3f9c9d19e77d5'/>
<id>urn:sha1:56b85e035b77e48e7ec241b54da3f9c9d19e77d5</id>
<content type='text'>
cat, head, ptx, shuf, tac, tail, tee, tr, and uniq used freopen
on stdout, and were potentially vulnerable.  dircolors, du, and
tsort only used it on stdin, which is unaffected by freopen_safer,
but this covers all uses for consistency.

* cfg.mk (sc_require_stdio_safer): New rule.
* gl/modules/xfreopen (Depends-on): Add freopen-safer.
* gl/lib/xfreopen.c (includes): Use stdio--.h.
* src/ptx.c (includes): Likewise.
* src/shuf.c (includes): Likewise.
* src/uniq.c (includes): Likewise.
* src/dircolors.c (includes): Likewise.
* src/du.c (includes): Likewise.
* src/tsort.c (includes): Likewise.
</content>
</entry>
<entry>
<title>mktemp: fix bug with -q and closed stdout</title>
<updated>2009-11-07T17:10:25Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-11-05T19:19:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c768e2231b89901a2e29c3bf96c027b64f8646d9'/>
<id>urn:sha1:c768e2231b89901a2e29c3bf96c027b64f8646d9</id>
<content type='text'>
If stdin or stdout is closed, then freopen(,stderr) can violate
the premise that STDERR_FILENO==fileno(stderr), which in turn
breaks mktemp -q.

* bootstrap.conf (gnulib_modules): Add freopen-safer.
* src/mktemp.c (includes): Use stdio--.h.
* tests/misc/close-stdout: Enhance test to catch bug.
</content>
</entry>
<entry>
<title>maint: make du's cycle-detection code consistent</title>
<updated>2009-11-07T07:43:05Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-11-07T07:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9a8d8f46a541d333f98dca26d053d1f5bd4424bb'/>
<id>urn:sha1:9a8d8f46a541d333f98dca26d053d1f5bd4424bb</id>
<content type='text'>
* src/du.c (process_file): Revert the du.c-changing part of
commit 8ba5d1a7. Use cycle_warning_required instead.
</content>
</entry>
<entry>
<title>chcon, chgrp, chmod and chown now diagnose a directory cycle</title>
<updated>2009-11-07T07:43:00Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-11-07T07:09:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d9dbbb9a455f6bfc4e09d9f5f6c6c633f1b03c52'/>
<id>urn:sha1:d9dbbb9a455f6bfc4e09d9f5f6c6c633f1b03c52</id>
<content type='text'>
* lib/xfts.c (cycle_warning_required): New function.
* lib/xfts.h: Declare it.
* src/chown-core.c (change_file_owner): Diagnose a cycle.
* src/chmod.c (process_file): Likewise.
* src/chcon.c (process_file): Likewise.
* NEWS (Bug fixes): Mention this.
</content>
</entry>
<entry>
<title>nproc: A new program to count the available processors</title>
<updated>2009-11-06T16:54:12Z</updated>
<author>
<name>Giuseppe Scrivano</name>
<email>gscrivano@gnu.org</email>
</author>
<published>2009-10-31T17:59:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=74cf4cb26dcecd36eb45dc00dbd4587d9dc24a2f'/>
<id>urn:sha1:74cf4cb26dcecd36eb45dc00dbd4587d9dc24a2f</id>
<content type='text'>
* AUTHORS: Add my name.
* NEWS: Mention it.
* README: Likewise.
* bootstrap.conf (gnulib_modules): Add nproc.
* doc/coreutils.texi (nproc invocation): Add nproc info.
* man/Makefile.am (nproc.1): Add dependency.
* man/nproc.x: New template.
* man/.gitignore: Ignore generated man page.
* po/POTFILES.in: Add src/nproc.c.
* src/.gitignore: Exclude nproc.
* src/Makefile.am (EXTRA_PROGRAMS): Add nproc.
* src/nproc.c: New file.
* tests/Makefile.am (TESTS): Add misc/nproc-{avail,positive}.
* tests/misc/nproc-avail: New file.
* tests/misc/nproc-positive: New file.
</content>
</entry>
<entry>
<title>mktemp: use more robust means to avoid double-close of stdout</title>
<updated>2009-11-05T20:12:35Z</updated>
<author>
<name>Eric Blake</name>
<email>ebb9@byu.net</email>
</author>
<published>2009-11-05T16:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=dde83c27b4e5c75063c304e5dcfada6950a6d7ee'/>
<id>urn:sha1:dde83c27b4e5c75063c304e5dcfada6950a6d7ee</id>
<content type='text'>
Reverts earlier patch - fflush() can succeed but fclose() fail for
some cases of write failures, and we want to catch those.

* src/mktemp.c (stdout_closed): New variable.
(maybe_close_stdout): New function, borrowed from dd.c.
(main): Track whether stdout has been closed.
</content>
</entry>
</feed>
