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

Commit 56f98c4a authored by Narayan Kamath's avatar Narayan Kamath Committed by android-build-merger
Browse files

Merge "app_main: failure to PR_SET_NO_NEW_PRIVS is always fatal." am:...

Merge "app_main: failure to PR_SET_NO_NEW_PRIVS is always fatal." am: 796578f9 am: 2b283bd2 am: c9f86e12
am: c7cafbaa

Change-Id: I74029c86ee2cc02cfdeaee79f41aa798fded37ad
parents 2760faa6 c7cafbaa
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -185,12 +185,7 @@ static const char ZYGOTE_NICE_NAME[] = "zygote";
int main(int argc, char* const argv[])
{
    if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0) {
        // Older kernels don't understand PR_SET_NO_NEW_PRIVS and return
        // EINVAL. Don't die on such kernels.
        if (errno != EINVAL) {
        LOG_ALWAYS_FATAL("PR_SET_NO_NEW_PRIVS failed: %s", strerror(errno));
            return 12;
        }
    }

    AppRuntime runtime(argv[0], computeArgBlockSize(argc, argv));
@@ -309,6 +304,5 @@ int main(int argc, char* const argv[])
        fprintf(stderr, "Error: no class name or --zygote supplied.\n");
        app_usage();
        LOG_ALWAYS_FATAL("app_process: no class name or --zygote supplied.");
        return 10;
    }
}