aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/text-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/text-test.c b/core/text-test.c
index 1d8eefe..d6abdeb 100644
--- a/core/text-test.c
+++ b/core/text-test.c
@@ -97,7 +97,7 @@ int main(int argc, char *argv[]) {
txt = text_load("/");
ok(txt == NULL && errno == EISDIR, "Opening directory");
- if (access("/etc/shadow", F_OK) == 0) {
+ if (access("/etc/shadow", F_OK) == 0 && access("/etc/shadow", R_OK) != 0) {
txt = text_load("/etc/shadow");
ok(txt == NULL && errno == EACCES, "Opening file without sufficient permissions");
}