Merge "libprocessgroup: Remove unnecessary permissions change in uid/pid hierarchy"
This commit is contained in:
commit
86e0c6f409
1 changed files with 5 additions and 1 deletions
|
@ -224,7 +224,11 @@ void removeAllProcessGroups() {
|
|||
* transferred for the user/group passed as uid/gid before system_server can properly access them.
|
||||
*/
|
||||
static bool MkdirAndChown(const std::string& path, mode_t mode, uid_t uid, gid_t gid) {
|
||||
if (mkdir(path.c_str(), mode) == -1 && errno != EEXIST) {
|
||||
if (mkdir(path.c_str(), mode) == -1) {
|
||||
if (errno == EEXIST) {
|
||||
// Directory already exists and permissions have been set at the time it was created
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue