=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/doas/doas.c,v retrieving revision 1.86 retrieving revision 1.87 diff -c -r1.86 -r1.87 *** src/usr.bin/doas/doas.c 2021/01/16 09:18:41 1.86 --- src/usr.bin/doas/doas.c 2021/01/20 07:30:51 1.87 *************** *** 1,4 **** ! /* $OpenBSD: doas.c,v 1.86 2021/01/16 09:18:41 martijn Exp $ */ /* * Copyright (c) 2015 Ted Unangst * --- 1,4 ---- ! /* $OpenBSD: doas.c,v 1.87 2021/01/20 07:30:51 kn Exp $ */ /* * Copyright (c) 2015 Ted Unangst * *************** *** 206,216 **** auth_session_t *as; int fd = -1; ! if (persist) fd = open("/dev/tty", O_RDWR); ! if (fd != -1) { ! if (ioctl(fd, TIOCCHKVERAUTH) == 0) ! goto good; } if (!(as = auth_userchallenge(myname, login_style, "auth-doas", --- 206,220 ---- auth_session_t *as; int fd = -1; ! if (persist) { fd = open("/dev/tty", O_RDWR); ! if (fd != -1) { ! if (ioctl(fd, TIOCCHKVERAUTH) == 0) ! goto good; ! } ! } else { ! if (pledge("stdio rpath getpw exec id unveil", NULL) == -1) ! err(1, "pledge"); } if (!(as = auth_userchallenge(myname, login_style, "auth-doas",