[PC-BSD Commits] r1978 - pcbsd/trunk/PCInstall

svn at pcbsd.org svn at pcbsd.org
Sat May 24 15:56:51 PDT 2008


Author: melkor
Date: 2008-05-24 15:56:51 -0700 (Sat, 24 May 2008)
New Revision: 1978

Modified:
   pcbsd/trunk/PCInstall/pcinstall.ui.h
Log:

Fix masking of symbol at passwords


Modified: pcbsd/trunk/PCInstall/pcinstall.ui.h
===================================================================
--- pcbsd/trunk/PCInstall/pcinstall.ui.h	2008-05-24 22:51:23 UTC (rev 1977)
+++ pcbsd/trunk/PCInstall/pcinstall.ui.h	2008-05-24 22:56:51 UTC (rev 1978)
@@ -1428,7 +1428,7 @@
    QFile file( "/mnt/tmp/setPass" );
     if ( file.open( IO_WriteOnly ) ) {
 	QTextStream stream( &file );
-	stream << "echo '" << linePassword->text() << "' | pw usermod root -h 0\n" ;
+	stream << "echo '" << linePassword->text().replace("\'","\\\'") << "' | pw usermod root -h 0\n" ;
 	while ( i < 100)
 	{
 	
@@ -1437,7 +1437,7 @@
 		break;   
 	    }
 		
-	    stream << "echo '" << AddPassword[i] << "' | pw useradd -n " << AddUserName[i] << " -G wheel,operator -h 0 -s " + AddShell[i] + " -d /home/" << AddUserName[i] << " -m -c \"" << AddRealName[i] << "\"\n";
+	    stream << "echo '" << AddPassword[i].replace("\'","\\\'") << "' | pw useradd -n " << AddUserName[i] << " -G wheel,operator -h 0 -s " + AddShell[i] + " -d /home/" << AddUserName[i] << " -m -c \"" << AddRealName[i] << "\"\n";
 	
 	    stream << "chown -R " << AddUserName[i] << " /home/" << AddUserName[i] << "\n";
 	    stream << "chgrp -R " << AddUserName[i] << " /home/" << AddUserName[i] << "\n";



More information about the Commits mailing list