unveil _PATH_LOGIN_CONF (/etc/login.conf) which is used by
login_getclass(3) and family before doing password encode. This
is the only filename used by the program during runtime, everything
else happens on stdin/stdout.
-/* $OpenBSD: encrypt.c,v 1.48 2018/08/03 04:19:34 deraadt Exp $ */
+/* $OpenBSD: encrypt.c,v 1.49 2018/08/03 04:47:56 deraadt Exp $ */
/*
* Copyright (c) 1996, Jason Downs. All rights reserved.
char *extra = NULL; /* Store login class or number of rounds */
const char *errstr;
+ if (unveil(_PATH_LOGIN_CONF, "r") == -1)
+ err(1, "unveil");
if (pledge("stdio rpath tty", NULL) == -1)
err(1, "pledge");