bug-gnulib
[Top][All Lists]
Advanced

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

Re: gnu tar 1.19 requires open() with O_DIRECTORY?


From: Eric Blake
Subject: Re: gnu tar 1.19 requires open() with O_DIRECTORY?
Date: Mon, 18 Feb 2008 21:30:46 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

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

According to John E. Malmberg on 2/18/2008 8:46 PM:
| I have run into a problem: GNU TAR now requires that the open() call
| support O_DIRECTORY.

Tar is using O_DIRECTORY to close a security hole, and not to directly
read the directory contents.  And POSIX requires that a directory be
openable read-only, even though reads on such a fd are allowed to fail.
Gnulib's replacemente <fcntl.h> should detect platforms that lack
O_DIRECTORY, and define it to 0 on those platforms.  The trick now is
figuring out why gnulib's <fcntl.h> didn't work for VMS; it may also be
necessary to provide a replacement open() that can 'support' opening
directories by using opendir under the hood.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHult184KuGfSFAYARApsiAJ0ZHTwvVEgdiwt060B97oYAZ2UcjwCfVRUY
WmRg7GXvt6eti10elGmBiN0=
=+Rj8
-----END PGP SIGNATURE-----




reply via email to

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