aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2018-05-16 20:52:11 +0200
committerMarc André Tanner <mat@brain-dump.org>2018-05-16 20:52:11 +0200
commitacf228b2598159f4ba6e2e14af81af4d7a8636ad (patch)
tree1133e1e37a76d97404d18c0b52ec249199a124cb
parent2e76ae1b124d3c0a5caa9342a3e82056fd44bfe6 (diff)
parent5c81f5d68f03e07050b3d814f66a0008be0ef5f1 (diff)
downloadvis-acf228b2598159f4ba6e2e14af81af4d7a8636ad.tar.gz
vis-acf228b2598159f4ba6e2e14af81af4d7a8636ad.tar.xz
Merge branch 'check-shadow-permissions' of https://github.com/paride/vis-test
-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");
}