summaryrefslogtreecommitdiffstats
path: root/settings/Controller
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2018-09-13 10:29:08 +0200
committerGitHub <noreply@github.com>2018-09-13 10:29:08 +0200
commitd1cb83424feb5bd96f49e657d20b912cddfdd3d3 (patch)
tree06b3ad64cbaf68fe9efeb252f3aa58312f4f32ac /settings/Controller
parentd062c8687b772c5b9288438ce363908065c7494f (diff)
parent45dab2d2a21a77e54c39a4a0b3d57f175c6a5c8f (diff)
downloadnextcloud-server-d1cb83424feb5bd96f49e657d20b912cddfdd3d3.tar.gz
nextcloud-server-d1cb83424feb5bd96f49e657d20b912cddfdd3d3.zip
Merge pull request #11091 from nextcloud/bugfix/11088/cannot-read-passwd
Remove posix_getpwuid and compare only userid
Diffstat (limited to 'settings/Controller')
-rw-r--r--settings/Controller/CheckSetupController.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php
index 54a23d336d8..851644a27d9 100644
--- a/settings/Controller/CheckSetupController.php
+++ b/settings/Controller/CheckSetupController.php
@@ -545,7 +545,7 @@ Raw output
* @return array
*/
protected function getAppDirsWithDifferentOwner(): array {
- $currentUser = posix_getpwuid(posix_getuid());
+ $currentUser = posix_getuid();
$appDirsWithDifferentOwner = [[]];
foreach (OC::$APPSROOTS as $appRoot) {
@@ -563,11 +563,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(int $currentUser, array $appRoot): array {
$appDirsWithDifferentOwner = [];
$appsPath = $appRoot['path'];
$appsDir = new DirectoryIterator($appRoot['path']);
@@ -575,7 +575,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;
}