diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2018-09-06 14:04:06 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2018-09-06 14:15:37 +0200 |
commit | 2e5d8ecca467b965ed620331135a639a9c5f57a5 (patch) | |
tree | 045626d507dc744670725f8493befdb38673811d /settings/Controller | |
parent | 021dad53be0ca7ff0a330f4408f51894a9698ecd (diff) | |
download | nextcloud-server-2e5d8ecca467b965ed620331135a639a9c5f57a5.tar.gz nextcloud-server-2e5d8ecca467b965ed620331135a639a9c5f57a5.zip |
Remove posix_getpwuid and compare only userid
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'settings/Controller')
-rw-r--r-- | settings/Controller/CheckSetupController.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php index 9169808456f..c336880455c 100644 --- a/settings/Controller/CheckSetupController.php +++ b/settings/Controller/CheckSetupController.php @@ -543,7 +543,7 @@ Raw output * @return array */ protected function getAppDirsWithDifferentOwner(): array { - $currentUser = posix_getpwuid(posix_getuid()); + $currentUser = posix_getuid(); $appDirsWithDifferentOwner = [[]]; foreach (OC::$APPSROOTS as $appRoot) { @@ -561,11 +561,11 @@ Raw output /** * Tests if the directories for one apps directory are writable by the current user. * - * @param array $currentUser The current user + * @param int $currentUser The current user * @param array $appRoot The app root config * @return string[] The none writable directory paths inside the app root */ - private function getAppDirsWithDifferentOwnerForAppRoot(array $currentUser, array $appRoot): array { + private function getAppDirsWithDifferentOwnerForAppRoot($currentUser, array $appRoot): array { $appDirsWithDifferentOwner = []; $appsPath = $appRoot['path']; $appsDir = new DirectoryIterator($appRoot['path']); @@ -573,7 +573,7 @@ Raw output foreach ($appsDir as $fileInfo) { if ($fileInfo->isDir() && !$fileInfo->isDot()) { $absAppPath = $appsPath . DIRECTORY_SEPARATOR . $fileInfo->getFilename(); - $appDirUser = posix_getpwuid(fileowner($absAppPath)); + $appDirUser = fileowner($absAppPath); if ($appDirUser !== $currentUser) { $appDirsWithDifferentOwner[] = $absAppPath; } |