* dtable.cc (fh_alloc): Only disallow opening of nonexistent on-disk device.
* path.cc (path_conv::check): Remove PATH_KEPT_HANDLE setting. * path.h (path_types): Remove PATH_KEPT_HANDLE. (path_conv::kept_handle): Delete now-unneeded function.
This commit is contained in:
parent
080f275bae
commit
8b4bd08220
@ -1,3 +1,11 @@
|
|||||||
|
2012-04-21 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||||
|
|
||||||
|
* dtable.cc (fh_alloc): Only disallow opening of nonexistent on-disk
|
||||||
|
device.
|
||||||
|
* path.cc (path_conv::check): Remove PATH_KEPT_HANDLE setting.
|
||||||
|
* path.h (path_types): Remove PATH_KEPT_HANDLE.
|
||||||
|
(path_conv::kept_handle): Delete now-unneeded function.
|
||||||
|
|
||||||
2012-04-19 Christopher Faylor <me.cygwin2012@cgf.cx>
|
2012-04-19 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||||
|
|
||||||
* dtable.cc (fh_alloc): Keep fh which was flagged as error if it is for
|
* dtable.cc (fh_alloc): Keep fh which was flagged as error if it is for
|
||||||
|
@ -607,10 +607,10 @@ fh_alloc (path_conv& pc)
|
|||||||
fh = cnew (fhandler_nodevice);
|
fh = cnew (fhandler_nodevice);
|
||||||
else if (fh->dev () == FH_ERROR)
|
else if (fh->dev () == FH_ERROR)
|
||||||
{
|
{
|
||||||
if (pc.kept_handle () && pc.dev.isfs ())
|
if (!pc.isopen () && pc.dev.isfs ())
|
||||||
fh->dev () = pc.dev; /* Special case: This file actually exists on
|
fh->dev () = pc.dev; /* Special case: This file actually exists on
|
||||||
disk and this is a stat() so just return the
|
disk and we're not trying to open it so just
|
||||||
info from pc. */
|
return the info from pc. */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
delete fh;
|
delete fh;
|
||||||
|
@ -1152,9 +1152,6 @@ out:
|
|||||||
if (opt & PC_CTTY)
|
if (opt & PC_CTTY)
|
||||||
path_flags |= PATH_CTTY;
|
path_flags |= PATH_CTTY;
|
||||||
|
|
||||||
if (opt & PC_KEEP_HANDLE)
|
|
||||||
path_flags |= PATH_KEPT_HANDLE;
|
|
||||||
|
|
||||||
if ((opt & PC_POSIX))
|
if ((opt & PC_POSIX))
|
||||||
{
|
{
|
||||||
if (tail < path_end && tail > path_copy + 1)
|
if (tail < path_end && tail > path_copy + 1)
|
||||||
|
@ -77,7 +77,6 @@ enum path_types
|
|||||||
PATH_IHASH = MOUNT_IHASH,
|
PATH_IHASH = MOUNT_IHASH,
|
||||||
PATH_ALL_EXEC = (PATH_CYGWIN_EXEC | PATH_EXEC),
|
PATH_ALL_EXEC = (PATH_CYGWIN_EXEC | PATH_EXEC),
|
||||||
PATH_NO_ACCESS_CHECK = PC_NO_ACCESS_CHECK,
|
PATH_NO_ACCESS_CHECK = PC_NO_ACCESS_CHECK,
|
||||||
PATH_KEPT_HANDLE = 0x00200000,
|
|
||||||
PATH_CTTY = 0x00400000, /* could later be used as ctty */
|
PATH_CTTY = 0x00400000, /* could later be used as ctty */
|
||||||
PATH_OPEN = 0x00800000, /* use open semantics */
|
PATH_OPEN = 0x00800000, /* use open semantics */
|
||||||
PATH_LNK = 0x01000000,
|
PATH_LNK = 0x01000000,
|
||||||
@ -154,7 +153,6 @@ class path_conv
|
|||||||
bool has_acls () const {return !(path_flags & PATH_NOACL) && fs.has_acls (); }
|
bool has_acls () const {return !(path_flags & PATH_NOACL) && fs.has_acls (); }
|
||||||
bool hasgood_inode () const {return !(path_flags & PATH_IHASH); }
|
bool hasgood_inode () const {return !(path_flags & PATH_IHASH); }
|
||||||
bool isgood_inode (__ino64_t ino) const;
|
bool isgood_inode (__ino64_t ino) const;
|
||||||
bool kept_handle () const {return !!(path_flags & PATH_KEPT_HANDLE);}
|
|
||||||
int has_symlinks () const {return path_flags & PATH_HAS_SYMLINKS;}
|
int has_symlinks () const {return path_flags & PATH_HAS_SYMLINKS;}
|
||||||
int has_dos_filenames_only () const {return path_flags & PATH_DOS;}
|
int has_dos_filenames_only () const {return path_flags & PATH_DOS;}
|
||||||
int has_buggy_open () const {return fs.has_buggy_open ();}
|
int has_buggy_open () const {return fs.has_buggy_open ();}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user