bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: rm now performs run-time check for buggy readdir


From: Eric Blake
Subject: Re: FYI: rm now performs run-time check for buggy readdir
Date: Fri, 13 May 2005 06:33:12 -0600
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Jim Meyering on 5/13/2005 4:15 AM:
> +++ src/remove.c      13 May 2005 07:39:50 -0000      1.121
> @@ -46,16 +46,29 @@
>  #define obstack_chunk_alloc malloc
>  #define obstack_chunk_free free
>  
> -/* FIXME: if possible, use autoconf...  */
> +/* 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.  */
>  #ifdef __GLIBC__
> -# define ROOT_CAN_UNLINK_DIRS 0
> +# define UNLINK_CAN_UNLINK_DIRS 0  /* Good!  */
>  #else
> -# define ROOT_CAN_UNLINK_DIRS 1
> +# define UNLINK_CAN_UNLINK_DIRS 1  /* Less efficient.  */
>  #endif

Cygwin (#ifdef __CYGWIN__) cannot link or unlink directories, failing with
EPERM.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFChJ6I84KuGfSFAYARAnGeAJ4xKynzJcfEblstM7uANkna/KhFTQCg0QbO
JHm853HNLvTlBn1V55dHNXw=
=HHuB
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]