[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rm: avoiding a race condition on non-glibc systems
From: |
Andreas Schwab |
Subject: |
Re: rm: avoiding a race condition on non-glibc systems |
Date: |
Fri, 13 May 2005 14:28:05 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> In reviewing parts of remove.c I noted (again) the race condition on
> systems with an unlink that may remove directories, so added this comment:
>
> +/* If anyone knows of another system for which unlink can never
> + remove a directory, please report it to address@hidden
> + The code below is slightly more efficient if it *knows* that
> + unlink(2) cannot possibly unlink a directory. */
>
> On non-glibc systems that race condition means that there's a window
> via which a privileged rm user might be tricked into unlinking a
> nonempty directory.
Why do you think that has anything to do with glibc?
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."