diff options
author | Ricardo Mestre <mestre@cvs.openbsd.org> | 2016-04-26 20:30:01 +0000 |
---|---|---|
committer | Ricardo Mestre <mestre@cvs.openbsd.org> | 2016-04-26 20:30:01 +0000 |
commit | 8c25f89459fdc9d4e06df0850cbbf6ce7b7e314b (patch) | |
tree | 41ad80c2bdd1af3016f64a542cf4dbfcb96b3174 /libexec/login_reject | |
parent | 20478f6aacdfac9f76ed16998b517e8f9be2fec9 (diff) |
Add missing "tty" promise to the pledge(2) call
This is needed since getpass(3) calls readpassphrase(3) which in turn tries
to open(2) a tty in O_RDWR mode
Problem reported by Kevin Chadwick <m8il1ists ! gmail.com>
Cluebat stick provided by deraadt@, OK millert@
Diffstat (limited to 'libexec/login_reject')
-rw-r--r-- | libexec/login_reject/login_reject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/login_reject/login_reject.c b/libexec/login_reject/login_reject.c index f28b145e14d..8af486e107a 100644 --- a/libexec/login_reject/login_reject.c +++ b/libexec/login_reject/login_reject.c @@ -1,4 +1,4 @@ -/* $OpenBSD: login_reject.c,v 1.13 2015/11/19 18:37:01 millert Exp $ */ +/* $OpenBSD: login_reject.c,v 1.14 2016/04/26 20:30:00 mestre Exp $ */ /*- * Copyright (c) 1995 Berkeley Software Design, Inc. All rights reserved. @@ -65,7 +65,7 @@ main(int argc, char *argv[]) (void)setpriority(PRIO_PROCESS, 0, 0); - if (pledge("stdio rpath", NULL) == -1) { + if (pledge("stdio rpath tty", NULL) == -1) { syslog(LOG_AUTH|LOG_ERR, "pledge: %m"); exit(1); } |