From 7486dea9f5f7b2a6fbbacc6db740a82140b6377c Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Fri, 17 May 2013 17:36:38 +0200 Subject: Fixing critical format string issues. --missing arguments. --format '%s', but argument is integer. --wrong format string, examle: '%\n' --- src/providers/krb5/krb5_child.c | 4 +++- src/providers/krb5/krb5_utils.c | 4 ++-- src/providers/ldap/ldap_init.c | 4 +++- src/providers/ldap/sdap_async.c | 3 ++- src/providers/ldap/sdap_async_connection.c | 4 ++-- src/providers/ldap/sdap_async_groups.c | 3 ++- src/providers/ldap/sdap_async_initgroups_ad.c | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) (limited to 'src/providers') diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c index 831905afb..4626f59ff 100644 --- a/src/providers/krb5/krb5_child.c +++ b/src/providers/krb5/krb5_child.c @@ -2029,7 +2029,9 @@ static int k5c_setup(struct krb5_req *kr, uint32_t offline) } else if (strcasecmp(use_fast_str, "demand") == 0) { kerr = k5c_setup_fast(kr, lifetime_str, true); } else { - DEBUG(1, ("Unsupported value [%s] for krb5_use_fast.\n")); + DEBUG(SSSDBG_CRIT_FAILURE, + ("Unsupported value [%s] for krb5_use_fast.\n", + use_fast_str)); return EINVAL; } } diff --git a/src/providers/krb5/krb5_utils.c b/src/providers/krb5/krb5_utils.c index 524568939..1883d785e 100644 --- a/src/providers/krb5/krb5_utils.c +++ b/src/providers/krb5/krb5_utils.c @@ -858,7 +858,7 @@ cc_file_check_existing(const char *location, uid_t uid, filename = sss_krb5_residual_check_type(location, SSS_KRB5_TYPE_FILE); if (!filename) { - DEBUG(SSSDBG_CRIT_FAILURE, ("%s is not of type FILE:\n")); + DEBUG(SSSDBG_CRIT_FAILURE, ("%s is not of type FILE:\n", location)); return EINVAL; } @@ -922,7 +922,7 @@ cc_file_remove(const char *location) filename = sss_krb5_residual_check_type(location, SSS_KRB5_TYPE_FILE); if (!filename) { - DEBUG(SSSDBG_CRIT_FAILURE, ("%s is not of type FILE:\n")); + DEBUG(SSSDBG_CRIT_FAILURE, ("%s is not of type FILE:\n", location)); return EINVAL; } diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c index 0884a85c7..12b204c89 100644 --- a/src/providers/ldap/ldap_init.c +++ b/src/providers/ldap/ldap_init.c @@ -317,7 +317,9 @@ int sssm_ldap_access_init(struct be_ctx *bectx, } if (order_list_len > LDAP_ACCESS_LAST) { - DEBUG(1, ("Currently only [%d] different access rules are supported.\n")); + DEBUG(SSSDBG_CRIT_FAILURE, + ("Currently only [%d] different access rules are supported.\n", + LDAP_ACCESS_LAST)); ret = EINVAL; goto done; } diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c index afa2904f4..5eac1d436 100644 --- a/src/providers/ldap/sdap_async.c +++ b/src/providers/ldap/sdap_async.c @@ -2228,7 +2228,8 @@ sdap_attrs_add_ldap_attr(struct sysdb_attrs *ldap_attrs, ret = sysdb_attrs_get_el(ldap_attrs, attr_name, &el); if (ret) { DEBUG(SSSDBG_OP_FAILURE, ("Could not get %s from the " - "list of the LDAP attributes [%d]: %s\n", ret, strerror(ret))); + "list of the LDAP attributes [%d]: %s\n", + attr_name, ret, strerror(ret))); return ret; } diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c index 39a3ce946..4f6986fcf 100644 --- a/src/providers/ldap/sdap_async_connection.c +++ b/src/providers/ldap/sdap_async_connection.c @@ -850,8 +850,8 @@ static void simple_bind_done(struct sdap_op *op, talloc_zfree(nval); if (ret != EOK) { DEBUG(SSSDBG_MINOR_FAILURE, - ("Could not convert control response to an integer. ", - "[%s]\n", strerror(ret))); + ("Couldn't convert control response " + "to an integer [%s].\n", strerror(ret))); goto done; } diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c index cb30d4bb4..dc7fba426 100644 --- a/src/providers/ldap/sdap_async_groups.c +++ b/src/providers/ldap/sdap_async_groups.c @@ -2052,7 +2052,8 @@ static errno_t sdap_nested_group_populate_users(TALLOC_CTX *mem_ctx, ret = EINVAL; } if (ret != EOK) { - DEBUG(1, ("User entry %s has no originalDN attribute\n", i)); + DEBUG(SSSDBG_CRIT_FAILURE, + ("User entry %d has no originalDN attribute\n", i)); goto done; } original_dn = (const char *) el->values[0].data; diff --git a/src/providers/ldap/sdap_async_initgroups_ad.c b/src/providers/ldap/sdap_async_initgroups_ad.c index a3f6694aa..c2dec3736 100644 --- a/src/providers/ldap/sdap_async_initgroups_ad.c +++ b/src/providers/ldap/sdap_async_initgroups_ad.c @@ -569,7 +569,7 @@ done: sret = sysdb_transaction_cancel(state->sysdb); DEBUG(SSSDBG_FATAL_FAILURE, ("Could not cancel transaction! [%s]\n", - sret)); + strerror(sret))); } if (ret == EOK) { -- cgit