[PC-BSD Commits] r21042 - pcbsd/current/src-qt4/pc-usermanager

svn at pcbsd.org svn at pcbsd.org
Fri Jan 18 08:43:26 PST 2013


Author: kris
Date: 2013-01-18 16:43:26 +0000 (Fri, 18 Jan 2013)
New Revision: 21042

Modified:
   pcbsd/current/src-qt4/pc-usermanager/usermanagerback.cpp
Log:

Fix user-manager to also set correct home permissions when running on a chroot



Modified: pcbsd/current/src-qt4/pc-usermanager/usermanagerback.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-usermanager/usermanagerback.cpp	2013-01-18 16:29:48 UTC (rev 21041)
+++ pcbsd/current/src-qt4/pc-usermanager/usermanagerback.cpp	2013-01-18 16:43:26 UTC (rev 21042)
@@ -433,7 +433,10 @@
 		}
 
 		// Set permissions
-		system("chown -R " + userIt->getUsername().toLatin1() +":" + userIt->getUsername().toLatin1() + " "  + userIt->getHome().toLatin1() );
+		if ( chroot.isEmpty() )
+		   system("chown -R " + userIt->getUsername().toLatin1() +":" + userIt->getUsername().toLatin1() + " "  + userIt->getHome().toLatin1() );
+		else
+		   system("chroot " + chroot.toLatin1() + " chown -R " + userIt->getUsername().toLatin1() +":" + userIt->getUsername().toLatin1() + " "  + userIt->getHome().toLatin1() );
 
                 break;
             case 3:



More information about the Commits mailing list