From 8c25f89459fdc9d4e06df0850cbbf6ce7b7e314b Mon Sep 17 00:00:00 2001 From: Ricardo Mestre Date: Tue, 26 Apr 2016 20:30:01 +0000 Subject: 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 Cluebat stick provided by deraadt@, OK millert@ --- libexec/login_reject/login_reject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libexec/login_reject') 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); } -- cgit v1.2.3