svn commit: branches/busybox_1_6_stable: coreutils init loginutils

vda at busybox.net vda at busybox.net
Sun Nov 25 23:17:52 PST 2007


Author: vda
Date: 2007-11-25 23:17:52 -0800 (Sun, 25 Nov 2007)
New Revision: 20538

Log:
apply accumulated post-1.6.1 patches, and bump version to 1.6.2



Modified:
   branches/busybox_1_6_stable/Makefile
   branches/busybox_1_6_stable/coreutils/date.c
   branches/busybox_1_6_stable/init/init.c
   branches/busybox_1_6_stable/loginutils/adduser.c


Changeset:
Modified: branches/busybox_1_6_stable/Makefile
===================================================================
--- branches/busybox_1_6_stable/Makefile	2007-11-26 07:13:50 UTC (rev 20537)
+++ branches/busybox_1_6_stable/Makefile	2007-11-26 07:17:52 UTC (rev 20538)
@@ -1,6 +1,6 @@
 VERSION = 1
 PATCHLEVEL = 6
-SUBLEVEL = 1
+SUBLEVEL = 2
 EXTRAVERSION =
 NAME = Unnamed
 

Modified: branches/busybox_1_6_stable/coreutils/date.c
===================================================================
--- branches/busybox_1_6_stable/coreutils/date.c	2007-11-26 07:13:50 UTC (rev 20537)
+++ branches/busybox_1_6_stable/coreutils/date.c	2007-11-26 07:17:52 UTC (rev 20538)
@@ -32,16 +32,10 @@
 #define DATE_OPT_TIMESPEC	0x20
 #define DATE_OPT_HINT		0x40
 
-static void xputenv(char *s)
-{
-	if (putenv(s) != 0)
-		bb_error_msg_and_die(bb_msg_memory_exhausted);
-}
-
 static void maybe_set_utc(int opt)
 {
 	if (opt & DATE_OPT_UTC)
-		xputenv((char*)"TZ=UTC0");
+		putenv((char*)"TZ=UTC0");
 }
 
 int date_main(int argc, char **argv);

Modified: branches/busybox_1_6_stable/init/init.c
===================================================================
--- branches/busybox_1_6_stable/init/init.c	2007-11-26 07:13:50 UTC (rev 20537)
+++ branches/busybox_1_6_stable/init/init.c	2007-11-26 07:17:52 UTC (rev 20538)
@@ -277,6 +277,9 @@
 			while (fd > 2) close(fd--);
 		}
 		messageD(L_LOG, "console='%s'", s);
+	} else {
+		/* Make sure fd 0,1,2 are not closed */
+		bb_sanitize_stdio();
 	}
 
 	s = getenv("TERM");

Modified: branches/busybox_1_6_stable/loginutils/adduser.c
===================================================================
--- branches/busybox_1_6_stable/loginutils/adduser.c	2007-11-26 07:13:50 UTC (rev 20537)
+++ branches/busybox_1_6_stable/loginutils/adduser.c	2007-11-26 07:17:52 UTC (rev 20538)
@@ -109,8 +109,9 @@
 	if (putpwent(p, file) == -1) {
 		bb_perror_nomsg_and_die();
 	}
-	if (ENABLE_FEATURE_CLEAN_UP)
-		fclose(file);
+	/* Do fclose even if !ENABLE_FEATURE_CLEAN_UP.
+	 * We will exec passwd, files must be flushed & closed before that! */
+	fclose(file);
 
 #if ENABLE_FEATURE_SHADOWPASSWDS
 	/* add to shadow if necessary */
@@ -123,8 +124,7 @@
 				0,                      /* sp->sp_min */
 				99999,                  /* sp->sp_max */
 				7);                     /* sp->sp_warn */
-		if (ENABLE_FEATURE_CLEAN_UP)
-			fclose(file);
+		fclose(file);
 	}
 #endif
 
@@ -134,7 +134,7 @@
 	if (addgroup) addgroup_wrapper(p);
 
 	/* Clear the umask for this process so it doesn't
-	 * * screw up the permissions on the mkdir and chown. */
+	 * screw up the permissions on the mkdir and chown. */
 	umask(0);
 	if (!(option_mask32 & OPT_DONT_MAKE_HOME)) {
 		/* Set the owner and group so it is owned by the new user,



More information about the busybox-cvs mailing list