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

Commit 6d1c951f authored by Suren Baghdasaryan's avatar Suren Baghdasaryan Committed by Automerger Merge Worker
Browse files

Merge "libprocessgroup: Remove unnecessary permissions change in uid/pid hierarchy" am: 86e0c6f4

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

Change-Id: If8426595258b404bfb28600012155c4520bff35a
parents be6fac81 86e0c6f4
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;
    }