summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2014-04-04 14:09:24 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-04-04 17:35:46 +0200
commitbda38dde09b6975495437620d8c10f39e41af7be (patch)
tree5174eae68a4a78c013625102d4e4e8ff899bec0c
parent826ebfca9abae1a73e168d99f5800d632d7cb305 (diff)
downloadsssd-bda38dde09b6975495437620d8c10f39e41af7be.tar.gz
sssd-bda38dde09b6975495437620d8c10f39e41af7be.tar.xz
sssd-bda38dde09b6975495437620d8c10f39e41af7be.zip
Possible null dereference in SELinux code
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> (cherry picked from commit 7ac7dec08ec2c82a86fd6a90388993cfcee26da1)
-rw-r--r--src/providers/ipa/ipa_selinux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c
index b7cbe445f..784c5ab49 100644
--- a/src/providers/ipa/ipa_selinux.c
+++ b/src/providers/ipa/ipa_selinux.c
@@ -278,7 +278,7 @@ static void ipa_selinux_handler_done(struct tevent_req *req)
goto fail;
}
- if (map_count > 0 && maps != NULL) {
+ if (map_count > 0) {
ret = ipa_save_user_maps(sysdb, op_ctx->ipa_domain, map_count, maps);
if (ret != EOK) {
goto fail;
@@ -1302,7 +1302,7 @@ ipa_get_selinux_recv(struct tevent_req *req,
*default_user = NULL;
}
- if (state->selinuxmaps != NULL) {
+ if (state->selinuxmaps != NULL && state->nmaps != 0) {
*count = state->nmaps;
*maps = talloc_steal(mem_ctx, state->selinuxmaps);
} else {