mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix ownership if necessary.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3767 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7ec19ca5cf
commit
654fd3068a
1 changed files with 7 additions and 0 deletions
|
@ -616,6 +616,13 @@ failure:
|
|||
if ([mgr changeFileAttributes: att atPath: path] == NO)
|
||||
NSLog(@"Unable to correctly set all attributes for '%@'", path);
|
||||
}
|
||||
else if (geteuid() == 0 && [@"root" isEqualToString: NSUserName()] == NO)
|
||||
{
|
||||
att = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
NSFileOwnerAccountName, NSUserName(), nil];
|
||||
if ([mgr changeFileAttributes: att atPath: path] == NO)
|
||||
NSLog(@"Unable to correctly set ownership for '%@'", path);
|
||||
}
|
||||
}
|
||||
|
||||
/* success: */
|
||||
|
|
Loading…
Reference in a new issue