summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trans/fakeroot.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 51536b34..93435f5d 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -336,23 +336,30 @@ netfs_attempt_lookup (struct iouser *user, struct node *dir,
flags = O_RDWR|O_EXEC;
file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0);
- if (file == MACH_PORT_NULL && (errno == EACCES
+ if (file == MACH_PORT_NULL && (errno == EACCES || errno == EOPNOTSUPP
|| errno == EROFS || errno == EISDIR))
{
flags = O_RDWR;
file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0);
}
- if (file == MACH_PORT_NULL && (errno == EACCES
+ if (file == MACH_PORT_NULL && (errno == EACCES || errno == EOPNOTSUPP
|| errno == EROFS || errno == EISDIR))
{
flags = O_READ|O_EXEC;
file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0);
}
- if (file == MACH_PORT_NULL && errno == EACCES)
+ if (file == MACH_PORT_NULL && (errno == EACCES || errno == EOPNOTSUPP
+ || errno == EISDIR))
{
flags = O_READ;
file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0);
}
+ if (file == MACH_PORT_NULL && (errno == EACCES || errno == EOPNOTSUPP
+ || errno == EISDIR))
+ {
+ flags = 0;
+ file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0);
+ }
*np = 0;
if (file == MACH_PORT_NULL)
err = errno;