diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-07-12 06:45:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-07-12 06:45:30 +0000 |
commit | 8064867ef5815b91864a3111cc3bcfc2a1222fc4 (patch) | |
tree | c6c04198379a4d918b2e9f31520cc894818e4e4c /sbin/init | |
parent | 3a7445413fce1a8fe9105fb9be3682a48ff0b70f (diff) |
do not ask for password if none set; from freebsd
Diffstat (limited to 'sbin/init')
-rw-r--r-- | sbin/init/init.c | 7 |
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:"); |