summaryrefslogtreecommitdiff
path: root/src/providers/ldap
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-07-17 12:41:33 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-09-11 19:44:54 +0200
commit0e65abe5cf2abf5d4b431cf6bd161b419f07901d (patch)
treeaf685729a48d4f1874113f25011484022337b13f /src/providers/ldap
parent71e234151ddc6b50576364c30bda2b72264b1083 (diff)
downloadsssd-0e65abe5cf2abf5d4b431cf6bd161b419f07901d.tar.gz
sssd-0e65abe5cf2abf5d4b431cf6bd161b419f07901d.tar.bz2
sssd-0e65abe5cf2abf5d4b431cf6bd161b419f07901d.zip
Fix formating of variables with type: size_t
Diffstat (limited to 'src/providers/ldap')
-rw-r--r--src/providers/ldap/ldap_child.c6
-rw-r--r--src/providers/ldap/ldap_id_cleanup.c4
-rw-r--r--src/providers/ldap/sdap_access.c9
-rw-r--r--src/providers/ldap/sdap_async_autofs.c8
-rw-r--r--src/providers/ldap/sdap_async_groups.c19
-rw-r--r--src/providers/ldap/sdap_async_groups_ad.c2
-rw-r--r--src/providers/ldap/sdap_async_initgroups.c17
-rw-r--r--src/providers/ldap/sdap_async_initgroups_ad.c2
-rw-r--r--src/providers/ldap/sdap_async_nested_groups.c2
-rw-r--r--src/providers/ldap/sdap_async_netgroups.c10
-rw-r--r--src/providers/ldap/sdap_async_services.c8
-rw-r--r--src/providers/ldap/sdap_async_sudo.c2
-rw-r--r--src/providers/ldap/sdap_async_users.c5
-rw-r--r--src/providers/ldap/sdap_child_helpers.c2
14 files changed, 53 insertions, 43 deletions
diff --git a/src/providers/ldap/ldap_child.c b/src/providers/ldap/ldap_child.c
index 9d82e7cf..19c838da 100644
--- a/src/providers/ldap/ldap_child.c
+++ b/src/providers/ldap/ldap_child.c
@@ -57,7 +57,7 @@ static errno_t unpack_buffer(uint8_t *buf, size_t size,
size_t p = 0;
uint32_t len;
- DEBUG(SSSDBG_TRACE_LIBS, ("total buffer size: %d\n", size));
+ DEBUG(SSSDBG_TRACE_LIBS, ("total buffer size: %zu\n", size));
/* realm_str size and length */
SAFEALIGN_COPY_UINT32_CHECK(&len, buf + p, size, &p);
@@ -112,7 +112,7 @@ static int pack_buffer(struct response *r, int result, krb5_error_code krberr,
r->size = 2 * sizeof(uint32_t) + sizeof(krb5_error_code) +
len + sizeof(time_t);
- DEBUG(SSSDBG_TRACE_INTERNAL, ("response size: %d\n",r->size));
+ DEBUG(SSSDBG_TRACE_INTERNAL, ("response size: %zu\n",r->size));
r->buf = talloc_array(r, uint8_t, r->size);
if(!r->buf) {
@@ -540,7 +540,7 @@ int main(int argc, const char *argv[])
}
if (written != resp->size) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Expected to write %d bytes, wrote %d\n",
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Expected to write %zu bytes, wrote %zu\n",
resp->size, written));
goto fail;
}
diff --git a/src/providers/ldap/ldap_id_cleanup.c b/src/providers/ldap/ldap_id_cleanup.c
index eb4d42fe..06cdae0a 100644
--- a/src/providers/ldap/ldap_id_cleanup.c
+++ b/src/providers/ldap/ldap_id_cleanup.c
@@ -226,7 +226,7 @@ static int cleanup_users(struct sdap_options *opts,
goto done;
}
- DEBUG(4, ("Found %d expired user entries!\n", count));
+ DEBUG(SSSDBG_FUNC_DATA, ("Found %zu expired user entries!\n", count));
if (count == 0) {
ret = EOK;
@@ -348,7 +348,7 @@ static int cleanup_groups(TALLOC_CTX *memctx,
goto done;
}
- DEBUG(4, ("Found %d expired group entries!\n", count));
+ DEBUG(SSSDBG_FUNC_DATA, ("Found %zu expired group entries!\n", count));
if (count == 0) {
ret = EOK;
diff --git a/src/providers/ldap/sdap_access.c b/src/providers/ldap/sdap_access.c
index b381fc40..9ea90775 100644
--- a/src/providers/ldap/sdap_access.c
+++ b/src/providers/ldap/sdap_access.c
@@ -464,8 +464,9 @@ static bool nds_check_time_map(const struct ldb_val *time_map)
}
if (time_map->length != 42) {
- DEBUG(4, ("Allowed time map has the wrong size, "
- "got [%d], expected 42.\n", time_map->length));
+ DEBUG(SSSDBG_FUNC_DATA,
+ ("Allowed time map has the wrong size, "
+ "got [%zu], expected 42.\n", time_map->length));
return true;
}
@@ -477,7 +478,7 @@ static bool nds_check_time_map(const struct ldb_val *time_map)
if (map_index > 335) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unexpected index value [%d] for time map.\n", map_index));
+ ("Unexpected index value [%zu] for time map.\n", map_index));
return true;
}
@@ -485,7 +486,7 @@ static bool nds_check_time_map(const struct ldb_val *time_map)
if (q.quot > 41 || q.quot < 0 || q.rem > 7 || q.rem < 0) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unexpected result of div(), [%d][%d][%d].\n",
+ ("Unexpected result of div(), [%zu][%d][%d].\n",
map_index, q.quot, q.rem));
return true;
}
diff --git a/src/providers/ldap/sdap_async_autofs.c b/src/providers/ldap/sdap_async_autofs.c
index ae70e703..4886150f 100644
--- a/src/providers/ldap/sdap_async_autofs.c
+++ b/src/providers/ldap/sdap_async_autofs.c
@@ -394,7 +394,7 @@ automntmaps_process_members_done(struct tevent_req *subreq)
DEBUG(SSSDBG_TRACE_INTERNAL, ("No more search bases to try\n"));
DEBUG(SSSDBG_TRACE_FUNC,
- ("Search for autofs entries, returned %d results.\n",
+ ("Search for autofs entries, returned %zu results.\n",
state->entries_count));
tevent_req_done(req);
@@ -549,7 +549,7 @@ sdap_get_automntmap_process(struct tevent_req *subreq)
}
DEBUG(SSSDBG_TRACE_FUNC,
- ("Search for autofs maps, returned %d results.\n", state->count));
+ ("Search for autofs maps, returned %zu results.\n", state->count));
if (state->count == 0) {
/* No maps found in this search */
@@ -801,7 +801,7 @@ sdap_autofs_setautomntent_save(struct tevent_req *req)
if (!tmp_ctx) return ENOMEM;
DEBUG(SSSDBG_TRACE_LIBS,
- ("Got %d map entries from LDAP\n", state->entries_count));
+ ("Got %zu map entries from LDAP\n", state->entries_count));
if (state->entries_count == 0) {
/* No entries for this map in LDAP.
* We need to ensure that there are no entries
@@ -866,7 +866,7 @@ sdap_autofs_setautomntent_save(struct tevent_req *req)
goto done;
}
- DEBUG(SSSDBG_TRACE_LIBS, ("Got %d map entries from sysdb\n", count));
+ DEBUG(SSSDBG_TRACE_LIBS, ("Got %zu map entries from sysdb\n", count));
if (count == 0) {
/* No map members for this map in sysdb currently */
sysdb_entrylist = NULL;
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index bec27e0a..2ce1d5dd 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -377,7 +377,7 @@ sdap_process_ghost_members(struct sysdb_attrs *attrs,
ghostel->num_values = gh->num_values;
cnt = ghostel->num_values + memberel->num_values;
- DEBUG(SSSDBG_TRACE_FUNC, ("Group has %d members\n", cnt));
+ DEBUG(SSSDBG_TRACE_FUNC, ("Group has %zu members\n", cnt));
/* Now process RFC2307bis ghost hash table */
if (ghosts && cnt > 0) {
@@ -1072,8 +1072,9 @@ sdap_process_missing_member_2307bis(struct tevent_req *req,
if (grp_state->check_count > GROUPMEMBER_REQ_PARALLEL) {
DEBUG(7, (" queueing search for: %s\n", user_dn));
if (!grp_state->queued_members) {
- DEBUG(7, ("Allocating queue for %d members\n",
- num_users - grp_state->check_count));
+ DEBUG(SSSDBG_TRACE_LIBS,
+ ("Allocating queue for %zu members\n",
+ num_users - grp_state->check_count));
grp_state->queued_members = talloc_array(grp_state, char *,
num_users - grp_state->check_count + 1);
@@ -1349,7 +1350,7 @@ static void sdap_process_group_members(struct tevent_req *subreq)
uint8_t* name_string;
state->check_count--;
- DEBUG(9, ("Members remaining: %d\n", state->check_count));
+ DEBUG(SSSDBG_TRACE_ALL, ("Members remaining: %zu\n", state->check_count));
ret = sdap_get_generic_recv(subreq, state, &count, &usr_attrs);
talloc_zfree(subreq);
@@ -1358,7 +1359,8 @@ static void sdap_process_group_members(struct tevent_req *subreq)
}
if (count != 1) {
ret = EINVAL;
- DEBUG(7, ("Expected one user entry and got %d\n", count));
+ DEBUG(SSSDBG_TRACE_LIBS,
+ ("Expected one user entry and got %zu\n", count));
goto next;
}
ret = sysdb_attrs_get_el(usr_attrs[0],
@@ -1584,7 +1586,8 @@ static void sdap_get_groups_process(struct tevent_req *subreq)
return;
}
- DEBUG(6, ("Search for groups, returned %d results.\n", count));
+ DEBUG(SSSDBG_TRACE_FUNC,
+ ("Search for groups, returned %zu results.\n", count));
if (!state->enumeration && count > 1) {
DEBUG(SSSDBG_MINOR_FAILURE,
@@ -1747,7 +1750,7 @@ static void sdap_get_groups_done(struct tevent_req *subreq)
}
state->check_count--;
- DEBUG(9, ("Groups remaining: %d\n", state->check_count));
+ DEBUG(SSSDBG_TRACE_ALL, ("Groups remaining: %zu\n", state->check_count));
if (state->check_count == 0) {
@@ -1765,7 +1768,7 @@ static void sdap_get_groups_done(struct tevent_req *subreq)
tevent_req_error(req, ret);
return;
}
- DEBUG(9, ("Saving %d Groups - Done\n", state->count));
+ DEBUG(SSSDBG_TRACE_ALL, ("Saving %zu Groups - Done\n", state->count));
sysret = sysdb_transaction_commit(state->sysdb);
if (sysret != EOK) {
DEBUG(0, ("Couldn't commit transaction\n"));
diff --git a/src/providers/ldap/sdap_async_groups_ad.c b/src/providers/ldap/sdap_async_groups_ad.c
index 1268f7e7..9b61c697 100644
--- a/src/providers/ldap/sdap_async_groups_ad.c
+++ b/src/providers/ldap/sdap_async_groups_ad.c
@@ -189,7 +189,7 @@ sdap_get_ad_match_rule_members_step(struct tevent_req *subreq)
}
DEBUG(SSSDBG_TRACE_LIBS,
- ("Search for users returned %d results\n", count));
+ ("Search for users returned %zu results\n", count));
/* Add this batch of users to the list */
if (count > 0) {
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
index aa0ea4c1..a0df82ca 100644
--- a/src/providers/ldap/sdap_async_initgroups.c
+++ b/src/providers/ldap/sdap_async_initgroups.c
@@ -954,8 +954,9 @@ static void sdap_initgr_nested_search(struct tevent_req *subreq)
groups[0]);
state->groups_cur++;
} else {
- DEBUG(2, ("Search for group %s, returned %d results. Skipping\n",
- state->group_dns[state->cur], count));
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("Search for group %s, returned %zu results. Skipping\n",
+ state->group_dns[state->cur], count));
}
state->cur++;
@@ -1619,7 +1620,7 @@ static void sdap_initgr_rfc2307bis_process(struct tevent_req *subreq)
return;
}
DEBUG(SSSDBG_TRACE_LIBS,
- ("Found %d parent groups for user [%s]\n", count, state->name));
+ ("Found %zu parent groups for user [%s]\n", count, state->name));
/* Add this batch of groups to the list */
if (count > 0) {
@@ -2128,7 +2129,8 @@ struct tevent_req *rfc2307bis_nested_groups_send(
struct sdap_rfc2307bis_nested_ctx *state;
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("About to process %d groups in nesting level %d\n", num_groups, nesting));
+ ("About to process %zu groups in nesting level %zu\n",
+ num_groups, nesting));
req = tevent_req_create(mem_ctx, &state,
struct sdap_rfc2307bis_nested_ctx);
@@ -2376,7 +2378,7 @@ static void rfc2307bis_nested_groups_process(struct tevent_req *subreq)
}
DEBUG(SSSDBG_TRACE_LIBS,
- ("Found %d parent groups of [%s]\n", count, state->orig_dn));
+ ("Found %zu parent groups of [%s]\n", count, state->orig_dn));
ngr = state->processed_groups[state->group_iter];
/* Add this batch of groups to the list */
@@ -2405,7 +2407,7 @@ static void rfc2307bis_nested_groups_process(struct tevent_req *subreq)
ngr->ldap_parents[ngr->parents_count] = NULL;
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Total of %d direct parents after this iteration\n",
+ ("Total of %zu direct parents after this iteration\n",
ngr->parents_count));
}
@@ -2727,7 +2729,8 @@ static void sdap_get_initgr_user(struct tevent_req *subreq)
return;
}
} else if (count != 1) {
- DEBUG(2, ("Expected one user entry and got %d\n", count));
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("Expected one user entry and got %zu\n", count));
tevent_req_error(req, EINVAL);
return;
}
diff --git a/src/providers/ldap/sdap_async_initgroups_ad.c b/src/providers/ldap/sdap_async_initgroups_ad.c
index e5649a2b..efaa247d 100644
--- a/src/providers/ldap/sdap_async_initgroups_ad.c
+++ b/src/providers/ldap/sdap_async_initgroups_ad.c
@@ -212,7 +212,7 @@ sdap_get_ad_match_rule_initgroups_step(struct tevent_req *subreq)
}
DEBUG(SSSDBG_TRACE_LIBS,
- ("Search for users returned %d results\n", count));
+ ("Search for users returned %zu results\n", count));
/* Add this batch of groups to the list */
if (count > 0) {
diff --git a/src/providers/ldap/sdap_async_nested_groups.c b/src/providers/ldap/sdap_async_nested_groups.c
index 0147a607..6e705661 100644
--- a/src/providers/ldap/sdap_async_nested_groups.c
+++ b/src/providers/ldap/sdap_async_nested_groups.c
@@ -2036,7 +2036,7 @@ sdap_nested_group_deref_direct_process(struct tevent_req *subreq)
goto done;
}
- DEBUG(SSSDBG_TRACE_INTERNAL, ("Received %d dereference results, "
+ DEBUG(SSSDBG_TRACE_INTERNAL, ("Received %zu dereference results, "
"about to process them\n", num_entries));
/*
diff --git a/src/providers/ldap/sdap_async_netgroups.c b/src/providers/ldap/sdap_async_netgroups.c
index 81e53c84..099955a6 100644
--- a/src/providers/ldap/sdap_async_netgroups.c
+++ b/src/providers/ldap/sdap_async_netgroups.c
@@ -492,8 +492,9 @@ static void netgr_translate_members_ldap_done(struct tevent_req *subreq)
}
break;
default:
- DEBUG(1, ("Unexpected number of results [%d] for base search.\n",
- count));
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("Unexpected number of results [%zu] for base search.\n",
+ count));
}
if (state->dn_item->cn == NULL) {
@@ -661,7 +662,8 @@ static void sdap_get_netgroups_process(struct tevent_req *subreq)
return;
}
- DEBUG(6, ("Search for netgroups, returned %d results.\n", state->count));
+ DEBUG(SSSDBG_TRACE_FUNC,
+ ("Search for netgroups, returned %zu results.\n", state->count));
if (state->count == 0) {
/* No netgroups found in this search */
@@ -725,7 +727,7 @@ static void netgr_translate_members_done(struct tevent_req *subreq)
}
}
- DEBUG(9, ("Saving %d Netgroups - Done\n", state->count));
+ DEBUG(SSSDBG_TRACE_ALL, ("Saving %zu Netgroups - Done\n", state->count));
tevent_req_done(req);
}
diff --git a/src/providers/ldap/sdap_async_services.c b/src/providers/ldap/sdap_async_services.c
index d637d22e..c4245f05 100644
--- a/src/providers/ldap/sdap_async_services.c
+++ b/src/providers/ldap/sdap_async_services.c
@@ -177,7 +177,7 @@ sdap_get_services_process(struct tevent_req *subreq)
}
DEBUG(SSSDBG_TRACE_FUNC,
- ("Search for services, returned %d results.\n",
+ ("Search for services, returned %zu results.\n",
count));
if (state->enumeration || count == 0) {
@@ -240,7 +240,7 @@ sdap_get_services_process(struct tevent_req *subreq)
}
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Saving %d services - Done\n", state->count));
+ ("Saving %zu services - Done\n", state->count));
tevent_req_done(req);
}
@@ -292,10 +292,10 @@ sdap_save_services(TALLOC_CTX *mem_ctx,
* Just report the failure to save and go on */
if (ret) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Failed to store service %d. Ignoring.\n", i));
+ ("Failed to store service %zu. Ignoring.\n", i));
} else {
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Service [%lu/%lu] processed!\n", i, num_services));
+ ("Service [%zu/%zu] processed!\n", i, num_services));
}
if (usn_value) {
diff --git a/src/providers/ldap/sdap_async_sudo.c b/src/providers/ldap/sdap_async_sudo.c
index ed4cf75a..0d4882bd 100644
--- a/src/providers/ldap/sdap_async_sudo.c
+++ b/src/providers/ldap/sdap_async_sudo.c
@@ -477,7 +477,7 @@ static void sdap_sudo_refresh_load_done(struct tevent_req *subreq)
goto done;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("Received %d rules\n", rules_count));
+ DEBUG(SSSDBG_TRACE_FUNC, ("Received %zu rules\n", rules_count));
/* start transaction */
ret = sysdb_transaction_start(state->sysdb);
diff --git a/src/providers/ldap/sdap_async_users.c b/src/providers/ldap/sdap_async_users.c
index 353dc399..860e8fea 100644
--- a/src/providers/ldap/sdap_async_users.c
+++ b/src/providers/ldap/sdap_async_users.c
@@ -697,7 +697,8 @@ static void sdap_get_users_process(struct tevent_req *subreq)
return;
}
- DEBUG(6, ("Search for users, returned %d results.\n", count));
+ DEBUG(SSSDBG_TRACE_FUNC,
+ ("Search for users, returned %zu results.\n", count));
if (state->enumeration || count == 0) {
/* No users found in this search or enumerating */
@@ -758,7 +759,7 @@ static void sdap_get_users_process(struct tevent_req *subreq)
return;
}
- DEBUG(9, ("Saving %d Users - Done\n", state->count));
+ DEBUG(SSSDBG_TRACE_ALL, ("Saving %zu Users - Done\n", state->count));
tevent_req_done(req);
}
diff --git a/src/providers/ldap/sdap_child_helpers.c b/src/providers/ldap/sdap_child_helpers.c
index e5731344..9aaff785 100644
--- a/src/providers/ldap/sdap_child_helpers.c
+++ b/src/providers/ldap/sdap_child_helpers.c
@@ -160,7 +160,7 @@ static errno_t create_tgt_req_send_buffer(TALLOC_CTX *mem_ctx,
buf->size += strlen(keytab_name);
}
- DEBUG(7, ("buffer size: %d\n", buf->size));
+ DEBUG(SSSDBG_TRACE_FUNC, ("buffer size: %zu\n", buf->size));
buf->data = talloc_size(buf, buf->size);
if (buf->data == NULL) {