d122ee65b6
If a SELinux policy change or a switch to permissive mode is detected on a user build, restart the device into safe mode, and keep it there until an OTA is applied or user data is wiped. This change deprecates the ro.logd.auditd property. Needs matching changes from I781c3059ea8d4fb2f0c923e4488b1932d69678d3 Ica825cf2af74f5624cf4091544bd24bb5482dbe7 Id3ca7889ede30b54b7af73dd50653ca1a20d59aa Bug: 26902605 Change-Id: Idcdc5bff133f13c1267f0ec0a75cc8cf1ddbda0d
51 lines
1.1 KiB
Makefile
51 lines
1.1 KiB
Makefile
LOCAL_PATH:= $(call my-dir)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE:= logd
|
|
|
|
LOCAL_INIT_RC := logd.rc
|
|
|
|
LOCAL_SRC_FILES := \
|
|
main.cpp \
|
|
LogCommand.cpp \
|
|
CommandListener.cpp \
|
|
LogListener.cpp \
|
|
LogReader.cpp \
|
|
FlushCommand.cpp \
|
|
LogBuffer.cpp \
|
|
LogBufferElement.cpp \
|
|
LogTimes.cpp \
|
|
LogStatistics.cpp \
|
|
LogWhiteBlackList.cpp \
|
|
libaudit.c \
|
|
LogAudit.cpp \
|
|
LogKlog.cpp \
|
|
event.logtags
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
libsysutils \
|
|
liblog \
|
|
libcutils \
|
|
libbase \
|
|
libpackagelistparser
|
|
|
|
# This is what we want to do:
|
|
# event_logtags = $(shell \
|
|
# sed -n \
|
|
# "s/^\([0-9]*\)[ \t]*$1[ \t].*/-D`echo $1 | tr a-z A-Z`_LOG_TAG=\1/p" \
|
|
# $(LOCAL_PATH)/$2/event.logtags)
|
|
# event_flag := $(call event_logtags,auditd)
|
|
# event_flag += $(call event_logtags,logd)
|
|
# so make sure we do not regret hard-coding it as follows:
|
|
event_flag := -DAUDITD_LOG_TAG=1003 -DLOGD_LOG_TAG=1004
|
|
|
|
LOCAL_CFLAGS := -Werror $(event_flag)
|
|
|
|
ifeq ($(TARGET_BUILD_VARIANT),user)
|
|
LOCAL_CFLAGS += -DAUDITD_ENFORCE_INTEGRITY=true
|
|
endif
|
|
|
|
include $(BUILD_EXECUTABLE)
|
|
|
|
include $(call first-makefiles-under,$(LOCAL_PATH))
|