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.