<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/chmod, branch v9.5</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v9.5</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v9.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2024-03-25T12:12:19Z</updated>
<entry>
<title>tests: fix false failure on systems that can chmod symlinks</title>
<updated>2024-03-25T12:12:19Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2024-03-25T12:12:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4cb2742d70f4160d6a8219d8f3962260fbfc15d8'/>
<id>urn:sha1:4cb2742d70f4160d6a8219d8f3962260fbfc15d8</id>
<content type='text'>
* tests/chmod/symlinks.sh: The count of adjusted modes was
one more on systems where symlink modes can be adjusted.
Therefore only include the non symlinks in the count.
</content>
</entry>
<entry>
<title>test: avoid false failure with setgid directories</title>
<updated>2024-03-24T19:46:57Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2024-03-24T19:46:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f77a6352fbc2bfb7b62bcf7dcd42d053b7a556c4'/>
<id>urn:sha1:f77a6352fbc2bfb7b62bcf7dcd42d053b7a556c4</id>
<content type='text'>
* tests/chmod/symlinks.sh: Ensure this new test is immune
to setgid directories by resetting modes with =777 rather than 777.
Also output more debugging in all failure cases.
</content>
</entry>
<entry>
<title>chmod: add support for -h, -H,-L,-P, --dereference options</title>
<updated>2024-03-19T23:43:53Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-11-28T08:13:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=07a69fc3ba717b879218592db685a1c79869cb28'/>
<id>urn:sha1:07a69fc3ba717b879218592db685a1c79869cb28</id>
<content type='text'>
There have been various requests to add -h to avoid following symlinks
for security reasons.  This wasn't provided previously as chmod(1)
already ignored symlinks unless specified on the command line.
Note chmod defaults to -H mode rather than the chown default of -P,
as usually chown can work directly on symlinks and so defaults
to not traversing those specified on the command line.
Note FreeBSD chmod does default to -P mode, but we retain the -H mode
default also for compatibility with existing chmod behavior.

Adding -HLP will allow chmod to disable traversing CLI symlinks to dirs.
Adding -h will allow to disable following CLI symlinks to files/dirs,
  also operating on all symlinks on systems that support that.
Adding --dereference will be significant with -H (the default).  I.e.
  symlinks to dirs not recursed, but symlinks are dereferenced.
Adding these options will also be consistent with chown(1), chgrp(1),
and chmod(1) on other systems.

Note since chmod(1) currently ignores symlinks by default,
and -h is primarily a mechanism to avoid following symlinks, rather than
for operating on the symlink itself, we make -h try to chmod a symlink,
but ignore ENOTSUP.  In that way we're consistent with chown(1)
where it also ignores ENOTSUP for symlinks, and we don't fail when
trying to be extra secure with command line params.

* doc/coreutils.texi (chmod invocation): Reference the -H,-L,-P
descriptions, and adjust the corresponding macros to say
the default is -H or -P as appropriate.
Add --dereference and -h,--no-dereference descriptions.
* man/chmod.x: Adjust discussion of symlink handling.
* src/chmod.c (main): Accept new options and set
fts flags appropriately.
(process_file): Process / dereference symlinks as necessary.
* src/system.h (emit_symlink_recurse_options): A new function
refactored from chown.c and chmod.c usage().
* tests/chmod/symlinks.sh: New test for the new options.
* tests/local.mk: Reference the new test.
* NEWS: Mention the new feature.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2024-01-01T13:27:23Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2024-01-01T13:22:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a966dcdb69e2f49f2587e1b7d4ade7efcff29f40'/>
<id>urn:sha1:a966dcdb69e2f49f2587e1b7d4ade7efcff29f40</id>
<content type='text'>
Update to latest gnulib with new copyright year.
Run "make update-copyright" and then...

* gnulib: Update included in this commit as copyright years
are the only change from the previous gnulib commit.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Manually update copyright year,
until we fully sync with gnulib at a later stage.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>tests: port chmod/setgid.sh to macOS 12</title>
<updated>2023-02-18T21:30:10Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2023-02-18T21:29:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=95f4ee0577dd836de523f46999777fbbbe9d2772'/>
<id>urn:sha1:95f4ee0577dd836de523f46999777fbbbe9d2772</id>
<content type='text'>
* tests/chmod/setgid.sh: Try all the groups you’re a member of,
in case id -g returns 4294967295 (nogroup) which is special
and does not let you chgrp a file to it.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2023-01-01T14:50:15Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-01-01T14:50:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=01755d36e7389aef48f712193976205e7381115b'/>
<id>urn:sha1:01755d36e7389aef48f712193976205e7381115b</id>
<content type='text'>
Update to latest gnulib with new copyright year.
Run "make update-copyright" and then...

* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Manually update copyright year,
until we fully sync with gnulib at a later stage.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2022-01-02T16:15:55Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2022-01-02T15:42:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3067a9293af07ba2cf1ababe6b4482196717f806'/>
<id>urn:sha1:3067a9293af07ba2cf1ababe6b4482196717f806</id>
<content type='text'>
Run "make update-copyright" and then...

* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>chmod: fix exit status when ignoring symlinks</title>
<updated>2021-09-24T22:42:20Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-09-24T19:57:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e8b56ebd536e82b15542a00c888109471936bfda'/>
<id>urn:sha1:e8b56ebd536e82b15542a00c888109471936bfda</id>
<content type='text'>
* src/chmod.c: Reorder enum so CH_NOT_APPLIED
can be treated as a non error.
* tests/chmod/ignore-symlink.sh: A new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the bug fix.
Fixes https://bugs.gnu.org/50784
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2021-01-01T16:36:09Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2021-01-01T16:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=32ff1d1313ff566685b9092ac929251a4c22e7c4'/>
<id>urn:sha1:32ff1d1313ff566685b9092ac929251a4c22e7c4</id>
<content type='text'>
Run "make update-copyright" and then...

* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2020-01-01T14:16:56Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2020-01-01T14:16:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=aaba82431ceca97441d56152d8c7ec2d84fa1d12'/>
<id>urn:sha1:aaba82431ceca97441d56152d8c7ec2d84fa1d12</id>
<content type='text'>
Run "make update-copyright" and then...

* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
</feed>
