summaryrefslogtreecommitdiffstats
path: root/src/providers/dp_pam_data_util.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/dp_pam_data_util.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/dp_pam_data_util.c')
-rw-r--r--src/providers/dp_pam_data_util.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/providers/dp_pam_data_util.c b/src/providers/dp_pam_data_util.c
index 2bc5368f7..8b0ca88aa 100644
--- a/src/providers/dp_pam_data_util.c
+++ b/src/providers/dp_pam_data_util.c
@@ -65,19 +65,19 @@ struct pam_data *create_pam_data(TALLOC_CTX *mem_ctx)
pd = talloc_zero(mem_ctx, struct pam_data);
if (pd == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_zero failed.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero failed.\n");
goto failed;
}
pd->authtok = sss_authtok_new(pd);
if (pd->authtok == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_zero failed.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero failed.\n");
goto failed;
}
pd->newauthtok = sss_authtok_new(pd);
if (pd->newauthtok == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_zero failed.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero failed.\n");
goto failed;
}
@@ -174,23 +174,23 @@ errno_t copy_pam_data(TALLOC_CTX *mem_ctx, struct pam_data *src,
failed:
talloc_free(pd);
- DEBUG(1, ("copy_pam_data failed: (%d) %s.\n", ret, strerror(ret)));
+ DEBUG(1, "copy_pam_data failed: (%d) %s.\n", ret, strerror(ret));
return ret;
}
void pam_print_data(int l, struct pam_data *pd)
{
- DEBUG(l, ("command: %s\n", pamcmd2str(pd->cmd)));
- DEBUG(l, ("domain: %s\n", PAM_SAFE_ITEM(pd->domain)));
- DEBUG(l, ("user: %s\n", PAM_SAFE_ITEM(pd->user)));
- DEBUG(l, ("service: %s\n", PAM_SAFE_ITEM(pd->service)));
- DEBUG(l, ("tty: %s\n", PAM_SAFE_ITEM(pd->tty)));
- DEBUG(l, ("ruser: %s\n", PAM_SAFE_ITEM(pd->ruser)));
- DEBUG(l, ("rhost: %s\n", PAM_SAFE_ITEM(pd->rhost)));
- DEBUG(l, ("authtok type: %d\n", sss_authtok_get_type(pd->authtok)));
- DEBUG(l, ("newauthtok type: %d\n", sss_authtok_get_type(pd->newauthtok)));
- DEBUG(l, ("priv: %d\n", pd->priv));
- DEBUG(l, ("cli_pid: %d\n", pd->cli_pid));
+ DEBUG(l, "command: %s\n", pamcmd2str(pd->cmd));
+ DEBUG(l, "domain: %s\n", PAM_SAFE_ITEM(pd->domain));
+ DEBUG(l, "user: %s\n", PAM_SAFE_ITEM(pd->user));
+ DEBUG(l, "service: %s\n", PAM_SAFE_ITEM(pd->service));
+ DEBUG(l, "tty: %s\n", PAM_SAFE_ITEM(pd->tty));
+ DEBUG(l, "ruser: %s\n", PAM_SAFE_ITEM(pd->ruser));
+ DEBUG(l, "rhost: %s\n", PAM_SAFE_ITEM(pd->rhost));
+ DEBUG(l, "authtok type: %d\n", sss_authtok_get_type(pd->authtok));
+ DEBUG(l, "newauthtok type: %d\n", sss_authtok_get_type(pd->newauthtok));
+ DEBUG(l, "priv: %d\n", pd->priv);
+ DEBUG(l, "cli_pid: %d\n", pd->cli_pid);
}
int pam_add_response(struct pam_data *pd, enum response_type type,