[Pkg-sysvinit-commits] r252 - sysvinit/trunk/src

Thomas Hood jdthood-guest at costa.debian.org
Thu Nov 24 16:08:17 UTC 2005


Author: jdthood-guest
Date: 2005-11-24 16:08:17 +0000 (Thu, 24 Nov 2005)
New Revision: 252

Modified:
   sysvinit/trunk/src/sulogin.c
Log:
Restore src/sulogin.c to original

Modified: sysvinit/trunk/src/sulogin.c
===================================================================
--- sysvinit/trunk/src/sulogin.c	2005-11-24 16:06:22 UTC (rev 251)
+++ sysvinit/trunk/src/sulogin.c	2005-11-24 16:08:17 UTC (rev 252)
@@ -28,10 +28,6 @@
 #  include <crypt.h>
 #endif
 
-#ifdef WITH_SELINUX
-#include <selinux/selinux.h>
-#include <selinux/get_context_list.h>
-#endif
 #define CHECK_DES	1
 #define CHECK_MD5	1
 
@@ -238,11 +234,7 @@
 		fprintf(stderr, "%s: no entry for root\n", F_SHADOW);
 		strcpy(pwd.pw_passwd, "");
 	}
-
-	/* disabled passwords are valid too */
-	if (!(strcmp(pwd.pw_passwd, "*") == 0) ||
-	    !(strcmp(pwd.pw_passwd, "!") == 0) ||
-	    !valid(pwd.pw_passwd)) {
+	if (!valid(pwd.pw_passwd)) {
 		fprintf(stderr, "%s: root password garbled\n", F_SHADOW);
 		strcpy(pwd.pw_passwd, ""); }
 	return &pwd;
@@ -343,16 +335,6 @@
 	signal(SIGINT, SIG_DFL);
 	signal(SIGTSTP, SIG_DFL);
 	signal(SIGQUIT, SIG_DFL);
-#ifdef WITH_SELINUX
-	if (is_selinux_enabled > 0) {
-	  security_context_t* contextlist=NULL;
-	  if (get_ordered_context_list("root", 0, &contextlist) > 0) {
-	    if (setexeccon(contextlist[0]) != 0) 
-	      fprintf(stderr, "setexeccon faile\n");
-	    freeconary(contextlist);
-	  }
-	}
-#endif
 	execl(sushell, shell, NULL);
 	perror(sushell);
 
@@ -454,14 +436,6 @@
 		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