Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61ebf22b authored by Suren Baghdasaryan's avatar Suren Baghdasaryan Committed by Automerger Merge Worker
Browse files

libprocessgroup: Remove unnecessary permissions change in uid/pid hierarchy...

libprocessgroup: Remove unnecessary permissions change in uid/pid hierarchy am: add9a253 am: 546d205b

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15223454

Change-Id: I475cad003cfd13cb69391973937c011140d0a5e6
parents 27242bc9 546d205b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;
    }