14913 orchestrator and install-finish shouldn't be logging password hashes slim_1003
authorDavid Miner <dminer@opensolaris.org>
Fri, 26 Feb 2010 20:58:14 -0500
branchslim_1003
changeset 756 f3f57a345986
parent 753 e04cf9540cab
child 761 1c59d41ea622
14913 orchestrator and install-finish shouldn't be logging password hashes
usr/src/cmd/slim-install/finish/install-finish
usr/src/lib/liborchestrator/perform_slim_install.c
--- a/usr/src/cmd/slim-install/finish/install-finish	Tue Feb 23 11:59:38 2010 -0700
+++ b/usr/src/cmd/slim-install/finish/install-finish	Fri Feb 26 20:58:14 2010 -0500
@@ -45,6 +45,7 @@
 from osol_install.ict import ICT, \
     ICT_INVALID_PARAMETER, \
     info_msg, \
+    _dbg_msg, \
     prerror
 
 from osol_install.liblogsvc import LS_DBGLVL_ERR, \
@@ -113,15 +114,6 @@
     if o in '-U':
         NU_UID = a
 
-info_msg('BASEDIR: %s' % BASEDIR)
-info_msg('USER_SPEC_DBGLVL: %s' % USER_SPEC_DBGLVL)
-info_msg('ROOT_PW: %s' % ROOT_PW)
-info_msg('NU_GOS: %s' % NU_GOS)
-info_msg('NU_LOGIN: %s' % NU_LOGIN)
-info_msg('NU_PW: %s' % NU_PW)
-info_msg('NU_GID: %s' % NU_GID)
-info_msg('NU_UID: %s' % NU_UID)
-
 #perform ICT initialization, specifying root target path, debugging level
 
 if not BASEDIR:
@@ -144,6 +136,16 @@
 else:
     ICTO = ICT(BASEDIR) #take default for debugging level
 
+# Log arguments.  Password hashes only logged in debug mode.
+info_msg('BASEDIR: %s' % BASEDIR)
+info_msg('USER_SPEC_DBGLVL: %s' % USER_SPEC_DBGLVL)
+_dbg_msg('ROOT_PW: %s' % ROOT_PW)
+info_msg('NU_GOS: %s' % NU_GOS)
+info_msg('NU_LOGIN: %s' % NU_LOGIN)
+_dbg_msg('NU_PW: %s' % NU_PW)
+info_msg('NU_GID: %s' % NU_GID)
+info_msg('NU_UID: %s' % NU_UID)
+
 #perform nearly all Slim Install Completion Tasks
 
 SA = [] #init array of return statuses
--- a/usr/src/lib/liborchestrator/perform_slim_install.c	Tue Feb 23 11:59:38 2010 -0700
+++ b/usr/src/lib/liborchestrator/perform_slim_install.c	Fri Feb 26 20:58:14 2010 -0500
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -2396,7 +2396,7 @@
 	free(fixed_uname);
 	free(fixed_upasswd);
 
-	om_log_print("%s\n", cmd);
+	om_debug_print(OM_DBGLVL_INFO, "%s\n", cmd);
 	if (td_safe_system(cmd, B_TRUE) != 0) {
 		om_log_print("The install-finish script reported failures.\n");
 		return (OM_FAILURE);