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

Commit 9218477a authored by Sami Tolvanen's avatar Sami Tolvanen Committed by Gerrit Code Review
Browse files

Merge "logd: stop log spam when integrity enforcement is suppressed"

parents a335367b abda9340
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -99,11 +99,20 @@ std::string LogAudit::getProperty(const std::string& name)
}

void LogAudit::enforceIntegrity() {
    static bool loggedOnce;
    bool once = loggedOnce;

    loggedOnce = true;

    if (!AUDITD_ENFORCE_INTEGRITY) {
        if (!once) {
            logToDmesg("integrity enforcement suppressed; not rebooting");
        }
    } else if (rebootToSafeMode) {
        if (getProperty("persist.sys.safemode") == "1") {
            if (!once) {
                logToDmesg("integrity enforcement suppressed; in safe mode");
            }
            return;
        }