summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-04-03 18:42:43 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-04-18 10:23:55 -0400
commitbd09ead65cded3207cf228c44a31bbc87c2979bd (patch)
tree91d7abf452011afdbef9c42a3eb7d59fa8768a83 /src/providers/ldap
parent7329723a5d8ce46f146e78dabfad5c94b3eed505 (diff)
downloadsssd-bd09ead65cded3207cf228c44a31bbc87c2979bd.tar.gz
sssd-bd09ead65cded3207cf228c44a31bbc87c2979bd.tar.xz
sssd-bd09ead65cded3207cf228c44a31bbc87c2979bd.zip
Prevent printing NULL from DEBUG messages
Diffstat (limited to 'src/providers/ldap')
-rw-r--r--src/providers/ldap/sdap.c13
-rw-r--r--src/providers/ldap/sdap_async.c6
2 files changed, 13 insertions, 6 deletions
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
index 9e052eef5..616e7cba5 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -54,7 +54,8 @@ int sdap_get_map(TALLOC_CTX *memctx,
map[i].def_name,
&name);
if (ret != EOK) {
- DEBUG(0, ("Failed to retrieve value for %s\n", map[i].opt_name));
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("Failed to retrieve value for %s\n", map[i].opt_name));
talloc_zfree(map);
return EINVAL;
}
@@ -62,7 +63,8 @@ int sdap_get_map(TALLOC_CTX *memctx,
if (name) {
ret = sss_filter_sanitize(map, name, &map[i].name);
if (ret != EOK) {
- DEBUG(1, ("Could not sanitize attribute [%s]\n", name));
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("Could not sanitize attribute [%s]\n", name));
talloc_zfree(map);
return EINVAL;
}
@@ -72,14 +74,17 @@ int sdap_get_map(TALLOC_CTX *memctx,
}
if (map[i].def_name && !map[i].name) {
- DEBUG(0, ("Failed to retrieve value for %s\n", map[i].opt_name));
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("Failed to retrieve value for %s\n", map[i].opt_name));
if (ret != EOK) {
talloc_zfree(map);
return EINVAL;
}
}
- DEBUG(5, ("Option %s has value %s\n", map[i].opt_name, map[i].name));
+ DEBUG(SSSDBG_TRACE_FUNC, ("Option %s has%s value %s\n",
+ map[i].opt_name, map[i].name ? "" : " no",
+ map[i].name ? map[i].name : ""));
}
*_map = map;
diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c
index 076a3f220..b21d9c384 100644
--- a/src/providers/ldap/sdap_async.c
+++ b/src/providers/ldap/sdap_async.c
@@ -1155,8 +1155,10 @@ static errno_t sdap_get_generic_ext_step(struct tevent_req *req)
*/
talloc_zfree(state->op);
- DEBUG(6, ("calling ldap_search_ext with [%s][%s].\n", state->filter,
- state->search_base));
+ DEBUG(SSSDBG_TRACE_FUNC,
+ ("calling ldap_search_ext with [%s][%s].\n",
+ state->filter ? state->filter : "no filter",
+ state->search_base));
if (DEBUG_IS_SET(SSSDBG_TRACE_LIBS)) {
int i;