summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2015-02-23 20:58:08 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-23 20:58:08 +0000
commiteec0aca728aa4e3f1aa79f037f5fdebf306c7b99 (patch)
treee8649e56383dfc2c8b8e409a8744c539dbb53653
parent3a9de8d5a79fc9f25498d10a4096f2a01e675c40 (diff)
parent4ebfa148efa7ad8e85d9731ac990940685bc6ca3 (diff)
downloadlibselinux-eec0aca728aa4e3f1aa79f037f5fdebf306c7b99.tar.gz
am 4ebfa148: Merge "libselinux: drop sebool= support"
* commit '4ebfa148efa7ad8e85d9731ac990940685bc6ca3': libselinux: drop sebool= support
-rw-r--r--src/android.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/src/android.c b/src/android.c
index 4f6a465..8e39aac 100644
--- a/src/android.c
+++ b/src/android.c
@@ -172,7 +172,6 @@ struct seapp_context {
char *domain;
char *type;
char *level;
- char *sebool;
enum levelFrom levelFrom;
};
@@ -188,7 +187,6 @@ static void free_seapp_context(struct seapp_context *s)
free(s->domain);
free(s->type);
free(s->level);
- free(s->sebool);
}
static int seapp_context_cmp(const void *A, const void *B)
@@ -259,12 +257,6 @@ static int seapp_context_cmp(const void *A, const void *B)
return (s1->path.len > s2->path.len) ? -1 : 1;
}
- /* Give precedence to a specified sebool= over an unspecified sebool=. */
- if (s1->sebool && !s2->sebool)
- return -1;
- if (!s1->sebool && s2->sebool)
- return 1;
-
/* Anything else has equal precedence. */
return 0;
}
@@ -446,12 +438,6 @@ int selinux_android_seapp_context_reload(void)
cur->path.len = strlen(cur->path.str);
if (cur->path.str[cur->path.len-1] == '*')
cur->path.is_prefix = 1;
- } else if (!strcasecmp(name, "sebool")) {
- cur->sebool = strdup(value);
- if (!cur->sebool) {
- free_seapp_context(cur);
- goto oom;
- }
} else {
free_seapp_context(cur);
goto err;
@@ -483,12 +469,12 @@ int selinux_android_seapp_context_reload(void)
int i;
for (i = 0; i < nspec; i++) {
cur = seapp_contexts[i];
- selinux_log(SELINUX_INFO, "%s: isSystemServer=%s isOwner=%s user=%s seinfo=%s name=%s path=%s sebool=%s -> domain=%s type=%s level=%s levelFrom=%s",
+ selinux_log(SELINUX_INFO, "%s: isSystemServer=%s isOwner=%s user=%s seinfo=%s name=%s path=%s -> domain=%s type=%s level=%s levelFrom=%s",
__FUNCTION__,
cur->isSystemServer ? "true" : "false",
cur->isOwnerSet ? (cur->isOwner ? "true" : "false") : "null",
cur->user.str,
- cur->seinfo, cur->name.str, cur->path.str, cur->sebool, cur->domain,
+ cur->seinfo, cur->name.str, cur->path.str, cur->domain,
cur->type, cur->level,
levelFromName[cur->levelFrom]);
}
@@ -630,17 +616,6 @@ static int seapp_context_lookup(enum seapp_kind kind,
else if (kind == SEAPP_DOMAIN && !cur->domain)
continue;
- if (cur->sebool) {
- int value = security_get_boolean_active(cur->sebool);
- if (value == 0)
- continue;
- else if (value == -1) {
- selinux_log(SELINUX_ERROR, \
- "Could not find boolean: %s ", cur->sebool);
- goto err;
- }
- }
-
if (kind == SEAPP_TYPE) {
if (context_type_set(ctx, cur->type))
goto oom;