summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-11-07 13:51:44 +0100
committerStephen Gallagher <sgallagh@redhat.com>2011-11-18 12:18:33 -0500
commit37a76cff2478d8be3d11ccb7ff42d9d863f1839e (patch)
tree746c7612fa5658807fcfa7e4e4147a65f2bf644f /src
parentd8e4e7a40eb75810c58a81bda7e27a2aaecc868f (diff)
downloadsssd-37a76cff2478d8be3d11ccb7ff42d9d863f1839e.tar.gz
sssd-37a76cff2478d8be3d11ccb7ff42d9d863f1839e.tar.bz2
sssd-37a76cff2478d8be3d11ccb7ff42d9d863f1839e.zip
Prevent printing NULL in several places of LDAP provider
Diffstat (limited to 'src')
-rw-r--r--src/providers/ldap/sdap_async.c6
-rw-r--r--src/providers/ldap/sdap_async_connection.c8
2 files changed, 9 insertions, 5 deletions
diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c
index 384ff8ef..a1355f93 100644
--- a/src/providers/ldap/sdap_async.c
+++ b/src/providers/ldap/sdap_async.c
@@ -1110,11 +1110,13 @@ static void sdap_get_generic_ext_done(struct sdap_op *op,
}
DEBUG(6, ("Search result: %s(%d), %s\n",
- sss_ldap_err2string(result), result, errmsg));
+ sss_ldap_err2string(result), result,
+ errmsg ? errmsg : "no errmsg set"));
if (result != LDAP_SUCCESS && result != LDAP_NO_SUCH_OBJECT) {
DEBUG(2, ("Unexpected result from ldap: %s(%d), %s\n",
- sss_ldap_err2string(result), result, errmsg));
+ sss_ldap_err2string(result), result,
+ errmsg ? errmsg : "no errmsg set"));
}
ldap_memfree(errmsg);
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index 076e7ee3..cb732536 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -588,7 +588,8 @@ static void simple_bind_done(struct sdap_op *op,
}
DEBUG(3, ("Bind result: %s(%d), %s\n",
- sss_ldap_err2string(state->result), state->result, errmsg));
+ sss_ldap_err2string(state->result), state->result,
+ errmsg ? errmsg : "no errmsg set"));
ret = LDAP_SUCCESS;
done:
@@ -792,8 +793,9 @@ struct tevent_req *sdap_kinit_send(TALLOC_CTX *memctx,
struct sdap_kinit_state *state;
int ret;
- DEBUG(6, ("Attempting kinit (%s, %s, %s, %d)\n", keytab, principal, realm,
- lifetime));
+ DEBUG(6, ("Attempting kinit (%s, %s, %s, %d)\n",
+ keytab ? keytab : "default",
+ principal, realm, lifetime));
if (lifetime < 0 || lifetime > INT32_MAX) {
DEBUG(1, ("Ticket lifetime out of range.\n"));