[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
">/inaccessible" gives incorrect error
From: |
Tim Waugh |
Subject: |
">/inaccessible" gives incorrect error |
Date: |
Wed, 20 Apr 2005 09:23:26 +0100 |
User-agent: |
Mutt/1.4.2.1i |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: i386-redhat-linux-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_GNU_SOURCE
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wall -g -pipe
-Wp,-D_FORTIFY_SOURCE=2 -m32 -march=i386 -mtune=pentium4
uname output: Linux gene.surrey.redhat.com 2.6.11-1.1176_FC4 #1 Mon Mar 7
02:10:55 EST 2005 i686 i686 i386 GNU/Linux
Machine Type: i386-redhat-linux-gnu
Bash Version: 3.0
Patch Level: 16
Release Status: release
Description:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=155373
Running ">/inaccessible" as a normal user results in the error
"No such file or directory" rather than the expected
"Permission denied". This is due to AFS support.
Repeat-By:
>/inaccessible
Fix:
--- bash-3.0/redir.c.afs 2005-04-20 09:16:15.000000000 +0100
+++ bash-3.0/redir.c 2005-04-20 09:16:58.000000000 +0100
@@ -596,7 +596,9 @@
fd = open (filename, flags, mode);
#if defined (AFS)
if ((fd < 0) && (errno == EACCES))
- fd = open (filename, flags & ~O_CREAT, mode);
+ if ((fd = open (filename, flags & ~O_CREAT, mode)) < 0)
+ /* Restore previous errno. */
+ errno = EACCES;
#endif /* AFS */
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ">/inaccessible" gives incorrect error,
Tim Waugh <=