summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa/ipa_hbac_rules.c
diff options
context:
space:
mode:
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>2014-02-12 10:12:04 -0500
committerJakub Hrozek <jhrozek@redhat.com>2014-02-12 22:30:55 +0100
commita3c8390d19593b1e5277d95bfb4ab206d4785150 (patch)
tree2eb4e5432f4f79a75589c03b1513b656879ebf9c /src/providers/ipa/ipa_hbac_rules.c
parentcc026fd9ba386f2197e3217940d597dcad1a26fe (diff)
downloadsssd-a3c8390d19593b1e5277d95bfb4ab206d4785150.tar.gz
sssd-a3c8390d19593b1e5277d95bfb4ab206d4785150.tar.xz
sssd-a3c8390d19593b1e5277d95bfb4ab206d4785150.zip
Make DEBUG macro invocations variadic
Use a script to update DEBUG macro invocations to use it as a variadic macro, supplying format string and its arguments directly, instead of wrapping them in parens. This script was used to update the code: grep -rwl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e \ 'use strict; use File::Slurp; my $text=read_file(\*STDIN); $text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs; print $text;' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/providers/ipa/ipa_hbac_rules.c')
-rw-r--r--src/providers/ipa/ipa_hbac_rules.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/providers/ipa/ipa_hbac_rules.c b/src/providers/ipa/ipa_hbac_rules.c
index 24caf1fd4..dcc5e7634 100644
--- a/src/providers/ipa/ipa_hbac_rules.c
+++ b/src/providers/ipa/ipa_hbac_rules.c
@@ -68,7 +68,7 @@ ipa_hbac_rule_info_send(TALLOC_CTX *mem_ctx,
const char **memberof_list;
if (ipa_host == NULL) {
- DEBUG(1, ("Missing host\n"));
+ DEBUG(1, "Missing host\n");
return NULL;
}
@@ -77,7 +77,7 @@ ipa_hbac_rule_info_send(TALLOC_CTX *mem_ctx,
ret = sysdb_attrs_get_string(ipa_host, SYSDB_ORIG_DN, &host_dn);
if (ret != EOK) {
- DEBUG(1, ("Could not identify IPA hostname\n"));
+ DEBUG(1, "Could not identify IPA hostname\n");
goto error;
}
@@ -86,7 +86,7 @@ ipa_hbac_rule_info_send(TALLOC_CTX *mem_ctx,
req = tevent_req_create(mem_ctx, &state, struct ipa_hbac_rule_state);
if (req == NULL) {
- DEBUG(1, ("tevent_req_create failed.\n"));
+ DEBUG(1, "tevent_req_create failed.\n");
return NULL;
}
@@ -144,7 +144,7 @@ ipa_hbac_rule_info_send(TALLOC_CTX *mem_ctx,
ret = sysdb_attrs_get_string_array(ipa_host, SYSDB_ORIG_MEMBEROF,
tmp_ctx, &memberof_list);
if (ret != EOK && ret != ENOENT) {
- DEBUG(1, ("Could not identify "));
+ DEBUG(1, "Could not identify ");
} if (ret == ENOENT) {
/* This host is not a member of any hostgroups */
memberof_list = talloc_array(tmp_ctx, const char *, 1);
@@ -224,9 +224,9 @@ ipa_hbac_rule_info_next(struct tevent_req *req,
return ENOMEM;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("Sending request for next search base: "
+ DEBUG(SSSDBG_TRACE_FUNC, "Sending request for next search base: "
"[%s][%d][%s]\n", base->basedn, base->scope,
- state->cur_filter));
+ state->cur_filter);
subreq = sdap_get_generic_send(state, state->ev, state->opts, state->sh,
base->basedn, base->scope,
@@ -236,7 +236,7 @@ ipa_hbac_rule_info_next(struct tevent_req *req,
SDAP_ENUM_SEARCH_TIMEOUT),
true);
if (subreq == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("sdap_get_generic_send failed.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "sdap_get_generic_send failed.\n");
return ENOMEM;
}
tevent_req_set_callback(subreq, ipa_hbac_rule_info_done, req);
@@ -262,7 +262,7 @@ ipa_hbac_rule_info_done(struct tevent_req *subreq)
&rule_count,
&rules);
if (ret != EOK) {
- DEBUG(3, ("Could not retrieve HBAC rules\n"));
+ DEBUG(3, "Could not retrieve HBAC rules\n");
goto fail;
}
@@ -293,7 +293,7 @@ ipa_hbac_rule_info_done(struct tevent_req *subreq)
} else if (ret != EOK) {
goto fail;
} else if (ret == EOK && state->rule_count == 0) {
- DEBUG(3, ("No rules apply to this host\n"));
+ DEBUG(3, "No rules apply to this host\n");
tevent_req_error(req, ENOENT);
return;
}