]> git.armaanb.net Git - opendoas.git/blobdiff - doas.c
correct some unveil(2) violations due to "login.conf.db" access (the .db version...
[opendoas.git] / doas.c
diff --git a/doas.c b/doas.c
index bc03abda2a33bc50b2d6fc663d4552bc962ad84a..71f955a76afc65b7a328ff9b2963f6b8537eaf2f 100644 (file)
--- a/doas.c
+++ b/doas.c
@@ -458,7 +458,8 @@ main(int argc, char **argv)
                formerpath = "";
 
 # ifdef __OpenBSD__
-       if (unveil(_PATH_LOGIN_CONF, "r") == -1)
+       if (unveil(_PATH_LOGIN_CONF, "r") == -1 ||
+           unveil(_PATH_LOGIN_CONF ".db", "r") == -1)
                err(1, "unveil");
 # endif
        if (rule->cmd) {