projects / phoronix-test-suite.git / commitdiff
Build Results
 
Summary

Description: Unnamed repository; edit this file to name it for gitweb.
Last Change: Wed 2/3/10 13:04

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Wed 2/3/10 13:04
Michael Larabel  
phoromatic: Add... 
Wed 2/3/10 12:38
Michael Larabel  
phoromatic: Add... 
Wed 2/3/10 12:27
Michael Larabel  
phoromatic: Add... 
Wed 2/3/10 9:26
Michael Larabel  
pts: Drop MD5 hashes in... 
Tue 2/2/10 23:43
Michael Larabel  
phoromatic: Add... 
Tue 2/2/10 23:35
Michael Larabel  
pts-core: Phoromatic... 
 
> --git a/pts-core/functions/pts-functions_config.php b/pts-core/functions/pts-functions_config.php
index 3fd8097
..1bca016 100644
--- a/pts-core/functions/pts-functions_config.php
+++ b/pts-core/functions/pts-functions_config.php
@@ -56,13 +56,14 @@ function pts_find_home($path)
 {
     if(
strpos($path'~') !== FALSE)
     {
-        
$whoami trim(shell_exec("whoami"));
+    
/*    $whoami = trim(shell_exec("whoami"));

         if($whoami == "root")
             $home_path = "/root";
         else
-            $home_path = "/home/$whoami";
+            $home_path = "/home/$whoami"; */

+        $home_path pts_posix_userhome();
         
$path str_replace('~'$home_path$path);
     }
     return 
$path;
@@ -
72,+73,@@ function pts_current_user()
     
$pts_user pts_read_user_config("PhoronixTestSuite/GlobalDatabase/UserName""Default User");

     if(
$pts_user == "Default User")
-        
$pts_user trim(shell_exec("whoami"));
+        
$pts_user pts_posix_username();

     return 
$pts_user;
 }
diff --git a/pts-core/functions/pts-functions_linux.php b/pts-core/functions/pts-functions_linux.php
index fc6a7f9
..676b1e5 100644
--- a/pts-core/functions/pts-functions_linux.php
+++ b/pts-core/functions/pts-functions_linux.php
@@ -5,+5,16 @@
 
// SYSTEM RELATED
 //

+function pts_posix_username()
+{
+    
$userinfo posix_getpwuid(posix_getuid());
+    return 
$userinfo["name"];
+}
+function 
pts_posix_userhome()
+{
+    
$userinfo posix_getpwuid(posix_getuid());
+    return 
$userinfo["dir"] . '/';
+}
 function 
cpu_core_count()
 {
     if(
is_file("/proc/cpuinfo"))
<
 
Phoronix.com
Linux Driver Forums
Copyright © 2010 by Phoronix Media