summaryrefslogtreecommitdiffstats
path: root/src/responder/common
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/common
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/common')
-rw-r--r--src/responder/common/negcache.c62
-rw-r--r--src/responder/common/responder_cmd.c10
-rw-r--r--src/responder/common/responder_common.c196
-rw-r--r--src/responder/common/responder_dp.c80
-rw-r--r--src/responder/common/responder_get_domains.c40
5 files changed, 194 insertions, 194 deletions
diff --git a/src/responder/common/negcache.c b/src/responder/common/negcache.c
index d49a56d88..eaf9373ad 100644
--- a/src/responder/common/negcache.c
+++ b/src/responder/common/negcache.c
@@ -82,7 +82,7 @@ static int sss_ncache_check_str(struct sss_nc_ctx *ctx, char *str, int ttl)
char *ep;
int ret;
- DEBUG(8, ("Checking negative cache for [%s]\n", str));
+ DEBUG(8, "Checking negative cache for [%s]\n", str);
data.dptr = NULL;
@@ -157,13 +157,13 @@ static int sss_ncache_set_str(struct sss_nc_ctx *ctx,
ret = string_to_tdb_data(timest, &data);
if (ret != EOK) goto done;
- DEBUG(6, ("Adding [%s] to negative cache%s\n",
- str, permanent?" permanently":""));
+ DEBUG(6, "Adding [%s] to negative cache%s\n",
+ str, permanent?" permanently":"");
ret = tdb_store(ctx->tdb, key, data, TDB_REPLACE);
if (ret != 0) {
- DEBUG(1, ("Negative cache failed to set entry: [%s]\n",
- tdb_errorstr(ctx->tdb)));
+ DEBUG(1, "Negative cache failed to set entry: [%s]\n",
+ tdb_errorstr(ctx->tdb));
ret = EFAULT;
}
@@ -631,23 +631,23 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache,
filter_list[i],
&domainname, &name);
if (ret != EOK) {
- DEBUG(1, ("Invalid name in filterUsers list: [%s] (%d)\n",
- filter_list[i], ret));
+ DEBUG(1, "Invalid name in filterUsers list: [%s] (%d)\n",
+ filter_list[i], ret);
continue;
}
if (domainname && strcmp(domainname, dom->name)) {
- DEBUG(1, ("Mismatch between domain name (%s) and name "
+ DEBUG(1, "Mismatch between domain name (%s) and name "
"set in FQN (%s), skipping user %s\n",
- dom->name, domainname, name));
+ dom->name, domainname, name);
continue;
}
ret = sss_ncache_set_user(ncache, true, dom, name);
if (ret != EOK) {
- DEBUG(1, ("Failed to store permanent user filter for [%s]"
+ DEBUG(1, "Failed to store permanent user filter for [%s]"
" (%d [%s])\n", filter_list[i],
- ret, strerror(ret)));
+ ret, strerror(ret));
continue;
}
}
@@ -677,33 +677,33 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache,
rctx->default_domain, filter_list[i],
&domainname, &name);
if (ret != EOK) {
- DEBUG(1, ("Invalid name in filterUsers list: [%s] (%d)\n",
- filter_list[i], ret));
+ DEBUG(1, "Invalid name in filterUsers list: [%s] (%d)\n",
+ filter_list[i], ret);
continue;
}
if (domainname) {
dom = responder_get_domain(rctx, domainname);
if (!dom) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Invalid domain name [%s]\n", domainname));
+ "Invalid domain name [%s]\n", domainname);
continue;
}
ret = sss_ncache_set_user(ncache, true, dom, name);
if (ret != EOK) {
- DEBUG(1, ("Failed to store permanent user filter for [%s]"
+ DEBUG(1, "Failed to store permanent user filter for [%s]"
" (%d [%s])\n", filter_list[i],
- ret, strerror(ret)));
+ ret, strerror(ret));
continue;
}
} else {
for (dom = domain_list; dom; dom = get_next_domain(dom, false)) {
ret = sss_ncache_set_user(ncache, true, dom, name);
if (ret != EOK) {
- DEBUG(1, ("Failed to store permanent user filter for"
+ DEBUG(1, "Failed to store permanent user filter for"
" [%s:%s] (%d [%s])\n",
dom->name, filter_list[i],
- ret, strerror(ret)));
+ ret, strerror(ret));
continue;
}
}
@@ -729,23 +729,23 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache,
ret = sss_parse_name(tmpctx, dom->names, filter_list[i],
&domainname, &name);
if (ret != EOK) {
- DEBUG(1, ("Invalid name in filterGroups list: [%s] (%d)\n",
- filter_list[i], ret));
+ DEBUG(1, "Invalid name in filterGroups list: [%s] (%d)\n",
+ filter_list[i], ret);
continue;
}
if (domainname && strcmp(domainname, dom->name)) {
- DEBUG(1, ("Mismatch betwen domain name (%s) and name "
+ DEBUG(1, "Mismatch betwen domain name (%s) and name "
"set in FQN (%s), skipping group %s\n",
- dom->name, domainname, name));
+ dom->name, domainname, name);
continue;
}
ret = sss_ncache_set_group(ncache, true, dom, name);
if (ret != EOK) {
- DEBUG(1, ("Failed to store permanent group filter for [%s]"
+ DEBUG(1, "Failed to store permanent group filter for [%s]"
" (%d [%s])\n", filter_list[i],
- ret, strerror(ret)));
+ ret, strerror(ret));
continue;
}
}
@@ -775,33 +775,33 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache,
rctx->default_domain, filter_list[i],
&domainname, &name);
if (ret != EOK) {
- DEBUG(1, ("Invalid name in filterGroups list: [%s] (%d)\n",
- filter_list[i], ret));
+ DEBUG(1, "Invalid name in filterGroups list: [%s] (%d)\n",
+ filter_list[i], ret);
continue;
}
if (domainname) {
dom = responder_get_domain(rctx, domainname);
if (!dom) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Invalid domain name [%s]\n", domainname));
+ "Invalid domain name [%s]\n", domainname);
continue;
}
ret = sss_ncache_set_group(ncache, true, dom, name);
if (ret != EOK) {
- DEBUG(1, ("Failed to store permanent group filter for"
+ DEBUG(1, "Failed to store permanent group filter for"
" [%s] (%d [%s])\n", filter_list[i],
- ret, strerror(ret)));
+ ret, strerror(ret));
continue;
}
} else {
for (dom = domain_list; dom; dom = get_next_domain(dom, false)) {
ret = sss_ncache_set_group(ncache, true, dom, name);
if (ret != EOK) {
- DEBUG(1, ("Failed to store permanent group filter for"
+ DEBUG(1, "Failed to store permanent group filter for"
" [%s:%s] (%d [%s])\n",
dom->name, filter_list[i],
- ret, strerror(ret)));
+ ret, strerror(ret));
continue;
}
}
diff --git a/src/responder/common/responder_cmd.c b/src/responder/common/responder_cmd.c
index b7483d640..1297ab8ce 100644
--- a/src/responder/common/responder_cmd.c
+++ b/src/responder/common/responder_cmd.c
@@ -33,7 +33,7 @@ int sss_cmd_send_error(struct cli_ctx *cctx, int err)
sss_packet_get_cmd(cctx->creq->in),
&cctx->creq->out);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Cannot create new packet: %d\n", ret));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Cannot create new packet: %d\n", ret);
return ret;
}
@@ -117,7 +117,7 @@ int sss_cmd_get_version(struct cli_ctx *cctx)
sss_packet_get_body(cctx->creq->in, &req_body, &req_blen);
if (req_blen == sizeof(uint32_t)) {
memcpy(&client_version, req_body, sizeof(uint32_t));
- DEBUG(5, ("Received client version [%d].\n", client_version));
+ DEBUG(5, "Received client version [%d].\n", client_version);
i=0;
while(cli_protocol_version[i].version>0) {
@@ -143,7 +143,7 @@ int sss_cmd_get_version(struct cli_ctx *cctx)
? cctx->cli_protocol_version->version : 0;
SAFEALIGN_COPY_UINT32(body, &protocol_version, NULL);
- DEBUG(SSSDBG_FUNC_DATA, ("Offered version [%d].\n", protocol_version));
+ DEBUG(SSSDBG_FUNC_DATA, "Offered version [%d].\n", protocol_version);
sss_cmd_done(cctx, NULL);
return EOK;
@@ -229,8 +229,8 @@ void setent_notify(struct setent_req_list **list, errno_t err)
* request. Log a bug and continue.
*/
DEBUG(SSSDBG_FATAL_FAILURE,
- ("BUG: a callback did not free its request. "
- "May leak memory\n"));
+ "BUG: a callback did not free its request. "
+ "May leak memory\n");
/* Skip to the next since a memory leak is non-fatal */
*list = (*list)->next;
}
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index 8a9188707..5e6d94d32 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -59,8 +59,8 @@ static errno_t set_nonblocking(int fd)
ferr = fcntl(fd, F_SETFL, v | O_NONBLOCK);
if (ferr < 0) {
error = errno;
- DEBUG(0, ("Unable to set fd non-blocking: [%d][%s]\n",
- error, strerror(error)));
+ DEBUG(0, "Unable to set fd non-blocking: [%d][%s]\n",
+ error, strerror(error));
return error;
}
return EOK;
@@ -80,8 +80,8 @@ static errno_t set_close_on_exec(int fd)
ferr = fcntl(fd, F_SETFD, v | FD_CLOEXEC);
if (ferr < 0) {
error = errno;
- DEBUG(0, ("Unable to set fd close-on-exec: [%d][%s]\n",
- error, strerror(error)));
+ DEBUG(0, "Unable to set fd close-on-exec: [%d][%s]\n",
+ error, strerror(error));
return error;
}
return EOK;
@@ -94,13 +94,13 @@ static int client_destructor(struct cli_ctx *ctx)
if ((ctx->cfd > 0) && close(ctx->cfd) < 0) {
ret = errno;
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to close fd [%d]: [%s]\n",
- ctx->cfd, strerror(ret)));
+ "Failed to close fd [%d]: [%s]\n",
+ ctx->cfd, strerror(ret));
}
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Terminated client [%p][%d]\n",
- ctx, ctx->cfd));
+ "Terminated client [%p][%d]\n",
+ ctx, ctx->cfd);
return 0;
}
@@ -119,11 +119,11 @@ static errno_t get_client_cred(struct cli_ctx *cctx)
&client_cred_len);
if (ret != EOK) {
ret = errno;
- DEBUG(1, ("getsock failed [%d][%s].\n", ret, strerror(ret)));
+ DEBUG(1, "getsock failed [%d][%s].\n", ret, strerror(ret));
return ret;
}
if (client_cred_len != sizeof(struct ucred)) {
- DEBUG(1, ("getsockopt returned unexpected message size.\n"));
+ DEBUG(1, "getsockopt returned unexpected message size.\n");
return ENOMSG;
}
@@ -131,8 +131,8 @@ static errno_t get_client_cred(struct cli_ctx *cctx)
cctx->client_egid = client_cred.gid;
cctx->client_pid = client_cred.pid;
- DEBUG(9, ("Client creds: euid[%d] egid[%d] pid[%d].\n",
- cctx->client_euid, cctx->client_egid, cctx->client_pid));
+ DEBUG(9, "Client creds: euid[%d] egid[%d] pid[%d].\n",
+ cctx->client_euid, cctx->client_egid, cctx->client_pid);
#endif
return EOK;
@@ -171,14 +171,14 @@ errno_t csv_string_to_uid_array(TALLOC_CTX *mem_ctx, const char *cvs_string,
ret = split_on_separator(mem_ctx, cvs_string, ',', true, false,
&list, &list_size);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("split_on_separator failed [%d][%s].\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_OP_FAILURE, "split_on_separator failed [%d][%s].\n",
+ ret, strerror(ret));
goto done;
}
uids = talloc_array(mem_ctx, uint32_t, list_size);
if (uids == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_array failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_array failed.\n");
ret = ENOMEM;
goto done;
}
@@ -186,15 +186,15 @@ errno_t csv_string_to_uid_array(TALLOC_CTX *mem_ctx, const char *cvs_string,
if (allow_sss_loop) {
ret = unsetenv("_SSS_LOOPS");
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Failed to unset _SSS_LOOPS, getpwnam "
- "might not find sssd users.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Failed to unset _SSS_LOOPS, getpwnam "
+ "might not find sssd users.\n");
}
}
for (c = 0; c < list_size; c++) {
errno = 0;
if (*list[c] == '\0') {
- DEBUG(SSSDBG_OP_FAILURE, ("Empty list item.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Empty list item.\n");
ret = EINVAL;
goto done;
}
@@ -203,17 +203,17 @@ errno_t csv_string_to_uid_array(TALLOC_CTX *mem_ctx, const char *cvs_string,
if (errno != 0 || *endptr != '\0') {
ret = errno;
if (ret == ERANGE) {
- DEBUG(SSSDBG_OP_FAILURE, ("List item [%s] is out of range.\n",
- list[c]));
+ DEBUG(SSSDBG_OP_FAILURE, "List item [%s] is out of range.\n",
+ list[c]);
goto done;
}
errno = 0;
pwd = getpwnam(list[c]);
if (pwd == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("List item [%s] is neither a valid "
+ DEBUG(SSSDBG_OP_FAILURE, "List item [%s] is neither a valid "
"UID nor a user name which cloud be "
- "resolved by getpwnam().\n", list[c]));
+ "resolved by getpwnam().\n", list[c]);
ret = EINVAL;
goto done;
}
@@ -229,7 +229,7 @@ errno_t csv_string_to_uid_array(TALLOC_CTX *mem_ctx, const char *cvs_string,
done:
if(setenv("_SSS_LOOPS", "NO", 0) != 0) {
- DEBUG(SSSDBG_OP_FAILURE, ("Failed to set _SSS_LOOPS.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Failed to set _SSS_LOOPS.\n");
}
talloc_free(list);
if (ret != EOK) {
@@ -250,7 +250,7 @@ static void client_send(struct cli_ctx *cctx)
return;
}
if (ret != EOK) {
- DEBUG(0, ("Failed to send data, aborting client!\n"));
+ DEBUG(0, "Failed to send data, aborting client!\n");
talloc_free(cctx);
return;
}
@@ -278,7 +278,7 @@ static void client_recv(struct cli_ctx *cctx)
if (!cctx->creq) {
cctx->creq = talloc_zero(cctx, struct cli_request);
if (!cctx->creq) {
- DEBUG(0, ("Failed to alloc request, aborting client!\n"));
+ DEBUG(0, "Failed to alloc request, aborting client!\n");
talloc_free(cctx);
return;
}
@@ -288,7 +288,7 @@ static void client_recv(struct cli_ctx *cctx)
ret = sss_packet_new(cctx->creq, SSS_PACKET_MAX_RECV_SIZE,
0, &cctx->creq->in);
if (ret != EOK) {
- DEBUG(0, ("Failed to alloc request, aborting client!\n"));
+ DEBUG(0, "Failed to alloc request, aborting client!\n");
talloc_free(cctx);
return;
}
@@ -302,7 +302,7 @@ static void client_recv(struct cli_ctx *cctx)
/* execute command */
ret = client_cmd_execute(cctx, cctx->rctx->sss_cmds);
if (ret != EOK) {
- DEBUG(0, ("Failed to execute request, aborting client!\n"));
+ DEBUG(0, "Failed to execute request, aborting client!\n");
talloc_free(cctx);
}
/* past this point cctx can be freed at any time by callbacks
@@ -314,17 +314,17 @@ static void client_recv(struct cli_ctx *cctx)
break;
case EINVAL:
- DEBUG(6, ("Invalid data from client, closing connection!\n"));
+ DEBUG(6, "Invalid data from client, closing connection!\n");
talloc_free(cctx);
break;
case ENODATA:
- DEBUG(5, ("Client disconnected!\n"));
+ DEBUG(5, "Client disconnected!\n");
talloc_free(cctx);
break;
default:
- DEBUG(6, ("Failed to read request, aborting client!\n"));
+ DEBUG(6, "Failed to read request, aborting client!\n");
talloc_free(cctx);
}
@@ -344,8 +344,8 @@ static void client_fd_handler(struct tevent_context *ev,
ret = reset_idle_timer(cctx);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not create idle timer for client. "
- "This connection may not auto-terminate\n"));
+ "Could not create idle timer for client. "
+ "This connection may not auto-terminate\n");
/* Non-fatal, continue */
}
@@ -387,14 +387,14 @@ static void accept_fd_handler(struct tevent_context *ev,
if (accept_ctx->is_private) {
ret = stat(rctx->priv_sock_name, &stat_buf);
if (ret == -1) {
- DEBUG(1, ("stat on privileged pipe failed: [%d][%s].\n", errno,
- strerror(errno)));
+ DEBUG(1, "stat on privileged pipe failed: [%d][%s].\n", errno,
+ strerror(errno));
return;
}
if ( ! (stat_buf.st_uid == 0 && stat_buf.st_gid == 0 &&
(stat_buf.st_mode&(S_IFSOCK|S_IRUSR|S_IWUSR)) == stat_buf.st_mode)) {
- DEBUG(1, ("privileged pipe has an illegal status.\n"));
+ DEBUG(1, "privileged pipe has an illegal status.\n");
/* TODO: what is the best response to this condition? Terminate? */
return;
}
@@ -403,8 +403,8 @@ static void accept_fd_handler(struct tevent_context *ev,
cctx = talloc_zero(rctx, struct cli_ctx);
if (!cctx) {
struct sockaddr_un addr;
- DEBUG(0, ("Out of memory trying to setup client context%s!\n",
- accept_ctx->is_private ? " on privileged pipe": ""));
+ DEBUG(0, "Out of memory trying to setup client context%s!\n",
+ accept_ctx->is_private ? " on privileged pipe": "");
/* accept and close to signal the client we have a problem */
memset(&addr, 0, sizeof(addr));
len = sizeof(addr);
@@ -419,7 +419,7 @@ static void accept_fd_handler(struct tevent_context *ev,
len = sizeof(cctx->addr);
cctx->cfd = accept(fd, (struct sockaddr *)&cctx->addr, &len);
if (cctx->cfd == -1) {
- DEBUG(1, ("Accept failed [%s]\n", strerror(errno)));
+ DEBUG(1, "Accept failed [%s]\n", strerror(errno));
talloc_free(cctx);
return;
}
@@ -428,16 +428,16 @@ static void accept_fd_handler(struct tevent_context *ev,
ret = get_client_cred(cctx);
if (ret != EOK) {
- DEBUG(2, ("get_client_cred failed, "
- "client cred may not be available.\n"));
+ DEBUG(2, "get_client_cred failed, "
+ "client cred may not be available.\n");
}
if (rctx->allowed_uids_count != 0) {
if (cctx->client_euid == -1) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("allowed_uids configured, " \
+ DEBUG(SSSDBG_CRIT_FAILURE, "allowed_uids configured, " \
"but platform does not support " \
"reading peer credential from the " \
- "socket. Access denied.\n"));
+ "socket. Access denied.\n");
close(cctx->cfd);
talloc_free(cctx);
return;
@@ -447,10 +447,10 @@ static void accept_fd_handler(struct tevent_context *ev,
rctx->allowed_uids);
if (ret != EOK) {
if (ret == EACCES) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Access denied for uid [%d].\n",
- cctx->client_euid));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Access denied for uid [%d].\n",
+ cctx->client_euid);
} else {
- DEBUG(SSSDBG_OP_FAILURE, ("check_allowed_uids failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "check_allowed_uids failed.\n");
}
close(cctx->cfd);
talloc_free(cctx);
@@ -464,8 +464,8 @@ static void accept_fd_handler(struct tevent_context *ev,
close(cctx->cfd);
talloc_free(cctx);
DEBUG(SSSDBG_OP_FAILURE,
- ("Failed to queue client handler%s\n",
- accept_ctx->is_private ? " on privileged pipe" : ""));
+ "Failed to queue client handler%s\n",
+ accept_ctx->is_private ? " on privileged pipe" : "");
return;
}
@@ -478,14 +478,14 @@ static void accept_fd_handler(struct tevent_context *ev,
ret = reset_idle_timer(cctx);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not create idle timer for client. "
- "This connection may not auto-terminate\n"));
+ "Could not create idle timer for client. "
+ "This connection may not auto-terminate\n");
/* Non-fatal, continue */
}
DEBUG(SSSDBG_TRACE_FUNC,
- ("Client connected%s!\n",
- accept_ctx->is_private ? " to privileged pipe" : ""));
+ "Client connected%s!\n",
+ accept_ctx->is_private ? " to privileged pipe" : "");
return;
}
@@ -501,8 +501,8 @@ static errno_t reset_idle_timer(struct cli_ctx *cctx)
if (!cctx->idle) return ENOMEM;
DEBUG(SSSDBG_TRACE_ALL,
- ("Idle timer re-set for client [%p][%d]\n",
- cctx, cctx->cfd));
+ "Idle timer re-set for client [%p][%d]\n",
+ cctx, cctx->cfd);
return EOK;
}
@@ -517,8 +517,8 @@ static void idle_handler(struct tevent_context *ev,
talloc_get_type(data, struct cli_ctx);
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Terminating idle client [%p][%d]\n",
- cctx, cctx->cfd));
+ "Terminating idle client [%p][%d]\n",
+ cctx, cctx->cfd);
/* The cli_ctx destructor will handle the rest */
talloc_free(cctx);
@@ -543,7 +543,7 @@ static int sss_dp_init(struct resp_ctx *rctx,
/* Set up SBUS connection to the monitor */
ret = dp_get_sbus_address(be_conn, &be_conn->sbus_address, domain->name);
if (ret != EOK) {
- DEBUG(0, ("Could not locate DP address.\n"));
+ DEBUG(0, "Could not locate DP address.\n");
return ret;
}
ret = sbus_client_init(rctx, rctx->ev,
@@ -551,7 +551,7 @@ static int sss_dp_init(struct resp_ctx *rctx,
intf, &be_conn->conn,
NULL, rctx);
if (ret != EOK) {
- DEBUG(0, ("Failed to connect to monitor services.\n"));
+ DEBUG(0, "Failed to connect to monitor services.\n");
return ret;
}
@@ -562,7 +562,7 @@ static int sss_dp_init(struct resp_ctx *rctx,
DATA_PROVIDER_VERSION,
cli_name);
if (ret != EOK) {
- DEBUG(0, ("Failed to identify to the DP!\n"));
+ DEBUG(0, "Failed to identify to the DP!\n");
return ret;
}
@@ -641,11 +641,11 @@ static int set_unix_socket(struct resp_ctx *rctx)
unlink(rctx->sock_name);
if (bind(rctx->lfd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
- DEBUG(0,("Unable to bind on socket '%s'\n", rctx->sock_name));
+ DEBUG(0,"Unable to bind on socket '%s'\n", rctx->sock_name);
goto failed;
}
if (listen(rctx->lfd, 10) != 0) {
- DEBUG(0,("Unable to listen on socket '%s'\n", rctx->sock_name));
+ DEBUG(0,"Unable to listen on socket '%s'\n", rctx->sock_name);
goto failed;
}
@@ -658,7 +658,7 @@ static int set_unix_socket(struct resp_ctx *rctx)
TEVENT_FD_READ, accept_fd_handler,
accept_ctx);
if (!rctx->lfde) {
- DEBUG(0, ("Failed to queue handler on pipe\n"));
+ DEBUG(0, "Failed to queue handler on pipe\n");
goto failed;
}
}
@@ -691,11 +691,11 @@ static int set_unix_socket(struct resp_ctx *rctx)
unlink(rctx->priv_sock_name);
if (bind(rctx->priv_lfd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
- DEBUG(0,("Unable to bind on socket '%s'\n", rctx->priv_sock_name));
+ DEBUG(0,"Unable to bind on socket '%s'\n", rctx->priv_sock_name);
goto failed;
}
if (listen(rctx->priv_lfd, 10) != 0) {
- DEBUG(0,("Unable to listen on socket '%s'\n", rctx->priv_sock_name));
+ DEBUG(0,"Unable to listen on socket '%s'\n", rctx->priv_sock_name);
goto failed;
}
@@ -708,7 +708,7 @@ static int set_unix_socket(struct resp_ctx *rctx)
TEVENT_FD_READ, accept_fd_handler,
accept_ctx);
if (!rctx->priv_lfde) {
- DEBUG(0, ("Failed to queue handler on privileged pipe\n"));
+ DEBUG(0, "Failed to queue handler on privileged pipe\n");
goto failed;
}
}
@@ -733,7 +733,7 @@ static int sss_responder_ctx_destructor(void *ptr)
/* mark that we are shutting down the responder, so it is propagated
* into underlying contexts that are freed right before rctx */
- DEBUG(SSSDBG_TRACE_FUNC, ("Responder is being shut down\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Responder is being shut down\n");
rctx->shutting_down = true;
return 0;
@@ -759,7 +759,7 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
rctx = talloc_zero(mem_ctx, struct resp_ctx);
if (!rctx) {
- DEBUG(0, ("fatal error initializing resp_ctx\n"));
+ DEBUG(0, "fatal error initializing resp_ctx\n");
return ENOMEM;
}
rctx->ev = ev;
@@ -778,8 +778,8 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
&rctx->client_idle_timeout);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Cannot get the client idle timeout [%d]: %s\n",
- ret, strerror(ret)));
+ "Cannot get the client idle timeout [%d]: %s\n",
+ ret, strerror(ret));
goto fail;
}
@@ -793,19 +793,19 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
GET_DOMAINS_DEFAULT_TIMEOUT, &rctx->domains_timeout);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Cannnot get the default domain timeout [%d]: %s\n",
- ret, strerror(ret)));
+ "Cannnot get the default domain timeout [%d]: %s\n",
+ ret, strerror(ret));
goto fail;
}
if (rctx->domains_timeout < 0) {
- DEBUG(SSSDBG_CONF_SETTINGS, ("timeout can't be set to negative value, setting default\n"));
+ DEBUG(SSSDBG_CONF_SETTINGS, "timeout can't be set to negative value, setting default\n");
rctx->domains_timeout = GET_DOMAINS_DEFAULT_TIMEOUT;
}
ret = confdb_get_domains(rctx->cdb, &rctx->domains);
if (ret != EOK) {
- DEBUG(0, ("fatal error setting up domain map\n"));
+ DEBUG(0, "fatal error setting up domain map\n");
goto fail;
}
@@ -814,8 +814,8 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
&rctx->default_domain);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Cannnot get the default domain [%d]: %s\n",
- ret, strerror(ret)));
+ "Cannnot get the default domain [%d]: %s\n",
+ ret, strerror(ret));
goto fail;
}
@@ -823,7 +823,7 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
svc_name, svc_version, rctx,
&rctx->mon_conn);
if (ret != EOK) {
- DEBUG(0, ("fatal error setting up message bus\n"));
+ DEBUG(0, "fatal error setting up message bus\n");
goto fail;
}
@@ -831,8 +831,8 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
ret = sss_names_init(rctx->cdb, rctx->cdb, dom->name, &dom->names);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("fatal error initializing regex data for domain: %s\n",
- dom->name));
+ "fatal error initializing regex data for domain: %s\n",
+ dom->name);
goto fail;
}
@@ -843,7 +843,7 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
ret = sss_dp_init(rctx, dp_intf, cli_name, dom);
if (ret != EOK) {
- DEBUG(0, ("fatal error setting up backend connector\n"));
+ DEBUG(0, "fatal error setting up backend connector\n");
goto fail;
}
}
@@ -851,14 +851,14 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
ret = sysdb_init(rctx, rctx->domains, false);
if (ret != EOK) {
SYSDB_VERSION_ERROR_DAEMON(ret);
- DEBUG(0, ("fatal error initializing resp_ctx\n"));
+ DEBUG(0, "fatal error initializing resp_ctx\n");
goto fail;
}
/* after all initializations we are ready to listen on our socket */
ret = set_unix_socket(rctx);
if (ret != EOK) {
- DEBUG(0, ("fatal error initializing socket\n"));
+ DEBUG(0, "fatal error initializing socket\n");
goto fail;
}
@@ -866,11 +866,11 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
ret = sss_hash_create(rctx, 30, &rctx->dp_request_table);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Could not create hash table for the request queue\n"));
+ "Could not create hash table for the request queue\n");
goto fail;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("Responder Initialization complete\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Responder Initialization complete\n");
*responder_ctx = rctx;
return EOK;
@@ -918,8 +918,8 @@ responder_get_domain(struct resp_ctx *rctx, const char *name)
}
if (!ret_dom) {
- DEBUG(SSSDBG_OP_FAILURE, ("Unknown domain [%s], checking for "
- "possible subdomains!\n", name));
+ DEBUG(SSSDBG_OP_FAILURE, "Unknown domain [%s], checking for "
+ "possible subdomains!\n", name);
}
return ret_dom;
@@ -951,8 +951,8 @@ errno_t responder_get_domain_by_id(struct resp_ctx *rctx, const char *id,
if (IS_SUBDOMAIN(dom) &&
((time(NULL) - dom->parent->subdomains_last_checked.tv_sec) >
rctx->domains_timeout)) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Domain entry with id [%s] " \
- "is expired.\n", id));
+ DEBUG(SSSDBG_TRACE_FUNC, "Domain entry with id [%s] " \
+ "is expired.\n", id);
ret = EAGAIN;
goto done;
}
@@ -962,8 +962,8 @@ errno_t responder_get_domain_by_id(struct resp_ctx *rctx, const char *id,
}
if (ret_dom == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("Unknown domain id [%s], checking for "
- "possible subdomains!\n", id));
+ DEBUG(SSSDBG_OP_FAILURE, "Unknown domain id [%s], checking for "
+ "possible subdomains!\n", id);
ret = ENOENT;
} else {
*_ret_dom = ret_dom;
@@ -1000,8 +1000,8 @@ void responder_set_fd_limit(rlim_t fd_limit)
limret = setrlimit(RLIMIT_NOFILE, &new_limit);
if (limret == 0) {
DEBUG(SSSDBG_CONF_SETTINGS,
- ("Maximum file descriptors set to [%"SPRIrlim"]\n",
- new_limit.rlim_cur));
+ "Maximum file descriptors set to [%"SPRIrlim"]\n",
+ new_limit.rlim_cur);
return;
}
@@ -1013,8 +1013,8 @@ void responder_set_fd_limit(rlim_t fd_limit)
limret = getrlimit(RLIMIT_NOFILE, &current_limit);
if (limret == 0) {
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Current fd limit: [%"SPRIrlim"]\n",
- current_limit.rlim_cur));
+ "Current fd limit: [%"SPRIrlim"]\n",
+ current_limit.rlim_cur);
/* Choose the lesser of the requested and the hard limit */
if (current_limit.rlim_max < fd_limit) {
new_limit.rlim_cur = current_limit.rlim_max;
@@ -1026,16 +1026,16 @@ void responder_set_fd_limit(rlim_t fd_limit)
limret = setrlimit(RLIMIT_NOFILE, &new_limit);
if (limret == 0) {
DEBUG(SSSDBG_CONF_SETTINGS,
- ("Maximum file descriptors set to [%"SPRIrlim"]\n",
- new_limit.rlim_cur));
+ "Maximum file descriptors set to [%"SPRIrlim"]\n",
+ new_limit.rlim_cur);
} else {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not set new fd limits. Proceeding with "
- "[%"SPRIrlim"]\n", current_limit.rlim_cur));
+ "Could not set new fd limits. Proceeding with "
+ "[%"SPRIrlim"]\n", current_limit.rlim_cur);
}
} else {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not determine fd limits. "
- "Proceeding with system values\n"));
+ "Could not determine fd limits. "
+ "Proceeding with system values\n");
}
}
diff --git a/src/responder/common/responder_dp.c b/src/responder/common/responder_dp.c
index e73e1e6b6..396c80997 100644
--- a/src/responder/common/responder_dp.c
+++ b/src/responder/common/responder_dp.c
@@ -103,22 +103,22 @@ static int sss_dp_req_destructor(void *ptr)
*/
if (cb == sdp_req->cb_list) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("BUG: a callback did not free its request. "
- "May leak memory\n"));
+ "BUG: a callback did not free its request. "
+ "May leak memory\n");
/* Skip to the next since a memory leak is non-fatal */
sdp_req->cb_list = sdp_req->cb_list->next;
}
}
/* Destroy the hash entry */
- DEBUG(SSSDBG_TRACE_FUNC, ("Deleting request: [%s]\n", sdp_req->key->str));
+ DEBUG(SSSDBG_TRACE_FUNC, "Deleting request: [%s]\n", sdp_req->key->str);
hret = hash_delete(sdp_req->rctx->dp_request_table, sdp_req->key);
if (hret != HASH_SUCCESS) {
/* This should never happen */
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("BUG: Could not clear [%d:%lu:%s] from request queue: [%s]\n",
+ "BUG: Could not clear [%d:%lu:%s] from request queue: [%s]\n",
sdp_req->key->type, sdp_req->key->ul, sdp_req->key->str,
- hash_error_string(hret)));
+ hash_error_string(hret));
return -1;
}
@@ -142,18 +142,18 @@ void handle_requests_after_reconnect(struct resp_ctx *rctx)
struct sss_dp_req *sdp_req;
if (!rctx->dp_request_table) {
- DEBUG(7, ("No requests to handle after reconnect\n"));
+ DEBUG(7, "No requests to handle after reconnect\n");
return;
}
ret = hash_values(rctx->dp_request_table, &count, &values);
if (ret != HASH_SUCCESS) {
- DEBUG(1, ("hash_values failed, "
- "not all request might be handled after reconnect.\n"));
+ DEBUG(1, "hash_values failed, "
+ "not all request might be handled after reconnect.\n");
return;
}
- DEBUG(7, ("Will handle %lu requests after reconnect\n", count));
+ DEBUG(7, "Will handle %lu requests after reconnect\n", count);
for (i=0; i<count; i++) {
sdp_req = talloc_get_type(values[i].ptr, struct sss_dp_req);
talloc_free(sdp_req);
@@ -180,8 +180,8 @@ static int sss_dp_get_reply(DBusPendingCall *pending,
* here, something is seriously wrong and we should bail out.
*/
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Severe error. A reply callback was called but no reply "
- "was received and no timeout occurred\n"));
+ "Severe error. A reply callback was called but no reply "
+ "was received and no timeout occurred\n");
/* FIXME: Destroy this connection ? */
err = EIO;
@@ -197,17 +197,17 @@ static int sss_dp_get_reply(DBusPendingCall *pending,
DBUS_TYPE_STRING, err_msg,
DBUS_TYPE_INVALID);
if (!ret) {
- DEBUG(1,("Failed to parse message\n"));
+ DEBUG(1,"Failed to parse message\n");
/* FIXME: Destroy this connection ? */
if (dbus_error_is_set(&dbus_error)) dbus_error_free(&dbus_error);
err = EIO;
goto done;
}
DEBUG(SSSDBG_TRACE_LIBS,
- ("Got reply from Data Provider - "
+ "Got reply from Data Provider - "
"DP error code: %u errno: %u error message: %s\n",
(unsigned int)*dp_err, (unsigned int)*dp_ret,
- *err_msg ? *err_msg : "none"));
+ *err_msg ? *err_msg : "none");
break;
case DBUS_MESSAGE_TYPE_ERROR:
@@ -216,8 +216,8 @@ static int sss_dp_get_reply(DBusPendingCall *pending,
err = ETIME;
goto done;
}
- DEBUG(0,("The Data Provider returned an error [%s]\n",
- dbus_message_get_error_name(reply)));
+ DEBUG(0,"The Data Provider returned an error [%s]\n",
+ dbus_message_get_error_name(reply));
/* Falling through to default intentionally*/
default:
/*
@@ -284,7 +284,7 @@ sss_dp_issue_request(TALLOC_CTX *mem_ctx, struct resp_ctx *rctx,
goto fail;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("Issuing request for [%s]\n", key->str));
+ DEBUG(SSSDBG_TRACE_FUNC, "Issuing request for [%s]\n", key->str);
/* Check the hash for existing references to this request */
hret = hash_lookup(rctx->dp_request_table, key, &value);
@@ -292,7 +292,7 @@ sss_dp_issue_request(TALLOC_CTX *mem_ctx, struct resp_ctx *rctx,
case HASH_SUCCESS:
/* Request already in progress */
DEBUG(SSSDBG_TRACE_FUNC,
- ("Identical request in progress: [%s]\n", key->str));
+ "Identical request in progress: [%s]\n", key->str);
break;
case HASH_ERROR_KEY_NOT_FOUND:
@@ -301,7 +301,7 @@ sss_dp_issue_request(TALLOC_CTX *mem_ctx, struct resp_ctx *rctx,
*/
msg = msg_create(pvt);
if (!msg) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Cannot create D-Bus message\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Cannot create D-Bus message\n");
ret = EIO;
goto fail;
}
@@ -310,7 +310,7 @@ sss_dp_issue_request(TALLOC_CTX *mem_ctx, struct resp_ctx *rctx,
sidereq = sss_dp_internal_get_send(rctx, key, dom, msg);
dbus_message_unref(msg);
if (!sidereq) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Cannot send D-Bus message\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Cannot send D-Bus message\n");
ret = EIO;
goto fail;
}
@@ -325,7 +325,7 @@ sss_dp_issue_request(TALLOC_CTX *mem_ctx, struct resp_ctx *rctx,
sss_dp_req_timeout, sidereq);
if (!te) {
/* Nothing much we can do */
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory?!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory?!\n");
ret = ENOMEM;
goto fail;
}
@@ -334,7 +334,7 @@ sss_dp_issue_request(TALLOC_CTX *mem_ctx, struct resp_ctx *rctx,
hret = hash_lookup(rctx->dp_request_table, key, &value);
if (hret != HASH_SUCCESS) {
/* Something must have gone wrong with creating the request */
- DEBUG(SSSDBG_CRIT_FAILURE, ("The request has disappeared?\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "The request has disappeared?\n");
ret = EIO;
goto fail;
}
@@ -342,8 +342,8 @@ sss_dp_issue_request(TALLOC_CTX *mem_ctx, struct resp_ctx *rctx,
default:
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not query request list (%s)\n",
- hash_error_string(hret)));
+ "Could not query request list (%s)\n",
+ hash_error_string(hret));
ret = EIO;
goto fail;
}
@@ -351,7 +351,7 @@ sss_dp_issue_request(TALLOC_CTX *mem_ctx, struct resp_ctx *rctx,
/* Register this request for results */
sdp_req = talloc_get_type(value.ptr, struct sss_dp_req);
if (!sdp_req) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Could not retrieve DP request context\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Could not retrieve DP request context\n");
ret = EIO;
goto fail;
}
@@ -500,8 +500,8 @@ sss_dp_get_account_send(TALLOC_CTX *mem_ctx,
talloc_free(key);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Could not issue DP request [%d]: %s\n",
- ret, strerror(ret)));
+ "Could not issue DP request [%d]: %s\n",
+ ret, strerror(ret));
goto error;
}
@@ -581,7 +581,7 @@ sss_dp_get_account_msg(void *pvt)
filter = talloc_strdup(info, ENUM_INDICATOR);
}
if (!filter) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory?!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory?!\n");
return NULL;
}
@@ -591,14 +591,14 @@ sss_dp_get_account_msg(void *pvt)
DP_METHOD_GETACCTINFO);
if (msg == NULL) {
talloc_free(filter);
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory?!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory?!\n");
return NULL;
}
/* create the message */
DEBUG(SSSDBG_TRACE_FUNC,
- ("Creating request for [%s][%u][%d][%s]\n",
- info->dom->name, be_type, attrs, filter));
+ "Creating request for [%s][%u][%d][%s]\n",
+ info->dom->name, be_type, attrs, filter);
dbret = dbus_message_append_args(msg,
DBUS_TYPE_UINT32, &be_type,
@@ -608,7 +608,7 @@ sss_dp_get_account_msg(void *pvt)
DBUS_TYPE_INVALID);
talloc_free(filter);
if (!dbret) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to build message\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Failed to build message\n");
dbus_message_unref(msg);
return NULL;
}
@@ -683,8 +683,8 @@ sss_dp_internal_get_send(struct resp_ctx *rctx,
ret = sss_dp_get_domain_conn(rctx, dom->conn_name, &be_conn);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("BUG: The Data Provider connection for %s is not available!",
- dom->name));
+ "BUG: The Data Provider connection for %s is not available!",
+ dom->name);
ret = EIO;
goto error;
}
@@ -700,7 +700,7 @@ sss_dp_internal_get_send(struct resp_ctx *rctx,
* We can't communicate on this connection
*/
DEBUG(SSSDBG_CRIT_FAILURE,
- ("D-BUS send failed.\n"));
+ "D-BUS send failed.\n");
ret = EIO;
goto error;
}
@@ -709,12 +709,12 @@ sss_dp_internal_get_send(struct resp_ctx *rctx,
value.type = HASH_VALUE_PTR;
value.ptr = state->sdp_req;
- DEBUG(SSSDBG_TRACE_FUNC, ("Entering request [%s]\n", key->str));
+ DEBUG(SSSDBG_TRACE_FUNC, "Entering request [%s]\n", key->str);
hret = hash_enter(rctx->dp_request_table, key, &value);
if (hret != HASH_SUCCESS) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not store request query (%s)\n",
- hash_error_string(hret)));
+ "Could not store request query (%s)\n",
+ hash_error_string(hret));
ret = EIO;
goto error;
}
@@ -790,8 +790,8 @@ static void sss_dp_internal_get_done(DBusPendingCall *pending, void *ptr)
*/
if (cb == sdp_req->cb_list) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("BUG: a callback did not free its request. "
- "May leak memory\n"));
+ "BUG: a callback did not free its request. "
+ "May leak memory\n");
/* Skip to the next since a memory leak is non-fatal */
sdp_req->cb_list = sdp_req->cb_list->next;
}
diff --git a/src/responder/common/responder_get_domains.c b/src/responder/common/responder_get_domains.c
index a976d2728..ba9a0905f 100644
--- a/src/responder/common/responder_get_domains.c
+++ b/src/responder/common/responder_get_domains.c
@@ -97,13 +97,13 @@ sss_dp_get_domains_msg(void *pvt)
DP_INTERFACE,
DP_METHOD_GETDOMAINS);
if (msg == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory?!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory?!\n");
return NULL;
}
DEBUG(SSSDBG_TRACE_FUNC,
- ("Sending get domains request for [%s][%sforced][%s]\n",
- info->dom->name, info->force ? "" : "not ", info->hint));
+ "Sending get domains request for [%s][%sforced][%s]\n",
+ info->dom->name, info->force ? "" : "not ", info->hint);
/* Send the hint argument to provider as well. This will
* be useful for some cases of transitional trust where
@@ -114,7 +114,7 @@ sss_dp_get_domains_msg(void *pvt)
DBUS_TYPE_STRING, &info->hint,
DBUS_TYPE_INVALID);
if (!dbret) {
- DEBUG(SSSDBG_OP_FAILURE ,("Failed to build message\n"));
+ DEBUG(SSSDBG_OP_FAILURE ,"Failed to build message\n");
dbus_message_unref(msg);
return NULL;
}
@@ -163,7 +163,7 @@ struct tevent_req *sss_dp_get_domains_send(TALLOC_CTX *mem_ctx,
}
if (rctx->domains == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("No domains configured.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "No domains configured.\n");
ret = EINVAL;
goto immediately;
}
@@ -172,11 +172,11 @@ struct tevent_req *sss_dp_get_domains_send(TALLOC_CTX *mem_ctx,
ret = check_last_request(rctx, hint);
if (ret == EOK) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Last call was too recent, nothing to do!\n"));
+ "Last call was too recent, nothing to do!\n");
goto immediately;
} else if (ret != EAGAIN) {
- DEBUG(SSSDBG_TRACE_FUNC, ("check_domain_request failed with [%d][%s]\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_TRACE_FUNC, "check_domain_request failed with [%d][%s]\n",
+ ret, strerror(ret));
goto immediately;
}
}
@@ -246,8 +246,8 @@ sss_dp_get_domains_process(struct tevent_req *subreq)
ret = process_subdomains(state->dom);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("process_subdomains failed, "
- "trying next domain.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "process_subdomains failed, "
+ "trying next domain.\n");
goto fail;
}
@@ -289,8 +289,8 @@ process_subdomains(struct sss_domain_info *domain)
domain->domain_id == NULL) {
ret = sysdb_master_domain_update(domain);
if (ret != EOK) {
- DEBUG(SSSDBG_FUNC_DATA, ("sysdb_master_domain_get_info " \
- "failed.\n"));
+ DEBUG(SSSDBG_FUNC_DATA, "sysdb_master_domain_get_info " \
+ "failed.\n");
goto done;
}
}
@@ -300,7 +300,7 @@ process_subdomains(struct sss_domain_info *domain)
*/
ret = sysdb_update_subdomains(domain);
if (ret != EOK) {
- DEBUG(SSSDBG_FUNC_DATA, ("sysdb_update_subdomains failed.\n"));
+ DEBUG(SSSDBG_FUNC_DATA, "sysdb_update_subdomains failed.\n");
goto done;
}
@@ -315,8 +315,8 @@ process_subdomains(struct sss_domain_info *domain)
done:
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Failed to update sub-domains "
- "of domain [%s].\n", domain->name));
+ DEBUG(SSSDBG_OP_FAILURE, "Failed to update sub-domains "
+ "of domain [%s].\n", domain->name);
}
return ret;
@@ -337,8 +337,8 @@ static void set_time_of_last_request(struct resp_ctx *rctx)
ret = gettimeofday(&rctx->get_domains_last_call, NULL);
if (ret == -1) {
ret = errno;
- DEBUG(SSSDBG_TRACE_FUNC, ("gettimeofday failed [%d][%s].\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_TRACE_FUNC, "gettimeofday failed [%d][%s].\n",
+ ret, strerror(ret));
}
}
@@ -380,7 +380,7 @@ static void get_domains_at_startup_done(struct tevent_req *req)
ret = sss_dp_get_domains_recv(req);
talloc_free(req);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_dp_get_domains request failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_dp_get_domains request failed.\n");
}
return;
@@ -397,7 +397,7 @@ static void get_domains_at_startup(struct tevent_context *ev,
req = sss_dp_get_domains_send(rctx, rctx, true, NULL);
if (req == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_dp_get_domains_send failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_dp_get_domains_send failed.\n");
return;
}
@@ -413,7 +413,7 @@ errno_t schedule_get_domains_task(TALLOC_CTX *mem_ctx,
imm = tevent_create_immediate(mem_ctx);
if (imm == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("tevent_create_immediate failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "tevent_create_immediate failed.\n");
return ENOMEM;
}