X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnu%2Fopen.c;h=98c20fcb445ff6af0422c8f334665b78dad5c187;hb=6fed155b3e90a247158b29d1ffe75ddba9ab4208;hp=7c2bbb81d975266bc34162f1a494a35f55524b67;hpb=3322ff6164a1e9dd3d1622c64a9b9b7c5f303ef6;p=debian%2Ftar diff --git a/gnu/open.c b/gnu/open.c index 7c2bbb81..98c20fcb 100644 --- a/gnu/open.c +++ b/gnu/open.c @@ -1,7 +1,7 @@ /* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Open a descriptor to a file. - Copyright (C) 2007-2010 Free Software Foundation, Inc. + Copyright (C) 2007-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -113,7 +113,8 @@ open (const char *filename, int flags, ...) override fstat() in fchdir.c to hide the fact that we have a dummy. */ if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES - && (flags & O_ACCMODE) == O_RDONLY) + && ((flags & O_ACCMODE) == O_RDONLY + || (O_SEARCH != O_RDONLY && (flags & O_ACCMODE) == O_SEARCH))) { struct stat statbuf; if (stat (filename, &statbuf) == 0 && S_ISDIR (statbuf.st_mode))