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

Commit b10cd895 authored by Arve Hjnnevg's avatar Arve Hjnnevg Committed by android-build-merger
Browse files

ServiceManager: Allow system services running as secondary users to add...

ServiceManager: Allow system services running as secondary users to add services am: e6bbe69b am: 2cb14836 am: c29c3734 am: ce0e7291 am: 2c39ea10 am: fa5aafc9 am: 1f36bcd2 am: 75469c1f
am: 083f4ecc

Change-Id: Ie1931218577e24e4ab0eb7328ccff60a2ca54400
parents 90ba9eb2 083f4ecc
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -18,7 +18,7 @@ LOCAL_MODULE_TAGS := optional
include $(BUILD_EXECUTABLE)
include $(BUILD_EXECUTABLE)


include $(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_SHARED_LIBRARIES := liblog libselinux
LOCAL_SHARED_LIBRARIES := liblog libcutils libselinux
LOCAL_SRC_FILES := service_manager.c binder.c
LOCAL_SRC_FILES := service_manager.c binder.c
LOCAL_CFLAGS += $(svc_c_flags)
LOCAL_CFLAGS += $(svc_c_flags)
LOCAL_MODULE := servicemanager
LOCAL_MODULE := servicemanager
+3 −1
Original line number Original line Diff line number Diff line
@@ -8,6 +8,8 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>


#include <cutils/multiuser.h>

#include <private/android_filesystem_config.h>
#include <private/android_filesystem_config.h>


#include <selinux/android.h>
#include <selinux/android.h>
@@ -122,7 +124,7 @@ static int svc_can_register(const uint16_t *name, size_t name_len, pid_t spid, u
{
{
    const char *perm = "add";
    const char *perm = "add";


    if (uid >= AID_APP) {
    if (multiuser_get_app_id(uid) >= AID_APP) {
        return 0; /* Don't allow apps to register services */
        return 0; /* Don't allow apps to register services */
    }
    }