Merge "logd: stop log spam when integrity enforcement is suppressed" into nyc-dev
This commit is contained in:
commit
78d2766143
1 changed files with 11 additions and 2 deletions
|
|
@ -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) {
|
||||
logToDmesg("integrity enforcement suppressed; not rebooting");
|
||||
if (!once) {
|
||||
logToDmesg("integrity enforcement suppressed; not rebooting");
|
||||
}
|
||||
} else if (rebootToSafeMode) {
|
||||
if (getProperty("persist.sys.safemode") == "1") {
|
||||
logToDmesg("integrity enforcement suppressed; in safe mode");
|
||||
if (!once) {
|
||||
logToDmesg("integrity enforcement suppressed; in safe mode");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue