Loading CleanSpec.mk +1 −0 Original line number Diff line number Diff line Loading @@ -50,3 +50,4 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/init.rc) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/init.rc) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/reboot) adb/adb.c +2 −1 Original line number Diff line number Diff line Loading @@ -1195,8 +1195,9 @@ static void drop_capabilities_bounding_set_if_needed() { #endif int i; for (i = 0; prctl(PR_CAPBSET_READ, i, 0, 0, 0) >= 0; i++) { if ((i == CAP_SETUID) || (i == CAP_SETGID)) { if (i == CAP_SETUID || i == CAP_SETGID || i == CAP_SYS_BOOT) { // CAP_SETUID CAP_SETGID needed by /system/bin/run-as // CAP_SYS_BOOT needed by /system/bin/reboot continue; } int err = prctl(PR_CAPBSET_DROP, i, 0, 0, 0); Loading include/private/android_filesystem_config.h +2 −1 Original line number Diff line number Diff line Loading @@ -228,8 +228,9 @@ static const struct fs_path_config android_files[] = { { 06755, AID_ROOT, AID_ROOT, 0, "system/xbin/tcpdump" }, { 04770, AID_ROOT, AID_RADIO, 0, "system/bin/pppd-ril" }, /* the following file has enhanced capabilities and IS included in user builds. */ /* the following files have enhanced capabilities and ARE included in user builds. */ { 00750, AID_ROOT, AID_SHELL, (1 << CAP_SETUID) | (1 << CAP_SETGID), "system/bin/run-as" }, { 00750, AID_ROOT, AID_SHELL, 1 << CAP_SYS_BOOT, "system/bin/reboot" }, { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/*" }, { 00755, AID_ROOT, AID_ROOT, 0, "system/lib/valgrind/*" }, Loading reboot/Android.mk 0 → 100644 +12 −0 Original line number Diff line number Diff line # Copyright 2013 The Android Open Source Project LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= reboot.c LOCAL_SHARED_LIBRARIES:= libcutils LOCAL_MODULE:= reboot include $(BUILD_EXECUTABLE) toolbox/reboot.c→reboot/reboot.c +19 −3 Original line number Diff line number Diff line /* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <cutils/android_reboot.h> #include <unistd.h> int reboot_main(int argc, char *argv[]) int main(int argc, char *argv[]) { int ret; int nosync = 0; Loading Loading
CleanSpec.mk +1 −0 Original line number Diff line number Diff line Loading @@ -50,3 +50,4 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/init.rc) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/init.rc) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/reboot)
adb/adb.c +2 −1 Original line number Diff line number Diff line Loading @@ -1195,8 +1195,9 @@ static void drop_capabilities_bounding_set_if_needed() { #endif int i; for (i = 0; prctl(PR_CAPBSET_READ, i, 0, 0, 0) >= 0; i++) { if ((i == CAP_SETUID) || (i == CAP_SETGID)) { if (i == CAP_SETUID || i == CAP_SETGID || i == CAP_SYS_BOOT) { // CAP_SETUID CAP_SETGID needed by /system/bin/run-as // CAP_SYS_BOOT needed by /system/bin/reboot continue; } int err = prctl(PR_CAPBSET_DROP, i, 0, 0, 0); Loading
include/private/android_filesystem_config.h +2 −1 Original line number Diff line number Diff line Loading @@ -228,8 +228,9 @@ static const struct fs_path_config android_files[] = { { 06755, AID_ROOT, AID_ROOT, 0, "system/xbin/tcpdump" }, { 04770, AID_ROOT, AID_RADIO, 0, "system/bin/pppd-ril" }, /* the following file has enhanced capabilities and IS included in user builds. */ /* the following files have enhanced capabilities and ARE included in user builds. */ { 00750, AID_ROOT, AID_SHELL, (1 << CAP_SETUID) | (1 << CAP_SETGID), "system/bin/run-as" }, { 00750, AID_ROOT, AID_SHELL, 1 << CAP_SYS_BOOT, "system/bin/reboot" }, { 00755, AID_ROOT, AID_SHELL, 0, "system/bin/*" }, { 00755, AID_ROOT, AID_ROOT, 0, "system/lib/valgrind/*" }, Loading
reboot/Android.mk 0 → 100644 +12 −0 Original line number Diff line number Diff line # Copyright 2013 The Android Open Source Project LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= reboot.c LOCAL_SHARED_LIBRARIES:= libcutils LOCAL_MODULE:= reboot include $(BUILD_EXECUTABLE)
toolbox/reboot.c→reboot/reboot.c +19 −3 Original line number Diff line number Diff line /* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <cutils/android_reboot.h> #include <unistd.h> int reboot_main(int argc, char *argv[]) int main(int argc, char *argv[]) { int ret; int nosync = 0; Loading