summaryrefslogtreecommitdiff
path: root/usr.bin/passwd
diff options
context:
space:
mode:
authoranton <anton@cvs.openbsd.org>2019-10-24 12:56:41 +0000
committeranton <anton@cvs.openbsd.org>2019-10-24 12:56:41 +0000
commit5386c237076b72a275c98a4a95a598ce08bd2b88 (patch)
tree5dd2dc4558818c9d23b28f1a18848178415b12e7 /usr.bin/passwd
parent8b39c721fbd0496404aab5baa3d340911e1ccee4 (diff)
add missing unveil of /etc/shells; ok benno@ deraadt@ mestre@ tb@
Diffstat (limited to 'usr.bin/passwd')
-rw-r--r--usr.bin/passwd/local_passwd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/passwd/local_passwd.c b/usr.bin/passwd/local_passwd.c
index 0f843b3f973..955eb9e3820 100644
--- a/usr.bin/passwd/local_passwd.c
+++ b/usr.bin/passwd/local_passwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: local_passwd.c,v 1.57 2019/09/14 17:47:01 semarie Exp $ */
+/* $OpenBSD: local_passwd.c,v 1.58 2019/10/24 12:56:40 anton Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -82,6 +82,8 @@ local_passwd(char *uname, int authenticated)
err(1, "unveil");
if (unveil(_PATH_BSHELL, "x") == -1)
err(1, "unveil");
+ if (unveil(_PATH_SHELLS, "r") == -1)
+ err(1, "unveil");
if (unveil(_PATH_PWD_MKDB, "x") == -1)
err(1, "unveil");
if (pledge("stdio rpath wpath cpath getpw tty id proc exec", NULL) == -1)