Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/shutdown Remove _PATH_NOLOGIN before reboot, as well as...



details:   https://anonhg.NetBSD.org/src/rev/7eebdcb2dbac
branches:  trunk
changeset: 755550:7eebdcb2dbac
user:      riz <riz%NetBSD.org@localhost>
date:      Wed Jun 09 04:51:53 2010 +0000

description:
Remove _PATH_NOLOGIN before reboot, as well as before exit(), to prevent
a root file system which has been marked read-only in fstab from continuing
to prevent logins after reboot.  From Ian D. Leroux in PR#43390.

diffstat:

 sbin/shutdown/shutdown.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r b5131e7eb842 -r 7eebdcb2dbac sbin/shutdown/shutdown.c
--- a/sbin/shutdown/shutdown.c  Wed Jun 09 04:48:02 2010 +0000
+++ b/sbin/shutdown/shutdown.c  Wed Jun 09 04:51:53 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: shutdown.c,v 1.51 2008/07/20 01:20:23 lukem Exp $      */
+/*     $NetBSD: shutdown.c,v 1.52 2010/06/09 04:51:53 riz Exp $        */
 
 /*
  * Copyright (c) 1988, 1990, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)shutdown.c 8.4 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: shutdown.c,v 1.51 2008/07/20 01:20:23 lukem Exp $");
+__RCSID("$NetBSD: shutdown.c,v 1.52 2010/06/09 04:51:53 riz Exp $");
 #endif
 #endif /* not lint */
 
@@ -395,6 +395,7 @@
                        *arg++ = bootstr;
                *arg++ = 0;
 #ifndef DEBUG
+               (void)unlink(_PATH_NOLOGIN);
                (void)execve(path, __UNCONST(args), NULL);
                serrno = errno;
                syslog(LOG_ERR, "Can't exec `%s' (%m)", path);



Home | Main Index | Thread Index | Old Index