summaryrefslogtreecommitdiffstats
path: root/src/responder/pam/pamsrv.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/responder/pam/pamsrv.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/responder/pam/pamsrv.c')
-rw-r--r--src/responder/pam/pamsrv.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/responder/pam/pamsrv.c b/src/responder/pam/pamsrv.c
index 2e6afd087..3806d763e 100644
--- a/src/responder/pam/pamsrv.c
+++ b/src/responder/pam/pamsrv.c
@@ -82,7 +82,7 @@ static void pam_dp_reconnect_init(struct sbus_connection *conn, int status, void
/* Did we reconnect successfully? */
if (status == SBUS_RECONNECT_SUCCESS) {
- DEBUG(1, ("Reconnected to the Data Provider.\n"));
+ DEBUG(1, "Reconnected to the Data Provider.\n");
/* Identify ourselves to the data provider */
ret = dp_common_send_id(be_conn->conn,
@@ -96,8 +96,8 @@ static void pam_dp_reconnect_init(struct sbus_connection *conn, int status, void
}
/* Handle failure */
- DEBUG(0, ("Could not reconnect to %s provider.\n",
- be_conn->domain->name));
+ DEBUG(0, "Could not reconnect to %s provider.\n",
+ be_conn->domain->name);
/* FIXME: kill the frontend and let the monitor restart it ? */
/* pam_shutdown(rctx); */
@@ -127,7 +127,7 @@ static int pam_process_init(TALLOC_CTX *mem_ctx,
"PAM", &pam_dp_interface,
&rctx);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("sss_process_init() failed\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "sss_process_init() failed\n");
return ret;
}
@@ -147,7 +147,7 @@ static int pam_process_init(TALLOC_CTX *mem_ctx,
ret = confdb_get_int(pctx->rctx->cdb, CONFDB_PAM_CONF_ENTRY,
CONFDB_SERVICE_RECON_RETRIES, 3, &max_retries);
if (ret != EOK) {
- DEBUG(0, ("Failed to set up automatic reconnection\n"));
+ DEBUG(0, "Failed to set up automatic reconnection\n");
goto done;
}
@@ -172,7 +172,7 @@ static int pam_process_init(TALLOC_CTX *mem_ctx,
ret = sss_ncache_init(pctx, &pctx->ncache);
if (ret != EOK) {
- DEBUG(0, ("fatal error initializing negative cache\n"));
+ DEBUG(0, "fatal error initializing negative cache\n");
goto done;
}
@@ -185,8 +185,8 @@ static int pam_process_init(TALLOC_CTX *mem_ctx,
ret = sss_hash_create(pctx, 10, &pctx->id_table);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Could not create initgroups hash table: [%s]",
- strerror(ret)));
+ "Could not create initgroups hash table: [%s]",
+ strerror(ret));
goto done;
}
@@ -198,14 +198,14 @@ static int pam_process_init(TALLOC_CTX *mem_ctx,
&fd_limit);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Failed to set up file descriptor limit\n"));
+ "Failed to set up file descriptor limit\n");
goto done;
}
responder_set_fd_limit(fd_limit);
ret = schedule_get_domains_task(rctx, rctx->ev, rctx);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("schedule_get_domains_tasks failed.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "schedule_get_domains_tasks failed.\n");
goto done;
}
@@ -258,7 +258,7 @@ int main(int argc, const char *argv[])
ret = die_if_parent_died();
if (ret != EOK) {
/* This is not fatal, don't return */
- DEBUG(2, ("Could not set up to exit when parent process does\n"));
+ DEBUG(2, "Could not set up to exit when parent process does\n");
}
ret = pam_process_init(main_ctx,