blob: f07371c39eb4f61bfbd7928b36bb805f75b11e5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
Ripped from Fedora
- Fixed AFS support for output redirection, so that the correct errors
are reported for other filesystems (bug #155373).
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=155373
--- 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 */
}
|