Module Name: src
Committed By: riz
Date: Wed Jun 9 04:51:53 UTC 2010
Modified Files:
src/sbin/shutdown: shutdown.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sbin/shutdown/shutdown.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/shutdown/shutdown.c
diff -u src/sbin/shutdown/shutdown.c:1.51 src/sbin/shutdown/shutdown.c:1.52
--- src/sbin/shutdown/shutdown.c:1.51 Sun Jul 20 01:20:23 2008
+++ src/sbin/shutdown/shutdown.c Wed Jun 9 04:51:53 2010
@@ -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);