diff --git a/public/domain.te b/public/domain.te index 0c43437431c996e2d4e0aa8a8fc9e43d8d70ae98..ef939c50707cf308c46d5d1e82f2288c4f681c24 100644 --- a/public/domain.te +++ b/public/domain.te @@ -424,18 +424,13 @@ neverallow * {fs_type -contextmount_type}:filesystem relabelto; neverallow { domain -recovery } contextmount_type:dir_file_class_set { create write setattr relabelfrom relabelto append unlink link rename }; -# Do not allow service_manager add for default_android_service. +# Do not allow service_manager add for default service labels. # Instead domains should use a more specific type such as # system_app_service rather than the generic type. -# New service_types are defined in service.te and new mappings -# from service name to service_type are defined in service_contexts. +# New service_types are defined in {,hw,vnd}service.te and new mappings +# from service name to service_type are defined in {,hw,vnd}service_contexts. neverallow * default_android_service:service_manager add; - -# Do not allow hwservice_manager add for default_android_hwservice. -# Instead domains should use a more specific type such as -# hal_audio_hwservice rather than the generic type. -# New service_types are defined in hwservice.te and new mappings -# from service name to service_type are defined in hwservice_contexts. +neverallow * default_android_vndservice:service_manager { add find }; neverallow * default_android_hwservice:hwservice_manager { add find }; # Looking up the base class/interface of all HwBinder services is a bad idea. diff --git a/public/vndservice.te b/public/vndservice.te new file mode 100644 index 0000000000000000000000000000000000000000..0d309bf71510428f71fe0f336d1ff3f023418dd4 --- /dev/null +++ b/public/vndservice.te @@ -0,0 +1 @@ +type default_android_vndservice, vndservice_manager_type; diff --git a/vendor/vndservice_contexts b/vendor/vndservice_contexts new file mode 100644 index 0000000000000000000000000000000000000000..4cca2fb65a1fa7f92bf82b5497331c33eb5c8db2 --- /dev/null +++ b/vendor/vndservice_contexts @@ -0,0 +1 @@ +* u:object_r:default_android_vndservice:s0