[PC-BSD Commits] r18931 - pcbsd-projects/PCDM

svn at pcbsd.org svn at pcbsd.org
Fri Sep 7 07:29:12 PDT 2012


Author: kenmoore
Date: 2012-09-07 14:29:12 +0000 (Fri, 07 Sep 2012)
New Revision: 18931

Modified:
   pcbsd-projects/PCDM/pcdm-backend.cpp
Log:
Fix the default directory for a newly logged-in user



Modified: pcbsd-projects/PCDM/pcdm-backend.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-backend.cpp	2012-09-07 13:24:15 UTC (rev 18930)
+++ pcbsd-projects/PCDM/pcdm-backend.cpp	2012-09-07 14:29:12 UTC (rev 18931)
@@ -108,12 +108,12 @@
   // USER, HOME, and SHELL are set by the "su" login
   environ.insert("LOGNAME",username); //Login name
   environ.insert("USERNAME",username); // Username
-  environ.insert("PWD",homeDir); //set the current directory to the user's home directory
   environ.insert("PATH",environ.value("PATH")+":"+homeDir+"/bin"); // Append the user's home dir to the path
   environ.insert("LANG",langCode+"."+environ.value("MM_CHARSET")); //Set the proper localized language
   environ.insert("MAIL","/var/mail/"+username); //Set the mail variable
   environ.insert("GROUP",username); //Set the proper group id
   p->setProcessEnvironment(environ);
+  p->setWorkingDirectory(homeDir); //set the current directory to the user's home directory
   // Startup the process
   p->start(cmd);
   // Wait for the process to start before continuing



More information about the Commits mailing list