summaryrefslogtreecommitdiffstats
path: root/libexec/login_reject
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2015-11-19 18:37:01 +0000
committermillert <millert@openbsd.org>2015-11-19 18:37:01 +0000
commitbd917b9e9c06a75ff9b05d567ca976f75ec5839d (patch)
tree3a512394f093ef98d1a721daaec0313b526b51c1 /libexec/login_reject
parentWhen an existing partition is modified in LBA mode, ensure that the partition (diff)
downloadwireguard-openbsd-bd917b9e9c06a75ff9b05d567ca976f75ec5839d.tar.xz
wireguard-openbsd-bd917b9e9c06a75ff9b05d567ca976f75ec5839d.zip
Call syslog() if login_* pledge fails; OK deraadt@
Diffstat (limited to 'libexec/login_reject')
-rw-r--r--libexec/login_reject/login_reject.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libexec/login_reject/login_reject.c b/libexec/login_reject/login_reject.c
index cea7460b17b..f28b145e14d 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.12 2015/10/22 12:55:23 tedu Exp $ */
+/* $OpenBSD: login_reject.c,v 1.13 2015/11/19 18:37:01 millert Exp $ */
/*-
* Copyright (c) 1995 Berkeley Software Design, Inc. All rights reserved.
@@ -65,8 +65,10 @@ main(int argc, char *argv[])
(void)setpriority(PRIO_PROCESS, 0, 0);
- if (pledge("stdio rpath", NULL) == -1)
- err(1, "pledge");
+ if (pledge("stdio rpath", NULL) == -1) {
+ syslog(LOG_AUTH|LOG_ERR, "pledge: %m");
+ exit(1);
+ }
openlog("login", LOG_ODELAY, LOG_AUTH);