URL: https://github.com/SSSD/sssd/pull/359
Author: jhrozek
 Title: #359: CONFDB: Do not crash with an invalid domain_type value
Action: synchronized

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/359/head:pr359
git checkout pr359
From 23eb2d307236366ce1e34103565b5bd850e969e6 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhro...@redhat.com>
Date: Tue, 29 Aug 2017 10:52:45 +0200
Subject: [PATCH] CONFDB: Do not crash with an invalid domain_type or
 case_sensitive value

If the domain_type parameter contained an invalid value, the error
branch wouldn't have set the 'ret' parameter to an error condition,
which might crash sssd.

The same problem occured with CONFDB_DOMAIN_CASE_SENSITIVE
---
 src/confdb/confdb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index fd73abe5b..32725ff77 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -1414,6 +1414,7 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
         } else {
             DEBUG(SSSDBG_FATAL_FAILURE,
                   "Invalid value %s for [%s]\n", tmp, CONFDB_DOMAIN_TYPE);
+            ret = EINVAL;
             goto done;
         }
     }
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to