[SSSD] [PATCH] Make IPA SELinux provider aware of subdomain users

Jakub Hrozek jhrozek at redhat.com
Mon Apr 29 13:05:16 UTC 2013


On Sun, Apr 28, 2013 at 09:10:43PM +0200, Jakub Hrozek wrote:
> > +        if (subdom_be_ctx == NULL) {
> > +            DEBUG(SSSDBG_CONF_SETTINGS, ("Subdomains are not configured, " \
> > +                                         "cannot lookup domain [%s].\n",
> > +                                         pd->domain));
> > +            goto fail;
> 
> Ack, I will just make this DEBUG message louder -- if a handler is
> failing, it should tell the user why it's failing loudly. I will use
> OP_FAILURE.

Pushed to master.

Unfortunately I realized I wanted to change the macro after I pushed the
patch so I'm also going to push the attached simple patch (it's not a
one liner but only because the DEBUG message spans three lines).
-------------- next part --------------
>From 313119612112b7ba97d9467277e8981d765b1eba Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Mon, 29 Apr 2013 14:13:41 +0200
Subject: [PATCH] selinux: if no domain matches, make the debug message louder

---
 src/providers/ipa/ipa_selinux.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c
index d82485e754b922f2bd8afc4d121da75d968dbb50..da685390920ec8f5dfd7b73b9c234d70d83b4c77 100644
--- a/src/providers/ipa/ipa_selinux.c
+++ b/src/providers/ipa/ipa_selinux.c
@@ -113,9 +113,9 @@ void ipa_selinux_handler(struct be_req *be_req)
     if (strcasecmp(pd->domain, be_ctx->domain->name) != 0) {
         subdom_be_ctx = ipa_get_subdomains_be_ctx(be_ctx);
         if (subdom_be_ctx == NULL) {
-            DEBUG(SSSDBG_CONF_SETTINGS, ("Subdomains are not configured, " \
-                                         "cannot lookup domain [%s].\n",
-                                         pd->domain));
+            DEBUG(SSSDBG_OP_FAILURE, ("Subdomains are not configured, " \
+                                      "cannot lookup domain [%s].\n",
+                                       pd->domain));
             goto fail;
         } else {
             user_domain = find_subdomain_by_name(subdom_be_ctx->domain,
-- 
1.8.1.4



More information about the sssd-devel mailing list