From 863f4705e8961cfc7a21c276d186d3059d20f53e Mon Sep 17 00:00:00 2001
From: Michal Zidek <mzidek@redhat.com>
Date: Thu, 6 Nov 2014 16:35:11 +0100
Subject: [PATCH 73/75] selinux_child: Do not ignore return values.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
---
src/providers/ipa/selinux_child.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/providers/ipa/selinux_child.c b/src/providers/ipa/selinux_child.c
index a624cfd30d6795c305b7673d849213c74de95cd8..a38ffcb26f890349f47478063103e603fe6304cf 100644
--- a/src/providers/ipa/selinux_child.c
+++ b/src/providers/ipa/selinux_child.c
@@ -241,8 +241,16 @@ int main(int argc, const char *argv[])
DEBUG(SSSDBG_TRACE_FUNC, "performing selinux operations\n");
ret = set_seuser(ibuf->username, ibuf->seuser, ibuf->mls_range);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_CRIT_FAILURE, "Cannot set SELinux login context.\n");
+ goto fail;
+ }
ret = prepare_response(main_ctx, ret, &resp);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_CRIT_FAILURE, "Failed to prepare response buffer.\n");
+ goto fail;
+ }
errno = 0;
--
1.9.3