[Pkg-sysvinit-commits] r121 - in sysvinit/trunk/debian: . patches
Petter Reinholdtsen
pere at costa.debian.org
Mon Nov 14 09:50:20 UTC 2005
Author: pere
Date: 2005-11-14 09:50:19 +0000 (Mon, 14 Nov 2005)
New Revision: 121
Added:
sysvinit/trunk/debian/patches/91_sulogin_lockedpw.dpatch
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/patches/00list
Log:
* Added 91_sulogin_lockedpw.dpatch to make sure file systems can be
fixed on machines with locked root accounts too, by pressenting a
shell in these cases. Patch from Ubuntu and Thom May.
(Closes: #326678)
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2005-11-14 08:43:31 UTC (rev 120)
+++ sysvinit/trunk/debian/changelog 2005-11-14 09:50:19 UTC (rev 121)
@@ -6,6 +6,10 @@
init.d scripts with 'start' argument. Let initscripts conflict
with sysv-rc (<< 2.86.ds1-1.2) as well, to document that it need a
newer sysv-rc to work properly. (Closes: #338966)
+ * Added 91_sulogin_lockedpw.dpatch to make sure file systems can be
+ fixed on machines with locked root accounts too, by pressenting a
+ shell in these cases. Patch from Ubuntu and Thom May.
+ (Closes: #326678)
-- Petter Reinholdtsen <pere at debian.org> Mon, 14 Nov 2005 09:14:51 +0100
Modified: sysvinit/trunk/debian/patches/00list
===================================================================
--- sysvinit/trunk/debian/patches/00list 2005-11-14 08:43:31 UTC (rev 120)
+++ sysvinit/trunk/debian/patches/00list 2005-11-14 09:50:19 UTC (rev 121)
@@ -19,3 +19,4 @@
80_killall_sched
81_killall_avoid_init
90_shutdown_H
+91_sulogin_lockedpw
Added: sysvinit/trunk/debian/patches/91_sulogin_lockedpw.dpatch
===================================================================
--- sysvinit/trunk/debian/patches/91_sulogin_lockedpw.dpatch 2005-11-14 08:43:31 UTC (rev 120)
+++ sysvinit/trunk/debian/patches/91_sulogin_lockedpw.dpatch 2005-11-14 09:50:19 UTC (rev 121)
@@ -0,0 +1,41 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 91_sulogin_lockedpw.dpatch by Thom May
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Make sure file systems can be fixed on machines with locked
+## DP: root accounts too, by pressenting a shell in these cases.
+## DP: Patch from Ubuntu and Thom May. Fixes debian bug #326678.
+
+ at DPATCH@
+Index: sysvinit/src/sulogin.c
+===================================================================
+--- sysvinit/src/sulogin.c (revisjon 113)
++++ sysvinit/src/sulogin.c (arbeidskopi)
+@@ -234,7 +234,11 @@
+ fprintf(stderr, "%s: no entry for root\n", F_SHADOW);
+ strcpy(pwd.pw_passwd, "");
+ }
+- if (!valid(pwd.pw_passwd)) {
++
++ /* disabled passwords are valid too */
++ if (!(strcmp(pwd.pw_passwd, "*") == 0) ||
++ !(strcmp(pwd.pw_passwd, "!") == 0) ||
++ !valid(pwd.pw_passwd)) {
+ fprintf(stderr, "%s: root password garbled\n", F_SHADOW);
+ strcpy(pwd.pw_passwd, ""); }
+ return &pwd;
+@@ -436,6 +440,14 @@
+ fprintf(stderr, "sulogin: cannot open password database!\n");
+ sleep(2);
+ }
++ /*
++ * If the root password is locked, fire up a shell
++ */
++ if ((strcmp(pwd->pw_passwd, "*") == 0) ||
++ (strcmp(pwd->pw_passwd, "!") == 0)) {
++ fprintf(stderr, "sulogin: root accound is locked, starting shell\n");
++ sushell(pwd);
++ }
+
+ /*
+ * Ask for the password.
More information about the Pkg-sysvinit-commits
mailing list