vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 440e0f7afa992e10694cb0b4ab8f1ab55a1f72b2
parent 8688720c2d4d336841080963667239349d41ccd4
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Wed, 16 May 2018 20:52:11 +0200

Merge branch 'check-shadow-permissions' of https://github.com/paride/vis-test

Diffstat:
Mcore/text-test.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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"); }