bug#11108: [PATCH] chmod: fix symlink race condition

2024-03-20 Thread Pádraig Brady
On 28/03/2012 21:28, Paul Eggert wrote: On 03/28/2012 01:13 PM, Jim Meyering wrote: $ ./chmod u+w f ./chmod: changing permissions of 'f': Operation not supported Yeouch. I undid the change for now. Hmm, why did "make check" work for me? I'll have to investigate later, alas. Patch

bug#11108: [PATCH] chmod: fix symlink race condition

2012-03-28 Thread Jim Meyering
Paul Eggert wrote: This fixes what I hope is an obvious race condition that can occur if some other process substitutes a symlink for a non-symlink while chmod is running. Good catch. I'll bet that's exploitable by anyone who can convince root to run chmod -r ... DIR on files they own

bug#11108: [PATCH] chmod: fix symlink race condition

2012-03-28 Thread Paul Eggert
On 03/28/2012 12:36 AM, Jim Meyering wrote: I presume you'll update NEWS, too, where you can say [bug introduced in the beginning] Thanks, good point. I did that in the version I just committed to the master. I note also that this doesn't protect anyone who is using a system that lacks both

bug#11108: [PATCH] chmod: fix symlink race condition

2012-03-28 Thread Jim Meyering
Paul Eggert wrote: On 03/28/2012 12:36 AM, Jim Meyering wrote: I presume you'll update NEWS, too, where you can say [bug introduced in the beginning] Thanks, good point. I did that in the version I just committed to the master. I note also that this doesn't protect anyone who is using a

bug#11108: [PATCH] chmod: fix symlink race condition

2012-03-28 Thread Jim Meyering
Paul Eggert wrote: On 03/28/2012 12:36 AM, Jim Meyering wrote: I presume you'll update NEWS, too, where you can say [bug introduced in the beginning] Thanks, good point. I did that in the version I just committed to the master. Rats: $ ./chmod u+w f ./chmod: changing permissions

bug#11108: [PATCH] chmod: fix symlink race condition

2012-03-28 Thread Paul Eggert
On 03/28/2012 01:13 PM, Jim Meyering wrote: $ ./chmod u+w f ./chmod: changing permissions of 'f': Operation not supported Yeouch. I undid the change for now. Hmm, why did make check work for me? I'll have to investigate later, alas.

bug#11108: [PATCH] chmod: fix symlink race condition

2012-03-27 Thread Paul Eggert
This fixes what I hope is an obvious race condition that can occur if some other process substitutes a symlink for a non-symlink while chmod is running. = * src/chmod.c (process_file): Don't follow symlink if we think the file is not a symlink. --- src/chmod.c | 10 +- 1 files

chmod on symlink

2009-06-01 Thread Marc Perkel
I'd like to be able to run chmod on a symlink so that users can't delete the symlink. Can it be done? ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils

Re: chmod on symlink

2009-06-01 Thread Bob Proulx
Marc Perkel wrote: I'd like to be able to run chmod on a symlink so that users can't delete the symlink. Can it be done? The permissions, owner, and group of a symlink are not significant. They are there only because other files have them and symlinks were fitted into the existing framework

Re: chmod on symlink

2009-06-01 Thread Kamil Dudka
On Monday 01 of June 2009 23:14:17 Marc Perkel wrote: I'd like to be able to run chmod on a symlink so that users can't delete the symlink. Can it be done? No. It's even not possible with a regular file. You can remove ordinary file which you have no rwx access to. You rather want to adjust