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

Commit a7575ec4 authored by Sandeep Patil's avatar Sandeep Patil Committed by android-build-merger
Browse files

Merge "servicemanager: selinux: set selinux callbacks early"

am: bfbe2d71

Change-Id: I0e3e088eb3d8404d1707ac61aa18eda5f0cbad8d
parents 411ae16a bfbe2d71
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -363,6 +363,7 @@ static int audit_callback(void *data, __unused security_class_t cls, char *buf,
int main()
int main()
{
{
    struct binder_state *bs;
    struct binder_state *bs;
    union selinux_callback cb;


    bs = binder_open(128*1024);
    bs = binder_open(128*1024);
    if (!bs) {
    if (!bs) {
@@ -375,6 +376,11 @@ int main()
        return -1;
        return -1;
    }
    }


    cb.func_audit = audit_callback;
    selinux_set_callback(SELINUX_CB_AUDIT, cb);
    cb.func_log = selinux_log_callback;
    selinux_set_callback(SELINUX_CB_LOG, cb);

    sehandle = selinux_android_service_context_handle();
    sehandle = selinux_android_service_context_handle();
    selinux_status_open(true);
    selinux_status_open(true);


@@ -388,11 +394,6 @@ int main()
        abort();
        abort();
    }
    }


    union selinux_callback cb;
    cb.func_audit = audit_callback;
    selinux_set_callback(SELINUX_CB_AUDIT, cb);
    cb.func_log = selinux_log_callback;
    selinux_set_callback(SELINUX_CB_LOG, cb);


    binder_loop(bs, svcmgr_handler);
    binder_loop(bs, svcmgr_handler);