Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/log/PhabricatorSSHLog.php
Show All 18 Lines | if (!self::$log) { | ||||
'D' => date('r'), | 'D' => date('r'), | ||||
'h' => php_uname('n'), | 'h' => php_uname('n'), | ||||
'p' => getmypid(), | 'p' => getmypid(), | ||||
'e' => time(), | 'e' => time(), | ||||
'I' => PhabricatorEnv::getEnvConfig('cluster.instance'), | 'I' => PhabricatorEnv::getEnvConfig('cluster.instance'), | ||||
); | ); | ||||
$sudo_user = PhabricatorEnv::getEnvConfig('phd.user'); | $sudo_user = PhabricatorEnv::getEnvConfig('phd.user'); | ||||
if (strlen($sudo_user)) { | if (phutil_nonempty_string($sudo_user)) { | ||||
$data['S'] = $sudo_user; | $data['S'] = $sudo_user; | ||||
} | } | ||||
if (function_exists('posix_geteuid')) { | if (function_exists('posix_geteuid')) { | ||||
$system_uid = posix_geteuid(); | $system_uid = posix_geteuid(); | ||||
$system_info = posix_getpwuid($system_uid); | $system_info = posix_getpwuid($system_uid); | ||||
$data['s'] = idx($system_info, 'name'); | $data['s'] = idx($system_info, 'name'); | ||||
} | } | ||||
Show All 18 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0