summaryrefslogtreecommitdiff
path: root/sal/android
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-01-27 11:32:22 +0200
committerTor Lillqvist <tlillqvist@suse.com>2012-01-27 20:15:04 +0200
commit0a1fb4b618ad56fe11071a60105dbf70cc38892e (patch)
tree8a983205c6ad3bba46b502228424eb9aa9bcf29f /sal/android
parent9220f05f73d428a0d5415a45f786040c9ef9f74e (diff)
Tweak the st_mode returned by lo_apk_lstat() to match reality better
Diffstat (limited to 'sal/android')
-rw-r--r--sal/android/lo-bootstrap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index eee5f1f07cef..5813138f3c81 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -1081,7 +1081,7 @@ new_stat(const char *path,
struct tm tm;
memset(statp, 0, sizeof(*statp));
- statp->st_mode = mode | S_IRUSR | S_IRGRP | S_IROTH;
+ statp->st_mode = mode | S_IRUSR;
statp->st_nlink = 1;
statp->st_uid = getuid();
@@ -1133,7 +1133,7 @@ lo_apk_lstat(const char *path,
if (*pn == '/') {
pn++;
if (!pn[0])
- return new_stat(path, statp, NULL, S_IFDIR, 1);
+ return new_stat(path, statp, NULL, S_IFDIR | S_IXUSR, 1);
}
name_size = strlen(pn);
@@ -1149,7 +1149,7 @@ lo_apk_lstat(const char *path,
if (letoh16(entry->filename_size) == name_size)
return new_stat(path, statp, entry, S_IFREG, cdir_entries - count + 1);
else
- return new_stat(path, statp, entry, S_IFDIR, cdir_entries - count + 1);
+ return new_stat(path, statp, entry, S_IFDIR | S_IXUSR, cdir_entries - count + 1);
}
errno = ENOENT;