Removing selinux_android_prop_context_handle
This function hasn't been used for near two years. Removing it to prevent confusion. The last usage is removed in commit I27dd391fc06a3c78e88a65c7931c84de1699f157 Bug: 137712473 Bug: 141871131 Test: boot the device Change-Id: I9d26ca7375b49b98a1fc6fda38f1ef9fd3c3f563
This commit is contained in:
parent
dc67d9ca5b
commit
e5b9766b3a
5 changed files with 0 additions and 83 deletions
|
@ -25,7 +25,6 @@
|
|||
selinux_android_hw_service_context_handle;
|
||||
selinux_android_load_policy;
|
||||
selinux_android_load_policy_from_fd;
|
||||
selinux_android_prop_context_handle;
|
||||
selinux_android_restorecon;
|
||||
selinux_android_restorecon_pkgdir;
|
||||
selinux_android_seapp_context_init;
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
selabel_close;
|
||||
selabel_lookup;
|
||||
selabel_open;
|
||||
selinux_android_prop_context_handle;
|
||||
selinux_android_restorecon;
|
||||
selinux_android_service_context_handle;
|
||||
selinux_android_hw_service_context_handle;
|
||||
|
|
|
@ -13,8 +13,6 @@ extern "C" {
|
|||
|
||||
extern struct selabel_handle* selinux_android_file_context_handle(void);
|
||||
|
||||
extern struct selabel_handle* selinux_android_prop_context_handle(void);
|
||||
|
||||
extern struct selabel_handle* selinux_android_service_context_handle(void);
|
||||
|
||||
extern struct selabel_handle* selinux_android_hw_service_context_handle(void);
|
||||
|
|
|
@ -31,30 +31,6 @@ static const struct selinux_opt seopts_file_odm[] = {
|
|||
{ SELABEL_OPT_PATH, "/odm_file_contexts" }
|
||||
};
|
||||
|
||||
static const struct selinux_opt seopts_prop_plat[] = {
|
||||
{ SELABEL_OPT_PATH, "/system/etc/selinux/plat_property_contexts" },
|
||||
{ SELABEL_OPT_PATH, "/plat_property_contexts" }
|
||||
};
|
||||
static const struct selinux_opt seopts_prop_system_ext[] = {
|
||||
{ SELABEL_OPT_PATH, "/system_ext/etc/selinux/system_ext_property_contexts" },
|
||||
{ SELABEL_OPT_PATH, "/system_ext_property_contexts" }
|
||||
};
|
||||
static const struct selinux_opt seopts_prop_product[] = {
|
||||
{ SELABEL_OPT_PATH, "/product/etc/selinux/product_property_contexts" },
|
||||
{ SELABEL_OPT_PATH, "/product_property_contexts" }
|
||||
};
|
||||
static const struct selinux_opt seopts_prop_vendor[] = {
|
||||
{ SELABEL_OPT_PATH, "/vendor/etc/selinux/vendor_property_contexts" },
|
||||
{ SELABEL_OPT_PATH, "/vendor_property_contexts" },
|
||||
// TODO: remove nonplat* when no need to retain backward compatibility.
|
||||
{ SELABEL_OPT_PATH, "/vendor/etc/selinux/nonplat_property_contexts" },
|
||||
{ SELABEL_OPT_PATH, "/nonplat_property_contexts" }
|
||||
};
|
||||
static const struct selinux_opt seopts_prop_odm[] = {
|
||||
{ SELABEL_OPT_PATH, "/odm/etc/selinux/odm_property_contexts" },
|
||||
{ SELABEL_OPT_PATH, "/odm_property_contexts" }
|
||||
};
|
||||
|
||||
/*
|
||||
* XXX Where should this configuration file be located?
|
||||
* Needs to be accessible by zygote and installd when
|
||||
|
@ -145,55 +121,6 @@ struct selabel_handle* selinux_android_file_context_handle(void)
|
|||
return selinux_android_file_context(seopts_file, size);
|
||||
}
|
||||
|
||||
struct selabel_handle* selinux_android_prop_context_handle(void)
|
||||
{
|
||||
struct selabel_handle* sehandle;
|
||||
struct selinux_opt seopts_prop[MAX_FILE_CONTEXT_SIZE];
|
||||
int size = 0;
|
||||
unsigned int i;
|
||||
for (i = 0; i < ARRAY_SIZE(seopts_prop_plat); i++) {
|
||||
if (access(seopts_prop_plat[i].value, R_OK) != -1) {
|
||||
seopts_prop[size++] = seopts_prop_plat[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < ARRAY_SIZE(seopts_prop_system_ext); i++) {
|
||||
if (access(seopts_prop_system_ext[i].value, R_OK) != -1) {
|
||||
seopts_prop[size++] = seopts_prop_system_ext[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < ARRAY_SIZE(seopts_prop_product); i++) {
|
||||
if (access(seopts_prop_product[i].value, R_OK) != -1) {
|
||||
seopts_prop[size++] = seopts_prop_product[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < ARRAY_SIZE(seopts_prop_vendor); i++) {
|
||||
if (access(seopts_prop_vendor[i].value, R_OK) != -1) {
|
||||
seopts_prop[size++] = seopts_prop_vendor[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < ARRAY_SIZE(seopts_prop_odm); i++) {
|
||||
if (access(seopts_prop_odm[i].value, R_OK) != -1) {
|
||||
seopts_prop[size++] = seopts_prop_odm[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sehandle = selabel_open(SELABEL_CTX_ANDROID_PROP, seopts_prop, size);
|
||||
if (!sehandle) {
|
||||
selinux_log(SELINUX_ERROR, "%s: Error getting property context handle (%s)\n",
|
||||
__FUNCTION__, strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
selinux_log(SELINUX_INFO, "SELinux: Loaded property_contexts from %s & %s.\n",
|
||||
seopts_prop[0].value, seopts_prop[1].value);
|
||||
|
||||
return sehandle;
|
||||
}
|
||||
|
||||
enum levelFrom {
|
||||
LEVELFROM_NONE,
|
||||
LEVELFROM_APP,
|
||||
|
|
|
@ -6,9 +6,3 @@ int selinux_android_restorecon(const char *file __attribute__((unused)),
|
|||
selinux_log(SELINUX_ERROR, "%s: not implemented for vendor variant of libselinux\n", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct selabel_handle* selinux_android_prop_context_handle(void)
|
||||
{
|
||||
selinux_log(SELINUX_ERROR, "%s: not implemented for vendor variant of libselinux\n", __FUNCTION__);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue