[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix bug on Solaris that prevents setuid root files from bein
From: |
Jim Meyering |
Subject: |
Re: [PATCH] Fix bug on Solaris that prevents setuid root files from being created |
Date: |
Wed, 11 Mar 2009 08:25:05 +0100 |
David Bartley wrote:
> The following two patches (1 for tar, 1 for gnulib) fix the bug I
> reported earlier [1]. I ran 'make check' successfully on Linux as
> well.
Hi David,
Sorry about the delay.
Thanks for working on this.
Have you started the copyright assignment process
described here (for gnulib it's the same)?
http://git.sv.gnu.org/cgit/coreutils.git/plain/HACKING
If not, please do.
While it was a neat hack, the change that added privilege-set
modification to this function did bother me, since it rendered
the function multi-thread-unsafe.
Would you be interested in correcting that? I suggest providing
two new functions, each with "priv" in its name. One to remove the
PRIV_SYS_LINKDIR attribute (returning an indication of whether it did
anything), and another to restore it, if needed.
Then the cannot_unlink_dir would simply query it, and callers like
coreutils' "remove" function will be that much closer to being
thread-safe. Of course, rm.c would have to call your new function to
remove the privilege, up front.