Skip to content

Commit dea3ff1

Browse files
committed
Fixes ownership for network accounts for recent security update.
1 parent 645b7d1 commit dea3ff1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"email": "am@jonesiscoding.com"
1010
}
1111
],
12-
"version": "1.7.2",
12+
"version": "1.7.3",
1313
"autoload": {
1414
"psr-4": {
1515
"DevCoding\\Mac\\": "src"

src/Command/AbstractMacConsole.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,13 @@ protected function setUserAsOwner($file, MacUser $MacUser, $recursive = false)
311311
}
312312
else
313313
{
314-
$owner = posix_getpwuid(fileowner($uDir));
315-
$group = posix_getgrgid(filegroup($uDir));
314+
$owner = fileowner($uDir);
315+
$group = filegroup($uDir);
316316

317-
if (!empty($owner['name']) && !empty($group['name']))
317+
if (!empty($owner) && !empty($group))
318318
{
319-
chown($file, $owner['name']);
320-
chgrp($file, $group['name']);
319+
chown($file, $owner);
320+
chgrp($file, $group);
321321

322322
if ($recursive)
323323
{
@@ -329,8 +329,8 @@ protected function setUserAsOwner($file, MacUser $MacUser, $recursive = false)
329329
throw new \Exception('You cannot recursively set user ownership of a file that is not below the user directory.');
330330
}
331331

332-
chown($file, $owner['name']);
333-
chgrp($file, $group['name']);
332+
chown($file, $owner);
333+
chgrp($file, $group);
334334

335335
$dir = dirname($dir);
336336
}

0 commit comments

Comments
 (0)