summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-07-12 06:45:29 +0000
committerderaadt <deraadt@openbsd.org>1996-07-12 06:45:29 +0000
commitc5ee85c14a45e6f4cc30cd626ad97a87366e4a50 (patch)
tree651e7a8dda6eadeed44bca0e47c1c168de1544e3
parentslight clarification (diff)
downloadwireguard-openbsd-c5ee85c14a45e6f4cc30cd626ad97a87366e4a50.tar.xz
wireguard-openbsd-c5ee85c14a45e6f4cc30cd626ad97a87366e4a50.zip
do not ask for password if none set; from freebsd
-rw-r--r--sbin/init/init.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c
index 3b8ae81e356..3fe30e77243 100644
--- a/sbin/init/init.c
+++ b/sbin/init/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.4 1996/07/12 01:03:44 weingart Exp $ */
+/* $OpenBSD: init.c,v 1.5 1996/07/12 06:45:29 deraadt Exp $ */
/* $NetBSD: init.c,v 1.22 1996/05/15 23:29:33 jtc Exp $ */
/*-
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 7/15/93";
#else
-static char rcsid[] = "$OpenBSD: init.c,v 1.4 1996/07/12 01:03:44 weingart Exp $";
+static char rcsid[] = "$OpenBSD: init.c,v 1.5 1996/07/12 06:45:29 deraadt Exp $";
#endif
#endif /* not lint */
@@ -590,7 +590,8 @@ single_user()
*/
typ = getttynam("console");
pp = getpwnam("root");
- if (typ && (typ->ty_status & TTY_SECURE) == 0 && pp) {
+ if (typ && (typ->ty_status & TTY_SECURE) == 0 && pp &&
+ *pp->pw_passwd) {
write(2, banner, sizeof banner - 1);
for (;;) {
clear = getpass("Password:");