summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-05-17 17:36:38 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-05-20 22:37:25 +0200
commit7486dea9f5f7b2a6fbbacc6db740a82140b6377c (patch)
treea7f7cfc4f772860423e56d363ade1f6408f45f71 /src/providers
parent574061e65d3fb687b9cb2c757afa1fe92812245e (diff)
downloadsssd-7486dea9f5f7b2a6fbbacc6db740a82140b6377c.tar.gz
sssd-7486dea9f5f7b2a6fbbacc6db740a82140b6377c.tar.bz2
sssd-7486dea9f5f7b2a6fbbacc6db740a82140b6377c.zip
Fixing critical format string issues.
--missing arguments. --format '%s', but argument is integer. --wrong format string, examle: '%\n'
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/krb5/krb5_child.c4
-rw-r--r--src/providers/krb5/krb5_utils.c4
-rw-r--r--src/providers/ldap/ldap_init.c4
-rw-r--r--src/providers/ldap/sdap_async.c3
-rw-r--r--src/providers/ldap/sdap_async_connection.c4
-rw-r--r--src/providers/ldap/sdap_async_groups.c3
-rw-r--r--src/providers/ldap/sdap_async_initgroups_ad.c2
7 files changed, 15 insertions, 9 deletions
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c
index 831905af..4626f59f 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 52456893..1883d785 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 0884a85c..12b204c8 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 afa2904f..5eac1d43 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 39a3ce94..4f6986fc 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 cb30d4bb..dc7fba42 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 a3f6694a..c2dec373 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) {