Merge changes I60250d10,I08effe32 into oc-mr1-dev
* changes: init: fix type of 2nd argument passed to prctl init: only use signed-integer-overflow sanitizer
This commit is contained in:
commit
8e5c465ee7
|
@ -18,7 +18,7 @@ cc_defaults {
|
|||
name: "init_defaults",
|
||||
cpp_std: "experimental",
|
||||
sanitize: {
|
||||
misc_undefined: ["integer"],
|
||||
misc_undefined: ["signed-integer-overflow"],
|
||||
},
|
||||
cppflags: [
|
||||
"-DLOG_UEVENTS=0",
|
||||
|
|
|
@ -96,6 +96,6 @@ LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT)/sbin; \
|
|||
ln -sf ../init $(TARGET_ROOT_OUT)/sbin/ueventd; \
|
||||
ln -sf ../init $(TARGET_ROOT_OUT)/sbin/watchdogd
|
||||
|
||||
LOCAL_SANITIZE := integer
|
||||
LOCAL_SANITIZE := signed-integer-overflow
|
||||
LOCAL_CLANG := true
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
|
|
@ -245,8 +245,8 @@ void Service::SetProcessAttributes() {
|
|||
if (capabilities_.any() && uid_) {
|
||||
// If Android is running in a container, some securebits might already
|
||||
// be locked, so don't change those.
|
||||
int64_t securebits = prctl(PR_GET_SECUREBITS);
|
||||
if (securebits == -1) {
|
||||
unsigned long securebits = prctl(PR_GET_SECUREBITS);
|
||||
if (securebits == -1UL) {
|
||||
PLOG(FATAL) << "prctl(PR_GET_SECUREBITS) failed for " << name_;
|
||||
}
|
||||
securebits |= SECBIT_KEEP_CAPS | SECBIT_KEEP_CAPS_LOCKED;
|
||||
|
|
Loading…
Reference in New Issue