summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/autofs/autofssrv.c30
-rw-r--r--src/responder/autofs/autofssrv_cmd.c202
-rw-r--r--src/responder/autofs/autofssrv_dp.c14
-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
-rw-r--r--src/responder/nss/nsssrv.c70
-rw-r--r--src/responder/nss/nsssrv_cmd.c566
-rw-r--r--src/responder/nss/nsssrv_mmap_cache.c88
-rw-r--r--src/responder/nss/nsssrv_netgroup.c122
-rw-r--r--src/responder/nss/nsssrv_private.h4
-rw-r--r--src/responder/nss/nsssrv_services.c140
-rw-r--r--src/responder/pac/pacsrv.c26
-rw-r--r--src/responder/pac/pacsrv_cmd.c182
-rw-r--r--src/responder/pac/pacsrv_utils.c80
-rw-r--r--src/responder/pam/pam_LOCAL_domain.c36
-rw-r--r--src/responder/pam/pam_helpers.c16
-rw-r--r--src/responder/pam/pamsrv.c22
-rw-r--r--src/responder/pam/pamsrv_cmd.c138
-rw-r--r--src/responder/pam/pamsrv_dp.c24
-rw-r--r--src/responder/ssh/sshsrv.c30
-rw-r--r--src/responder/ssh/sshsrv_cmd.c94
-rw-r--r--src/responder/ssh/sshsrv_dp.c14
-rw-r--r--src/responder/sudo/sudosrv.c24
-rw-r--r--src/responder/sudo/sudosrv_cmd.c50
-rw-r--r--src/responder/sudo/sudosrv_dp.c16
-rw-r--r--src/responder/sudo/sudosrv_get_sudorules.c134
-rw-r--r--src/responder/sudo/sudosrv_query.c40
30 files changed, 1275 insertions, 1275 deletions
diff --git a/src/responder/autofs/autofssrv.c b/src/responder/autofs/autofssrv.c
index edd6f4202..12f318eee 100644
--- a/src/responder/autofs/autofssrv.c
+++ b/src/responder/autofs/autofssrv.c
@@ -70,8 +70,8 @@ autofs_get_config(struct autofs_ctx *actx,
CONFDB_AUTOFS_MAP_NEG_TIMEOUT, 15,
&actx->neg_timeout);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Cannot read %s from configuration [%d]: %s\n",
- CONFDB_AUTOFS_MAP_NEG_TIMEOUT, ret, strerror(ret)));
+ DEBUG(SSSDBG_OP_FAILURE, "Cannot read %s from configuration [%d]: %s\n",
+ CONFDB_AUTOFS_MAP_NEG_TIMEOUT, ret, strerror(ret));
return ret;
}
@@ -87,7 +87,7 @@ autofs_dp_reconnect_init(struct sbus_connection *conn,
/* Did we reconnect successfully? */
if (status == SBUS_RECONNECT_SUCCESS) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Reconnected to the Data Provider.\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Reconnected to the Data Provider.\n");
/* Identify ourselves to the data provider */
ret = dp_common_send_id(be_conn->conn,
@@ -101,8 +101,8 @@ autofs_dp_reconnect_init(struct sbus_connection *conn,
}
/* Failed to reconnect */
- DEBUG(SSSDBG_FATAL_FAILURE, ("Could not reconnect to %s provider.\n",
- be_conn->domain->name));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Could not reconnect to %s provider.\n",
+ be_conn->domain->name);
}
static int autofs_clean_hash_table(DBusMessage *message,
@@ -116,7 +116,7 @@ static int autofs_clean_hash_table(DBusMessage *message,
ret = autofs_orphan_maps(actx);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Could not invalidate maps\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Could not invalidate maps\n");
return ret;
}
@@ -148,20 +148,20 @@ autofs_process_init(TALLOC_CTX *mem_ctx,
&autofs_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;
}
autofs_ctx = talloc_zero(rctx, struct autofs_ctx);
if (!autofs_ctx) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("fatal error initializing autofs_ctx\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "fatal error initializing autofs_ctx\n");
ret = ENOMEM;
goto fail;
}
ret = autofs_get_config(autofs_ctx, cdb);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Cannot read autofs configuration\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Cannot read autofs configuration\n");
goto fail;
}
@@ -175,7 +175,7 @@ autofs_process_init(TALLOC_CTX *mem_ctx,
3, &max_retries);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Failed to set up automatic reconnection\n"));
+ "Failed to set up automatic reconnection\n");
goto fail;
}
@@ -189,18 +189,18 @@ autofs_process_init(TALLOC_CTX *mem_ctx,
autofs_map_hash_delete_cb, NULL);
if (hret != HASH_SUCCESS) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to initialize automount maps hash table\n"));
+ "Unable to initialize automount maps hash table\n");
ret = EIO;
goto fail;
}
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 fail;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("autofs Initialization complete\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "autofs Initialization complete\n");
return EOK;
fail:
@@ -250,8 +250,8 @@ int main(int argc, const char *argv[])
ret = die_if_parent_died();
if (ret != EOK) {
/* This is not fatal, don't return */
- DEBUG(SSSDBG_OP_FAILURE, ("Could not set up to exit "
- "when parent process does\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Could not set up to exit "
+ "when parent process does\n");
}
ret = autofs_process_init(main_ctx,
diff --git a/src/responder/autofs/autofssrv_cmd.c b/src/responder/autofs/autofssrv_cmd.c
index a56003c97..4c9f5cf7d 100644
--- a/src/responder/autofs/autofssrv_cmd.c
+++ b/src/responder/autofs/autofssrv_cmd.c
@@ -110,7 +110,7 @@ autofs_orphan_maps(struct autofs_ctx *actx)
for (i = 0; i < mcount; i++) {
hret = hash_delete(actx->maps, &maps[i]);
if (hret != HASH_SUCCESS) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Could not delete key from hash\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "Could not delete key from hash\n");
continue;
}
}
@@ -139,8 +139,8 @@ get_autofs_map(struct autofs_ctx *actx,
}
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unexpected error reading from autofs map hash [%d][%s]\n",
- hret, hash_error_string(hret)));
+ "Unexpected error reading from autofs map hash [%d][%s]\n",
+ hret, hash_error_string(hret));
return EIO;
}
@@ -158,7 +158,7 @@ autofs_map_hash_delete_cb(hash_entry_t *item,
map = talloc_get_type(item->value.ptr, struct autofs_map_ctx);
if (!map) {
- DEBUG(SSSDBG_OP_FAILURE, ("Invalid autofs map\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Invalid autofs map\n");
return;
}
@@ -176,7 +176,7 @@ set_autofs_map(struct autofs_ctx *actx,
int hret;
if (map->mapname == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Missing autofs map name.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Missing autofs map name.\n");
return EINVAL;
}
@@ -188,9 +188,9 @@ set_autofs_map(struct autofs_ctx *actx,
hret = hash_enter(actx->maps, &key, &value);
if (hret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to add hash table entry for [%s]", key.str));
+ "Unable to add hash table entry for [%s]", key.str);
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Hash error [%d][%s]", hret, hash_error_string(hret)));
+ "Hash error [%d][%s]", hret, hash_error_string(hret));
return EIO;
}
talloc_steal(actx->maps, map);
@@ -208,8 +208,8 @@ autofs_map_hash_remove(TALLOC_CTX *ctx)
talloc_get_type(ctx, struct autofs_map_ctx);
if (map->map_table == NULL) {
- DEBUG(SSSDBG_TRACE_LIBS, ("autofs map [%s] was already removed\n",
- map->mapname));
+ DEBUG(SSSDBG_TRACE_LIBS, "autofs map [%s] was already removed\n",
+ map->mapname);
return 0;
}
@@ -220,8 +220,8 @@ autofs_map_hash_remove(TALLOC_CTX *ctx)
hret = hash_delete(map->map_table, &key);
if (hret != HASH_SUCCESS) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not remove key from table! [%d][%s]\n",
- hret, hash_error_string(hret)));
+ "Could not remove key from table! [%d][%s]\n",
+ hret, hash_error_string(hret));
return -1;
}
return 0;
@@ -246,7 +246,7 @@ sss_autofs_cmd_setautomntent(struct cli_ctx *client)
const char *rawname;
struct tevent_req *req;
- DEBUG(SSSDBG_TRACE_INTERNAL, ("sss_autofs_cmd_setautomntent\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "sss_autofs_cmd_setautomntent\n");
cmdctx = talloc_zero(client, struct autofs_cmd_ctx);
if (!cmdctx) {
@@ -270,12 +270,12 @@ sss_autofs_cmd_setautomntent(struct cli_ctx *client)
rawname = (const char *)body;
DEBUG(SSSDBG_TRACE_FUNC,
- ("Got request for automount map named %s\n", rawname));
+ "Got request for automount map named %s\n", rawname);
req = setautomntent_send(cmdctx, rawname, cmdctx);
if (!req) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Fatal error calling setautomntent_send\n"));
+ "Fatal error calling setautomntent_send\n");
ret = EIO;
goto done;
}
@@ -296,12 +296,12 @@ static void sss_autofs_cmd_setautomntent_done(struct tevent_req *req)
uint8_t *body;
size_t blen;
- DEBUG(SSSDBG_TRACE_INTERNAL, ("setautomntent done\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "setautomntent done\n");
reqret = setautomntent_recv(req);
talloc_zfree(req);
if (reqret != EOK && reqret != ENOENT) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("setautomntent_recv failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "setautomntent_recv failed\n");
autofs_cmd_done(cmdctx, reqret);
return;
}
@@ -312,15 +312,15 @@ static void sss_autofs_cmd_setautomntent_done(struct tevent_req *req)
&cmdctx->cctx->creq->out);
if (ret == EOK) {
if (reqret == ENOENT) {
- DEBUG(SSSDBG_TRACE_FUNC, ("setautomntent did not find requested map\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "setautomntent did not find requested map\n");
/* Notify the caller that this entry wasn't found */
sss_cmd_empty_packet(cmdctx->cctx->creq->out);
} else {
- DEBUG(SSSDBG_TRACE_FUNC, ("setautomntent found data\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "setautomntent found data\n");
packet = cmdctx->cctx->creq->out;
ret = sss_packet_grow(packet, 2*sizeof(uint32_t));
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Couldn't grow the packet\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Couldn't grow the packet\n");
talloc_free(cmdctx);
return;
}
@@ -338,7 +338,7 @@ static void sss_autofs_cmd_setautomntent_done(struct tevent_req *req)
return;
}
- DEBUG(SSSDBG_CRIT_FAILURE, ("Error creating packet\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Error creating packet\n");
return;
}
@@ -396,8 +396,8 @@ set_autofs_map_lifetime(uint32_t lifetime,
map);
if (!te) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not set up life timer for autofs maps. "
- "Entries may become stale.\n"));
+ "Could not set up life timer for autofs maps. "
+ "Entries may become stale.\n");
}
}
@@ -424,14 +424,14 @@ setautomntent_send(TALLOC_CTX *mem_ctx,
req = tevent_req_create(mem_ctx, &state, struct setautomntent_state);
if (!req) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Could not create tevent request for setautomntent\n"));
+ "Could not create tevent request for setautomntent\n");
return NULL;
}
state->cmdctx = cmdctx;
dctx = talloc_zero(state, struct autofs_dom_ctx);
if (!dctx) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Out of memory\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Out of memory\n");
ret = ENOMEM;
goto fail;
}
@@ -443,13 +443,13 @@ setautomntent_send(TALLOC_CTX *mem_ctx,
&domname, &state->mapname);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Invalid name received [%s]\n", rawname));
+ "Invalid name received [%s]\n", rawname);
goto fail;
}
DEBUG(SSSDBG_TRACE_FUNC,
- ("Requesting info for automount map [%s] from [%s]\n",
- state->mapname, domname?domname:"<ALL>"));
+ "Requesting info for automount map [%s] from [%s]\n",
+ state->mapname, domname?domname:"<ALL>");
if (domname) {
dctx->domain = responder_get_domain(client->rctx, domname);
@@ -487,13 +487,13 @@ setautomntent_send(TALLOC_CTX *mem_ctx,
if (state->map->ready) {
if (state->map->found) {
DEBUG(SSSDBG_TRACE_LIBS,
- ("Map %s is ready to be processed\n", state->mapname));
+ "Map %s is ready to be processed\n", state->mapname);
tevent_req_done(req);
tevent_req_post(req, actx->rctx->ev);
return req;
} else {
DEBUG(SSSDBG_TRACE_LIBS,
- ("Map %s was marked as nonexistent\n", state->mapname));
+ "Map %s was marked as nonexistent\n", state->mapname);
tevent_req_error(req, ENOENT);
tevent_req_post(req, actx->rctx->ev);
return req;
@@ -504,8 +504,8 @@ setautomntent_send(TALLOC_CTX *mem_ctx,
* Register for notification when it's ready
*/
DEBUG(SSSDBG_TRACE_LIBS,
- ("Map %s is being looked up, registering for notification\n",
- state->mapname));
+ "Map %s is being looked up, registering for notification\n",
+ state->mapname);
ret = autofs_setent_add_ref(state, state->map, req);
if (ret != EOK) {
goto fail;
@@ -513,7 +513,7 @@ setautomntent_send(TALLOC_CTX *mem_ctx,
/* Will return control below */
} else if (ret == ENOENT) {
DEBUG(SSSDBG_TRACE_LIBS,
- ("Map %s needs to be looked up\n", state->mapname));
+ "Map %s needs to be looked up\n", state->mapname);
state->map = talloc_zero(actx, struct autofs_map_ctx);
if (!state->map) {
@@ -567,11 +567,11 @@ setautomntent_send(TALLOC_CTX *mem_ctx,
ret = lookup_automntmap_step(lookup_ctx);
if (ret == EAGAIN) {
- DEBUG(SSSDBG_TRACE_INTERNAL, ("lookup_automntmap_step "
- "is refreshing the cache, re-entering the mainloop\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "lookup_automntmap_step "
+ "is refreshing the cache, re-entering the mainloop\n");
return req;
} else if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Could not get data from cache\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Could not get data from cache\n");
talloc_free(state->map);
ret = ENOMEM;
goto fail;
@@ -582,8 +582,8 @@ setautomntent_send(TALLOC_CTX *mem_ctx,
return req;
} else {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unexpected error from get_autofs_map [%d]: %s\n",
- ret, strerror(ret)));
+ "Unexpected error from get_autofs_map [%d]: %s\n",
+ ret, strerror(ret));
goto fail;
}
@@ -606,7 +606,7 @@ setautomntent_get_autofs_map(struct autofs_ctx *actx,
/* Iterate over the hash and remove all maps */
ret = autofs_orphan_maps(actx);
if (ret != EOK) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Could not remove existing maps from hash\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "Could not remove existing maps from hash\n");
}
return ENOENT;
}
@@ -647,12 +647,12 @@ lookup_automntmap_step(struct setautomntent_lookup_ctx *lookup_ctx)
/* make sure to update the dctx if we changed domain */
dctx->domain = dom;
- DEBUG(SSSDBG_TRACE_FUNC, ("Requesting info for [%s@%s]\n",
- lookup_ctx->mapname, dom->name));
+ DEBUG(SSSDBG_TRACE_FUNC, "Requesting info for [%s@%s]\n",
+ lookup_ctx->mapname, dom->name);
sysdb = dom->sysdb;
if (sysdb == NULL) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Fatal: Sysdb CTX not found for this domain!\n"));
+ "Fatal: Sysdb CTX not found for this domain!\n");
return EIO;
}
@@ -661,15 +661,15 @@ lookup_automntmap_step(struct setautomntent_lookup_ctx *lookup_ctx)
ret = sysdb_get_map_byname(dctx, dom, lookup_ctx->mapname,
&dctx->map);
if (ret != EOK && ret != ENOENT) {
- DEBUG(SSSDBG_OP_FAILURE, ("Could not check cache\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Could not check cache\n");
return ret;
} else if (ret == ENOENT) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("No automount map [%s] in cache for domain [%s]\n",
- lookup_ctx->mapname, dom->name));
+ "No automount map [%s] in cache for domain [%s]\n",
+ lookup_ctx->mapname, dom->name);
if (!dctx->check_provider) {
if (dctx->cmd_ctx->check_next) {
- DEBUG(SSSDBG_TRACE_INTERNAL, ("Moving on to next domain\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "Moving on to next domain\n");
dom = get_next_domain(dom, false);
continue;
}
@@ -680,13 +680,13 @@ lookup_automntmap_step(struct setautomntent_lookup_ctx *lookup_ctx)
ret = get_autofs_map(lookup_ctx->actx, lookup_ctx->mapname, &map);
if (ret != EOK) {
/* Something really bad happened! */
- DEBUG(SSSDBG_CRIT_FAILURE, ("Autofs map entry was lost!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Autofs map entry was lost!\n");
return ret;
}
if (dctx->map == NULL && !dctx->check_provider) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Autofs map not found, setting negative cache\n"));
+ "Autofs map not found, setting negative cache\n");
map->ready = true;
map->found = false;
set_autofs_map_lifetime(lookup_ctx->actx->neg_timeout, lookup_ctx, map);
@@ -697,12 +697,12 @@ lookup_automntmap_step(struct setautomntent_lookup_ctx *lookup_ctx)
ret = lookup_automntmap_update_cache(lookup_ctx);
if (ret == EAGAIN) {
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Looking up automount maps from the DP\n"));
+ "Looking up automount maps from the DP\n");
return EAGAIN;
} else if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Error looking up automount maps [%d]: %s\n",
- ret, strerror(ret)));
+ "Error looking up automount maps [%d]: %s\n",
+ ret, strerror(ret));
return ret;
}
}
@@ -715,8 +715,8 @@ lookup_automntmap_step(struct setautomntent_lookup_ctx *lookup_ctx)
&map->entries);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Error looking automount map entries [%d]: %s\n",
- ret, strerror(ret)));
+ "Error looking automount map entries [%d]: %s\n",
+ ret, strerror(ret));
map->ready = true;
map->found = false;
set_autofs_map_lifetime(lookup_ctx->actx->neg_timeout, lookup_ctx, map);
@@ -726,7 +726,7 @@ lookup_automntmap_step(struct setautomntent_lookup_ctx *lookup_ctx)
map->map = talloc_steal(map, dctx->map);
DEBUG(SSSDBG_TRACE_FUNC,
- ("setautomntent done for map %s\n", lookup_ctx->mapname));
+ "setautomntent done for map %s\n", lookup_ctx->mapname);
map->ready = true;
map->found = true;
set_autofs_map_lifetime(dom->autofsmap_timeout, lookup_ctx, map);
@@ -782,10 +782,10 @@ lookup_automntmap_update_cache(struct setautomntent_lookup_ctx *lookup_ctx)
/* if we have any reply let's check cache validity */
ret = sss_cmd_check_cache(dctx->map, 0, cache_expire);
if (ret == EOK) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Cached entry is valid, returning..\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Cached entry is valid, returning..\n");
return EOK;
} else if (ret != EAGAIN && ret != ENOENT) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Error checking cache: %d\n", ret));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Error checking cache: %d\n", ret);
goto error;
}
}
@@ -806,7 +806,7 @@ lookup_automntmap_update_cache(struct setautomntent_lookup_ctx *lookup_ctx)
SSS_DP_AUTOFS, lookup_ctx->mapname);
if (!req) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Out of memory sending data provider request\n"));
+ "Out of memory sending data provider request\n");
ret = ENOMEM;
goto error;
}
@@ -829,7 +829,7 @@ lookup_automntmap_update_cache(struct setautomntent_lookup_ctx *lookup_ctx)
error:
ret = autofs_cmd_send_error(lookup_ctx->dctx->cmd_ctx, ret);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Fatal error, killing connection!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Fatal error, killing connection!\n");
talloc_free(lookup_ctx->cctx);
return ret;
}
@@ -854,7 +854,7 @@ static void autofs_dp_send_map_req_done(struct tevent_req *req)
&err_msg);
talloc_free(req);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Fatal error, killing connection!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Fatal error, killing connection!\n");
talloc_free(lookup_ctx->cctx);
return;
}
@@ -872,10 +872,10 @@ static void lookup_automntmap_cache_updated(uint16_t err_maj, uint32_t err_min,
if (err_maj) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to get information from Data Provider\n"
+ "Unable to get information from Data Provider\n"
"Error: %u, %u, %s\n"
"Will try to return what we have in cache\n",
- (unsigned int)err_maj, (unsigned int)err_min, err_msg));
+ (unsigned int)err_maj, (unsigned int)err_min, err_msg);
/* Loop to the next domain if possible */
if (dctx->cmd_ctx->check_next && get_next_domain(dctx->domain, false)) {
dctx->domain = get_next_domain(dctx->domain, false);
@@ -925,7 +925,7 @@ sss_autofs_cmd_getautomntent(struct cli_ctx *client)
size_t c = 0;
struct tevent_req *req;
- DEBUG(SSSDBG_TRACE_INTERNAL, ("sss_autofs_cmd_getautomntent\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "sss_autofs_cmd_getautomntent\n");
cmdctx = talloc_zero(client, struct autofs_cmd_ctx);
if (!cmdctx) {
@@ -935,7 +935,7 @@ sss_autofs_cmd_getautomntent(struct cli_ctx *client)
actx = talloc_get_type(client->rctx->pvt_ctx, struct autofs_ctx);
if (!actx) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Missing autofs context\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Missing autofs context\n");
return EIO;
}
@@ -967,15 +967,15 @@ sss_autofs_cmd_getautomntent(struct cli_ctx *client)
SAFEALIGN_COPY_UINT32_CHECK(&cmdctx->max_entries, body+c+namelen+1, blen, &c);
DEBUG(SSSDBG_TRACE_FUNC,
- ("Requested data of map %s cursor %d max entries %d\n",
- cmdctx->mapname, cmdctx->cursor, cmdctx->max_entries));
+ "Requested data of map %s cursor %d max entries %d\n",
+ cmdctx->mapname, cmdctx->cursor, cmdctx->max_entries);
ret = get_autofs_map(actx, cmdctx->mapname, &map);
if (ret == ENOENT) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Performing implicit setautomntent\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Performing implicit setautomntent\n");
req = setautomntent_send(cmdctx, cmdctx->mapname, cmdctx);
if (req == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("setautomntent_send failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "setautomntent_send failed\n");
ret = EIO;
goto done;
}
@@ -985,16 +985,16 @@ sss_autofs_cmd_getautomntent(struct cli_ctx *client)
goto done;
} else if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("An unexpected error occurred: [%d][%s]\n",
- ret, strerror(ret)));
+ "An unexpected error occurred: [%d][%s]\n",
+ ret, strerror(ret));
goto done;
}
if (map->ready == false) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Performing implicit setautomntent\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Performing implicit setautomntent\n");
req = setautomntent_send(cmdctx, cmdctx->mapname, cmdctx);
if (req == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("setautomntent_send failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "setautomntent_send failed\n");
ret = EIO;
goto done;
}
@@ -1003,13 +1003,13 @@ sss_autofs_cmd_getautomntent(struct cli_ctx *client)
ret = EOK;
goto done;
} else if (map->found == false) {
- DEBUG(SSSDBG_TRACE_FUNC, ("negative cache hit\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "negative cache hit\n");
ret = ENOENT;
goto done;
}
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("returning entries for [%s]\n", map->mapname));
+ "returning entries for [%s]\n", map->mapname);
ret = getautomntent_process(cmdctx, map, cmdctx->cursor, cmdctx->max_entries);
@@ -1031,9 +1031,9 @@ getautomntent_implicit_done(struct tevent_req *req)
talloc_zfree(req);
if (ret != EOK) {
if (ret != ENOENT) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("setautomntent_recv failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "setautomntent_recv failed\n");
} else {
- DEBUG(SSSDBG_MINOR_FAILURE, ("No such map\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "No such map\n");
}
goto done;
}
@@ -1041,13 +1041,13 @@ getautomntent_implicit_done(struct tevent_req *req)
ret = get_autofs_map(actx, cmdctx->mapname, &map);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Cannot get map after setautomntent succeeded?\n"));
+ "Cannot get map after setautomntent succeeded?\n");
goto done;
}
if (map->ready == false) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Map not ready after setautomntent succeeded\n"));
+ "Map not ready after setautomntent succeeded\n");
goto done;
}
@@ -1081,7 +1081,7 @@ getautomntent_process(struct autofs_cmd_ctx *cmdctx,
if (!map->map || !map->entries || !map->entries[0] ||
cursor >= map->entry_count) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("No entries found\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "No entries found\n");
ret = sss_cmd_empty_packet(client->creq->out);
if (ret != EOK) {
return autofs_cmd_done(cmdctx, ret);
@@ -1092,7 +1092,7 @@ getautomntent_process(struct autofs_cmd_ctx *cmdctx,
/* allocate memory for number of entries in the packet */
ret = sss_packet_grow(client->creq->out, sizeof(uint32_t));
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Cannot grow packet\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Cannot grow packet\n");
goto done;
}
@@ -1109,7 +1109,7 @@ getautomntent_process(struct autofs_cmd_ctx *cmdctx,
ret = fill_autofs_entry(entry, client->creq->out, &rp);
if (ret != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Cannot fill entry %d/%d, skipping\n", i, stop));
+ "Cannot fill entry %d/%d, skipping\n", i, stop);
continue;
}
nentries++;
@@ -1145,7 +1145,7 @@ fill_autofs_entry(struct ldb_message *entry, struct sss_packet *packet, size_t *
key = ldb_msg_find_attr_as_string(entry, SYSDB_AUTOFS_ENTRY_KEY, NULL);
value = ldb_msg_find_attr_as_string(entry, SYSDB_AUTOFS_ENTRY_VALUE, NULL);
if (!key || !value) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Incomplete entry\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "Incomplete entry\n");
return EINVAL;
}
@@ -1155,7 +1155,7 @@ fill_autofs_entry(struct ldb_message *entry, struct sss_packet *packet, size_t *
ret = sss_packet_grow(packet, len);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Cannot grow packet\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Cannot grow packet\n");
return ret;
}
@@ -1203,7 +1203,7 @@ sss_autofs_cmd_getautomntbyname(struct cli_ctx *client)
size_t c = 0;
struct tevent_req *req;
- DEBUG(SSSDBG_TRACE_INTERNAL, ("sss_autofs_cmd_getautomntbyname\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "sss_autofs_cmd_getautomntbyname\n");
cmdctx = talloc_zero(client, struct autofs_cmd_ctx);
if (!cmdctx) {
@@ -1213,7 +1213,7 @@ sss_autofs_cmd_getautomntbyname(struct cli_ctx *client)
actx = talloc_get_type(client->rctx->pvt_ctx, struct autofs_ctx);
if (!actx) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Missing autofs context\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Missing autofs context\n");
return EIO;
}
@@ -1267,14 +1267,14 @@ sss_autofs_cmd_getautomntbyname(struct cli_ctx *client)
}
DEBUG(SSSDBG_TRACE_FUNC,
- ("Requested data of map %s key %s\n", cmdctx->mapname, cmdctx->key));
+ "Requested data of map %s key %s\n", cmdctx->mapname, cmdctx->key);
ret = get_autofs_map(actx, cmdctx->mapname, &map);
if (ret == ENOENT) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Performing implicit setautomntent\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Performing implicit setautomntent\n");
req = setautomntent_send(cmdctx, cmdctx->mapname, cmdctx);
if (req == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("setautomntent_send failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "setautomntent_send failed\n");
ret = EIO;
goto done;
}
@@ -1284,16 +1284,16 @@ sss_autofs_cmd_getautomntbyname(struct cli_ctx *client)
goto done;
} else if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("An unexpected error occurred: [%d][%s]\n",
- ret, strerror(ret)));
+ "An unexpected error occurred: [%d][%s]\n",
+ ret, strerror(ret));
goto done;
}
if (map->ready == false) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Performing implicit setautomntent\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Performing implicit setautomntent\n");
req = setautomntent_send(cmdctx, cmdctx->mapname, cmdctx);
if (req == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("setautomntent_send failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "setautomntent_send failed\n");
ret = EIO;
goto done;
}
@@ -1302,13 +1302,13 @@ sss_autofs_cmd_getautomntbyname(struct cli_ctx *client)
ret = EOK;
goto done;
} else if (map->found == false) {
- DEBUG(SSSDBG_TRACE_FUNC, ("negative cache hit\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "negative cache hit\n");
ret = ENOENT;
goto done;
}
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Looking up value for [%s] in [%s]\n", cmdctx->key, map->mapname));
+ "Looking up value for [%s] in [%s]\n", cmdctx->key, map->mapname);
ret = getautomntbyname_process(cmdctx, map, cmdctx->key);
@@ -1330,9 +1330,9 @@ getautomntbyname_implicit_done(struct tevent_req *req)
talloc_zfree(req);
if (ret != EOK) {
if (ret != ENOENT) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("setautomntent_recv failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "setautomntent_recv failed\n");
} else {
- DEBUG(SSSDBG_MINOR_FAILURE, ("No such map\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "No such map\n");
}
goto done;
}
@@ -1340,13 +1340,13 @@ getautomntbyname_implicit_done(struct tevent_req *req)
ret = get_autofs_map(actx, cmdctx->mapname, &map);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Cannot get map after setautomntent succeeded?\n"));
+ "Cannot get map after setautomntent succeeded?\n");
goto done;
}
if (map->ready == false) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Map not ready after setautomntent succeeded\n"));
+ "Map not ready after setautomntent succeeded\n");
goto done;
}
@@ -1380,7 +1380,7 @@ getautomntbyname_process(struct autofs_cmd_ctx *cmdctx,
}
if (!map->map || !map->entries || !map->entries[0]) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("No entries found\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "No entries found\n");
ret = sss_cmd_empty_packet(client->creq->out);
if (ret != EOK) {
return autofs_cmd_done(cmdctx, ret);
@@ -1392,18 +1392,18 @@ getautomntbyname_process(struct autofs_cmd_ctx *cmdctx,
k = ldb_msg_find_attr_as_string(map->entries[i],
SYSDB_AUTOFS_ENTRY_KEY, NULL);
if (!k) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Skipping incomplete entry\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "Skipping incomplete entry\n");
continue;
}
if (strcmp(k, key) == 0) {
- DEBUG(SSSDBG_TRACE_INTERNAL, ("Found key [%s]\n", key));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "Found key [%s]\n", key);
break;
}
}
if (i >= map->entry_count) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("No key named [%s] found\n", key));
+ DEBUG(SSSDBG_MINOR_FAILURE, "No key named [%s] found\n", key);
ret = sss_cmd_empty_packet(client->creq->out);
if (ret != EOK) {
return autofs_cmd_done(cmdctx, ret);
@@ -1448,7 +1448,7 @@ sss_autofs_cmd_endautomntent(struct cli_ctx *client)
{
errno_t ret;
- DEBUG(SSSDBG_TRACE_FUNC, ("endautomntent called\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "endautomntent called\n");
/* create response packet */
ret = sss_packet_new(client->creq, 0,
diff --git a/src/responder/autofs/autofssrv_dp.c b/src/responder/autofs/autofssrv_dp.c
index 7f51b61ab..975692aad 100644
--- a/src/responder/autofs/autofssrv_dp.c
+++ b/src/responder/autofs/autofssrv_dp.c
@@ -82,8 +82,8 @@ sss_dp_get_autofs_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;
}
@@ -112,7 +112,7 @@ sss_dp_get_autofs_msg(void *pvt)
filter = talloc_asprintf(info, "mapname=%s", info->name);
if (!filter) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory?!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory?!\n");
return NULL;
}
@@ -121,14 +121,14 @@ sss_dp_get_autofs_msg(void *pvt)
DP_INTERFACE,
DP_METHOD_AUTOFSHANDLER);
if (msg == NULL) {
- 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 autofs request for [%s][%u][%s]\n",
- info->dom->name, be_type, filter));
+ "Creating autofs request for [%s][%u][%s]\n",
+ info->dom->name, be_type, filter);
dbret = dbus_message_append_args(msg,
DBUS_TYPE_UINT32, &be_type,
@@ -136,7 +136,7 @@ sss_dp_get_autofs_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;
}
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;
}
diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c
index 4da774cc8..685ebeb35 100644
--- a/src/responder/nss/nsssrv.c
+++ b/src/responder/nss/nsssrv.c
@@ -91,11 +91,11 @@ static int nss_clear_memcache(DBusMessage *message,
ret = errno;
if (ret == ENOENT) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("CLEAR_MC_FLAG not found. Nothing to do.\n"));
+ "CLEAR_MC_FLAG not found. Nothing to do.\n");
goto done;
} else {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to unlink file: %s.\n",
- strerror(ret)));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Failed to unlink file: %s.\n",
+ strerror(ret));
return ret;
}
}
@@ -108,18 +108,18 @@ static int nss_clear_memcache(DBusMessage *message,
300, &memcache_timeout);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Unable to get memory cache entry timeout.\n"));
+ "Unable to get memory cache entry timeout.\n");
return ret;
}
/* TODO: read cache sizes from configuration */
- DEBUG(SSSDBG_TRACE_FUNC, ("Clearing memory caches.\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Clearing memory caches.\n");
ret = sss_mmap_cache_reinit(nctx, SSS_MC_CACHE_ELEMENTS,
(time_t) memcache_timeout,
&nctx->pwd_mc_ctx);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("passwd mmap cache invalidation failed\n"));
+ "passwd mmap cache invalidation failed\n");
return ret;
}
@@ -128,7 +128,7 @@ static int nss_clear_memcache(DBusMessage *message,
&nctx->grp_mc_ctx);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("group mmap cache invalidation failed\n"));
+ "group mmap cache invalidation failed\n");
return ret;
}
@@ -147,7 +147,7 @@ static int nss_clear_netgroup_hash_table(DBusMessage *message,
ret = nss_orphan_netgroups(nctx);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not invalidate netgroups\n"));
+ "Could not invalidate netgroups\n");
return ret;
}
@@ -181,16 +181,16 @@ static errno_t nss_get_etc_shells(TALLOC_CTX *mem_ctx, char ***_shells)
ret = ENOMEM;
goto done;
}
- DEBUG(6, ("Found shell %s in /etc/shells\n", shells[i]));
+ DEBUG(6, "Found shell %s in /etc/shells\n", shells[i]);
i++;
if (i == size) {
size += SHELL_REALLOC_INCREMENT;
if (size > SHELL_REALLOC_MAX) {
- DEBUG(0, ("Reached maximum number of shells [%d]. "
+ DEBUG(0, "Reached maximum number of shells [%d]. "
"Users may be denied access. "
"Please check /etc/shells for sanity\n",
- SHELL_REALLOC_MAX));
+ SHELL_REALLOC_MAX);
break;
}
shells = talloc_realloc(NULL, shells, char *,
@@ -245,8 +245,8 @@ static int nss_get_config(struct nss_ctx *nctx,
if (ret != EOK) goto done;
if (nctx->cache_refresh_percent < 0 ||
nctx->cache_refresh_percent > 99) {
- DEBUG(0,("Configuration error: entry_cache_nowait_percentage is "
- "invalid. Disabling feature.\n"));
+ DEBUG(0,"Configuration error: entry_cache_nowait_percentage is "
+ "invalid. Disabling feature.\n");
nctx->cache_refresh_percent = 0;
}
@@ -342,7 +342,7 @@ static int nss_memcache_initgr_check(DBusMessage *message,
DBUS_TYPE_INVALID);
if (!dbret) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Failed, to parse message!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Failed, to parse message!\n");
if (dbus_error_is_set(&dbus_error)) {
dbus_error_free(&dbus_error);
}
@@ -350,7 +350,7 @@ static int nss_memcache_initgr_check(DBusMessage *message,
}
DEBUG(SSSDBG_TRACE_LIBS,
- ("Got request for [%s@%s]\n", user, domain));
+ "Got request for [%s@%s]\n", user, domain);
nss_update_initgr_memcache(nctx, user, domain, gnum, groups);
@@ -393,7 +393,7 @@ static void nss_dp_reconnect_init(struct sbus_connection *conn,
/* 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,
@@ -407,8 +407,8 @@ static void nss_dp_reconnect_init(struct sbus_connection *conn,
}
/* Failed to reconnect */
- 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 ? */
/* nss_shutdown(rctx); */
@@ -440,20 +440,20 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
"NSS", &nss_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;
}
nctx = talloc_zero(rctx, struct nss_ctx);
if (!nctx) {
- DEBUG(0, ("fatal error initializing nss_ctx\n"));
+ DEBUG(0, "fatal error initializing nss_ctx\n");
ret = ENOMEM;
goto fail;
}
ret = sss_ncache_init(rctx, &nctx->ncache);
if (ret != EOK) {
- DEBUG(0, ("fatal error initializing negative cache\n"));
+ DEBUG(0, "fatal error initializing negative cache\n");
goto fail;
}
@@ -462,7 +462,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
ret = nss_get_config(nctx, cdb);
if (ret != EOK) {
- DEBUG(0, ("fatal error getting nss config\n"));
+ DEBUG(0, "fatal error getting nss config\n");
goto fail;
}
@@ -472,7 +472,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
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 fail;
}
@@ -484,7 +484,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
err = sss_idmap_init(sss_idmap_talloc, nctx, sss_idmap_talloc_free,
&nctx->idmap_ctx);
if (err != IDMAP_SUCCESS) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("sss_idmap_init failed.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "sss_idmap_init failed.\n");
ret = EFAULT;
goto fail;
}
@@ -493,7 +493,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
hret = sss_hash_create_ex(nctx, 10, &nctx->netgroups, 0, 0, 0, 0,
netgroup_hash_delete_cb, NULL);
if (hret != HASH_SUCCESS) {
- DEBUG(0,("Unable to initialize netgroup hash table\n"));
+ DEBUG(0,"Unable to initialize netgroup hash table\n");
ret = EIO;
goto fail;
}
@@ -504,9 +504,9 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
if (ret != 0 && errno != ENOENT) {
ret = errno;
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to unlink file [%s]. This can cause memory cache to "
+ "Failed to unlink file [%s]. This can cause memory cache to "
"be purged when next log rotation is requested. %d: %s\n",
- SSS_NSS_MCACHE_DIR"/"CLEAR_MC_FLAG, ret, strerror(ret)));
+ SSS_NSS_MCACHE_DIR"/"CLEAR_MC_FLAG, ret, strerror(ret));
}
ret = confdb_get_int(nctx->rctx->cdb,
@@ -515,7 +515,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
300, &memcache_timeout);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Failed to get 'memcache_timeout' option from confdb.\n"));
+ "Failed to get 'memcache_timeout' option from confdb.\n");
goto fail;
}
@@ -524,14 +524,14 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
SSS_MC_CACHE_ELEMENTS, (time_t)memcache_timeout,
&nctx->pwd_mc_ctx);
if (ret) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("passwd mmap cache is DISABLED\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "passwd mmap cache is DISABLED\n");
}
ret = sss_mmap_cache_init(nctx, "group", SSS_MC_GROUP,
SSS_MC_CACHE_ELEMENTS, (time_t)memcache_timeout,
&nctx->grp_mc_ctx);
if (ret) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("group mmap cache is DISABLED\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "group mmap cache is DISABLED\n");
}
/* Set up file descriptor limits */
@@ -542,24 +542,24 @@ int nss_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 fail;
}
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 fail;
}
ret = sss_names_init(nctx, nctx->rctx->cdb, NULL, &nctx->global_names);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("sss_names_init failed.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "sss_names_init failed.\n");
goto fail;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("NSS Initialization complete\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "NSS Initialization complete\n");
return EOK;
@@ -608,7 +608,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 = nss_process_init(main_ctx,
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index 529948436..ae21f1f92 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -125,7 +125,7 @@ void nss_update_pw_memcache(struct nss_ctx *nctx)
ret = sysdb_enumpwent(nctx, dom, &res);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to enumerate users for domain [%s]\n", dom->name));
+ "Failed to enumerate users for domain [%s]\n", dom->name);
continue;
}
@@ -142,8 +142,8 @@ void nss_update_pw_memcache(struct nss_ctx *nctx)
id = ldb_msg_find_attr_as_string(res->msgs[i], SYSDB_UIDNUM, NULL);
if (!id) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to find uidNumber in %s.\n",
- ldb_dn_get_linearized(res->msgs[i]->dn)));
+ "Failed to find uidNumber in %s.\n",
+ ldb_dn_get_linearized(res->msgs[i]->dn));
continue;
}
to_sized_string(&key, id);
@@ -151,8 +151,8 @@ void nss_update_pw_memcache(struct nss_ctx *nctx)
ret = sss_mmap_cache_pw_invalidate(nctx->pwd_mc_ctx, &key);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Internal failure in memory cache code: %d [%s]\n",
- ret, strerror(ret)));
+ "Internal failure in memory cache code: %d [%s]\n",
+ ret, strerror(ret));
}
}
@@ -185,8 +185,8 @@ static const char *get_homedir_override(TALLOC_CTX *mem_ctx,
/* Subdomain users store FQDN in their name attribute */
ret = sss_parse_name(mem_ctx, dom->names, orig_name, &domname, &name);
if (ret != EOK) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Could not parse [%s] into "
- "name-value components.\n", orig_name));
+ DEBUG(SSSDBG_MINOR_FAILURE, "Could not parse [%s] into "
+ "name-value components.\n", orig_name);
return NULL;
}
@@ -252,8 +252,8 @@ static const char *get_shell_override(TALLOC_CTX *mem_ctx,
if (nctx->vetoed_shells) {
for (i=0; nctx->vetoed_shells[i]; i++) {
if (strcmp(nctx->vetoed_shells[i], user_shell) == 0) {
- DEBUG(5, ("The shell '%s' is vetoed. "
- "Using fallback\n", user_shell));
+ DEBUG(5, "The shell '%s' is vetoed. "
+ "Using fallback\n", user_shell);
return talloc_strdup(mem_ctx, nctx->shell_fallback);
}
}
@@ -262,14 +262,14 @@ static const char *get_shell_override(TALLOC_CTX *mem_ctx,
if (nctx->etc_shells) {
for (i=0; nctx->etc_shells[i]; i++) {
if (strcmp(user_shell, nctx->etc_shells[i]) == 0) {
- DEBUG(9, ("Shell %s found in /etc/shells\n",
- nctx->etc_shells[i]));
+ DEBUG(9, "Shell %s found in /etc/shells\n",
+ nctx->etc_shells[i]);
break;
}
}
if (nctx->etc_shells[i]) {
- DEBUG(9, ("Using original shell '%s'\n", user_shell));
+ DEBUG(9, "Using original shell '%s'\n", user_shell);
return talloc_strdup(mem_ctx, user_shell);
}
}
@@ -277,15 +277,15 @@ static const char *get_shell_override(TALLOC_CTX *mem_ctx,
if (nctx->allowed_shells) {
for (i=0; nctx->allowed_shells[i]; i++) {
if (strcmp(nctx->allowed_shells[i], user_shell) == 0) {
- DEBUG(5, ("The shell '%s' is allowed but does not exist. "
- "Using fallback\n", user_shell));
+ DEBUG(5, "The shell '%s' is allowed but does not exist. "
+ "Using fallback\n", user_shell);
return talloc_strdup(mem_ctx, nctx->shell_fallback);
}
}
}
- DEBUG(5, ("The shell '%s' is not allowed and does not exist.\n",
- user_shell));
+ DEBUG(5, "The shell '%s' is not allowed and does not exist.\n",
+ user_shell);
return talloc_strdup(mem_ctx, NOLOGIN_SHELL);
}
@@ -333,8 +333,8 @@ static int fill_pwent(struct sss_packet *packet,
gid = get_gid_override(msg, dom);
if (!orig_name || !uid || !gid) {
- DEBUG(SSSDBG_OP_FAILURE, ("Incomplete user object for %s[%llu]! Skipping\n",
- orig_name?orig_name:"<NULL>", (unsigned long long int)uid));
+ DEBUG(SSSDBG_OP_FAILURE, "Incomplete user object for %s[%llu]! Skipping\n",
+ orig_name?orig_name:"<NULL>", (unsigned long long int)uid);
continue;
}
@@ -344,8 +344,8 @@ static int fill_pwent(struct sss_packet *packet,
dom, orig_name);
if (ncret == EEXIST) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("User [%s@%s] filtered out! (negative cache)\n",
- orig_name, domain));
+ "User [%s@%s] filtered out! (negative cache)\n",
+ orig_name, domain);
continue;
}
}
@@ -360,7 +360,7 @@ static int fill_pwent(struct sss_packet *packet,
tmpstr = sss_get_cased_name(tmp_ctx, orig_name, dom->case_sensitive);
if (tmpstr == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("sss_get_cased_name failed, skipping\n"));
+ "sss_get_cased_name failed, skipping\n");
continue;
}
to_sized_string(&name, tmpstr);
@@ -411,8 +411,8 @@ static int fill_pwent(struct sss_packet *packet,
if (add_domain) {
ret = sss_fqname((char *) &body[rp], fq_len, dom->names, dom, name.str);
if (ret < 0 || ret != fq_len - 1) {
- DEBUG(1, ("Failed to generate a fully qualified name for user "
- "[%s] in [%s]! Skipping user.\n", name.str, domain));
+ DEBUG(1, "Failed to generate a fully qualified name for user "
+ "[%s] in [%s]! Skipping user.\n", name.str, domain);
continue;
}
} else {
@@ -439,8 +439,8 @@ static int fill_pwent(struct sss_packet *packet,
&gecos, &homedir, &shell);
if (ret != EOK && ret != ENOMEM) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to store user %s(%s) in mmap cache!\n",
- name.str, domain));
+ "Failed to store user %s(%s) in mmap cache!\n",
+ name.str, domain);
}
}
}
@@ -514,8 +514,8 @@ errno_t check_cache(struct nss_dom_ctx *dctx,
*/
if ((req_type == SSS_DP_USER || req_type == SSS_DP_NETGR) &&
(res->count > 1)) {
- DEBUG(1, ("getpwXXX call returned more than one result!"
- " DB Corrupted?\n"));
+ DEBUG(1, "getpwXXX call returned more than one result!"
+ " DB Corrupted?\n");
return ENOENT;
}
@@ -534,10 +534,10 @@ errno_t check_cache(struct nss_dom_ctx *dctx,
ret = sss_cmd_check_cache(res->msgs[0], nctx->cache_refresh_percent,
cacheExpire);
if (ret == EOK) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Cached entry is valid, returning..\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Cached entry is valid, returning..\n");
return EOK;
} else if (ret != EAGAIN && ret != ENOENT) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Error checking cache: %d\n", ret));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Error checking cache: %d\n", ret);
goto error;
}
} else {
@@ -553,17 +553,17 @@ errno_t check_cache(struct nss_dom_ctx *dctx,
* immediately.
*/
DEBUG(SSSDBG_TRACE_FUNC,
- ("Performing midpoint cache update on [%s]\n", opt_name));
+ "Performing midpoint cache update on [%s]\n", opt_name);
req = sss_dp_get_account_send(cctx, cctx->rctx, dctx->domain, true,
req_type, opt_name, opt_id, NULL);
if (!req) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Out of memory sending out-of-band data provider "
- "request\n"));
+ "Out of memory sending out-of-band data provider "
+ "request\n");
/* This is non-fatal, so we'll continue here */
} else {
- DEBUG(SSSDBG_TRACE_FUNC, ("Updating cache out-of-band\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Updating cache out-of-band\n");
}
/* We don't need to listen for a reply, so we will free the
@@ -588,7 +588,7 @@ errno_t check_cache(struct nss_dom_ctx *dctx,
req_type, opt_name, opt_id, NULL);
if (!req) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Out of memory sending data provider request\n"));
+ "Out of memory sending data provider request\n");
ret = ENOMEM;
goto error;
}
@@ -651,14 +651,14 @@ static int delete_entry_from_memcache(struct sss_domain_info *dom, char *name,
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory.\n");
return ENOMEM;
}
if (dom->fqnames) {
fqdn = sss_tc_fqname(tmp_ctx, dom->names, dom, name);
if (fqdn == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory.\n");
ret = ENOMEM;
goto done;
}
@@ -670,8 +670,8 @@ static int delete_entry_from_memcache(struct sss_domain_info *dom, char *name,
ret = sss_mmap_cache_pw_invalidate(mc_ctx, &delete_name);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Internal failure in memory cache code: %d [%s]\n",
- ret, strerror(ret)));
+ "Internal failure in memory cache code: %d [%s]\n",
+ ret, strerror(ret));
goto done;
}
@@ -734,8 +734,8 @@ static int nss_cmd_getpwnam_search(struct nss_dom_ctx *dctx)
/* if neg cached, return we didn't find it */
if (ret == EEXIST) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("User [%s] does not exist in [%s]! (negative cache)\n",
- name, dom->name));
+ "User [%s] does not exist in [%s]! (negative cache)\n",
+ name, dom->name);
/* if a multidomain search, try with next */
if (cmdctx->check_next) {
dom = get_next_domain(dom, false);
@@ -747,21 +747,21 @@ static int nss_cmd_getpwnam_search(struct nss_dom_ctx *dctx)
return ENOENT;
}
- DEBUG(4, ("Requesting info for [%s@%s]\n", name, dom->name));
+ DEBUG(4, "Requesting info for [%s@%s]\n", name, dom->name);
if (dom->sysdb == NULL) {
- DEBUG(0, ("Fatal: Sysdb CTX not found for this domain!\n"));
+ DEBUG(0, "Fatal: Sysdb CTX not found for this domain!\n");
return EIO;
}
ret = sysdb_getpwnam(cmdctx, dom, name, &dctx->res);
if (ret != EOK) {
- DEBUG(1, ("Failed to make request to our cache!\n"));
+ DEBUG(1, "Failed to make request to our cache!\n");
return EIO;
}
if (dctx->res->count > 1) {
- DEBUG(0, ("getpwnam call returned more than one result !?!\n"));
+ DEBUG(0, "getpwnam call returned more than one result !?!\n");
return ENOENT;
}
@@ -769,8 +769,8 @@ static int nss_cmd_getpwnam_search(struct nss_dom_ctx *dctx)
/* set negative cache only if not result of cache check */
ret = sss_ncache_set_user(nctx->ncache, false, dom, name);
if (ret != EOK) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Cannot set negcache for %s@%s\n",
- name, dom->name));
+ DEBUG(SSSDBG_MINOR_FAILURE, "Cannot set negcache for %s@%s\n",
+ name, dom->name);
}
/* if a multidomain search, try with next */
@@ -779,14 +779,14 @@ static int nss_cmd_getpwnam_search(struct nss_dom_ctx *dctx)
if (dom) continue;
}
- DEBUG(2, ("No results for getpwnam call\n"));
+ DEBUG(2, "No results for getpwnam call\n");
/* User not found in ldb -> delete user from memory cache. */
ret = delete_entry_from_memcache(dctx->domain, name,
nctx->pwd_mc_ctx);
if (ret != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Deleting user from memcache failed.\n"));
+ "Deleting user from memcache failed.\n");
}
return ENOENT;
@@ -808,13 +808,13 @@ static int nss_cmd_getpwnam_search(struct nss_dom_ctx *dctx)
}
/* One result found */
- DEBUG(6, ("Returning info for user [%s@%s]\n", name, dom->name));
+ DEBUG(6, "Returning info for user [%s@%s]\n", name, dom->name);
return EOK;
}
DEBUG(SSSDBG_MINOR_FAILURE,
- ("No matching domain found for [%s], fail!\n", cmdctx->name));
+ "No matching domain found for [%s], fail!\n", cmdctx->name);
return ENOENT;
}
@@ -838,10 +838,10 @@ static void nss_cmd_getby_dp_callback(uint16_t err_maj, uint32_t err_min,
bool check_subdomains;
if (err_maj) {
- DEBUG(2, ("Unable to get information from Data Provider\n"
+ DEBUG(2, "Unable to get information from Data Provider\n"
"Error: %u, %u, %s\n"
"Will try to return what we have in cache\n",
- (unsigned int)err_maj, (unsigned int)err_min, err_msg));
+ (unsigned int)err_maj, (unsigned int)err_min, err_msg);
if ((dctx->res && dctx->res->count == 1) ||
(dctx->cmdctx->cmd == SSS_NSS_INITGR &&
@@ -869,8 +869,8 @@ static void nss_cmd_getby_dp_callback(uint16_t err_maj, uint32_t err_min,
ret = nss_cmd_getbysid_send_reply(dctx);
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n",
- dctx->cmdctx->cmd));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid command [%d].\n",
+ dctx->cmdctx->cmd);
ret = EINVAL;
}
goto done;
@@ -959,8 +959,8 @@ static void nss_cmd_getby_dp_callback(uint16_t err_maj, uint32_t err_min,
}
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n",
- dctx->cmdctx->cmd));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid command [%d].\n",
+ dctx->cmdctx->cmd);
ret = EINVAL;
}
@@ -989,7 +989,7 @@ static int nss_check_name_of_well_known_sid(struct nss_cmd_ctx *cmdctx,
ret = sss_parse_name(cmdctx, nss_ctx->global_names, full_name,
&wk_dom_name, &wk_name);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_parse_name failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_parse_name failed.\n");
return ret;
}
@@ -997,8 +997,8 @@ static int nss_check_name_of_well_known_sid(struct nss_cmd_ctx *cmdctx,
talloc_free(wk_dom_name);
talloc_free(wk_name);
if (ret != EOK) {
- DEBUG(SSSDBG_TRACE_ALL, ("Name [%s] is not the name of a " \
- "Well-Known SID.\n", full_name));
+ DEBUG(SSSDBG_TRACE_ALL, "Name [%s] is not the name of a " \
+ "Well-Known SID.\n", full_name);
return ret;
}
@@ -1049,7 +1049,7 @@ static int nss_cmd_getbynam(enum sss_cli_command cmd, struct cli_ctx *cctx)
case SSS_NSS_GETSIDBYNAME:
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command type [%d].\n", cmd));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid command type [%d].\n", cmd);
return EINVAL;
}
@@ -1084,18 +1084,18 @@ static int nss_cmd_getbynam(enum sss_cli_command cmd, struct cli_ctx *cctx)
rawname = (const char *)body;
- DEBUG(SSSDBG_TRACE_FUNC, ("Running command [%d] with input [%s].\n",
- dctx->cmdctx->cmd, rawname));
+ DEBUG(SSSDBG_TRACE_FUNC, "Running command [%d] with input [%s].\n",
+ dctx->cmdctx->cmd, rawname);
if (dctx->cmdctx->cmd == SSS_NSS_GETSIDBYNAME) {
ret = nss_check_name_of_well_known_sid(cmdctx, rawname);
if (ret != ENOENT) {
if (ret == EOK) {
- DEBUG(SSSDBG_TRACE_ALL, ("Name [%s] is the name of a " \
- "Well-Known SID.\n", rawname));
+ DEBUG(SSSDBG_TRACE_ALL, "Name [%s] is the name of a " \
+ "Well-Known SID.\n", rawname);
} else {
DEBUG(SSSDBG_OP_FAILURE,
- ("nss_check_name_of_well_known_sid failed.\n"));
+ "nss_check_name_of_well_known_sid failed.\n");
}
goto done;
}
@@ -1130,13 +1130,13 @@ static int nss_cmd_getbynam(enum sss_cli_command cmd, struct cli_ctx *cctx)
}
goto done;
} else if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Invalid name received [%s]\n", rawname));
+ DEBUG(SSSDBG_OP_FAILURE, "Invalid name received [%s]\n", rawname);
ret = ENOENT;
goto done;
}
- DEBUG(4, ("Requesting info for [%s] from [%s]\n",
- cmdctx->name, domname?domname:"<ALL>"));
+ DEBUG(4, "Requesting info for [%s] from [%s]\n",
+ cmdctx->name, domname?domname:"<ALL>");
if (domname) {
dctx->domain = responder_get_domain(cctx->rctx, domname);
@@ -1193,8 +1193,8 @@ static int nss_cmd_getbynam(enum sss_cli_command cmd, struct cli_ctx *cctx)
}
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n",
- dctx->cmdctx->cmd));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid command [%d].\n",
+ dctx->cmdctx->cmd);
ret = EINVAL;
}
@@ -1221,13 +1221,13 @@ static void nss_cmd_getbynam_done(struct tevent_req *req)
cctx->rctx->default_domain, rawname,
&domname, &cmdctx->name);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Invalid name received [%s]\n", rawname));
+ DEBUG(SSSDBG_OP_FAILURE, "Invalid name received [%s]\n", rawname);
ret = ENOENT;
goto done;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("Requesting info for [%s] from [%s]\n",
- cmdctx->name, domname?domname:"<ALL>"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Requesting info for [%s] from [%s]\n",
+ cmdctx->name, domname?domname:"<ALL>");
if (domname) {
dctx->domain = responder_get_domain(cctx->rctx, domname);
@@ -1273,8 +1273,8 @@ static void nss_cmd_getbynam_done(struct tevent_req *req)
}
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n",
- dctx->cmdctx->cmd));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid command [%d].\n",
+ dctx->cmdctx->cmd);
ret = EINVAL;
}
@@ -1306,9 +1306,9 @@ static int nss_cmd_getpwuid_search(struct nss_dom_ctx *dctx)
/* check that the uid is valid for this domain */
if ((dom->id_min && (cmdctx->id < dom->id_min)) ||
(dom->id_max && (cmdctx->id > dom->id_max))) {
- DEBUG(4, ("Uid [%"PRIu32"] does not exist in domain [%s]! "
+ DEBUG(4, "Uid [%"PRIu32"] does not exist in domain [%s]! "
"(id out of range)\n",
- cmdctx->id, dom->name));
+ cmdctx->id, dom->name);
if (cmdctx->check_next) {
dom = get_next_domain(dom, true);
continue;
@@ -1326,23 +1326,23 @@ static int nss_cmd_getpwuid_search(struct nss_dom_ctx *dctx)
/* make sure to update the dctx if we changed domain */
dctx->domain = dom;
- DEBUG(4, ("Requesting info for [%"PRIu32"@%s]\n", cmdctx->id, dom->name));
+ DEBUG(4, "Requesting info for [%"PRIu32"@%s]\n", cmdctx->id, dom->name);
if (dom->sysdb == NULL) {
- DEBUG(0, ("Fatal: Sysdb CTX not found for this domain!\n"));
+ DEBUG(0, "Fatal: Sysdb CTX not found for this domain!\n");
ret = EIO;
goto done;
}
ret = sysdb_getpwuid(cmdctx, dom, cmdctx->id, &dctx->res);
if (ret != EOK) {
- DEBUG(1, ("Failed to make request to our cache!\n"));
+ DEBUG(1, "Failed to make request to our cache!\n");
ret = EIO;
goto done;
}
if (dctx->res->count > 1) {
- DEBUG(0, ("getpwuid call returned more than one result !?!\n"));
+ DEBUG(0, "getpwuid call returned more than one result !?!\n");
ret = ENOENT;
goto done;
}
@@ -1355,7 +1355,7 @@ static int nss_cmd_getpwuid_search(struct nss_dom_ctx *dctx)
}
/* set negative cache only if not result of cache check */
- DEBUG(SSSDBG_MINOR_FAILURE, ("No results for getpwuid call\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "No results for getpwuid call\n");
ret = ENOENT;
goto done;
}
@@ -1376,7 +1376,7 @@ static int nss_cmd_getpwuid_search(struct nss_dom_ctx *dctx)
}
/* One result found */
- DEBUG(6, ("Returning info for uid [%"PRIu32"@%s]\n", cmdctx->id, dom->name));
+ DEBUG(6, "Returning info for uid [%"PRIu32"@%s]\n", cmdctx->id, dom->name);
ret = EOK;
goto done;
@@ -1390,11 +1390,11 @@ done:
err = sss_ncache_set_uid(nctx->ncache, false, cmdctx->id);
if (err != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Cannot set negative cache for UID %"PRIu32"\n", cmdctx->id));
+ "Cannot set negative cache for UID %"PRIu32"\n", cmdctx->id);
}
}
- DEBUG(SSSDBG_MINOR_FAILURE, ("No matching domain found for [%"PRIu32"]\n", cmdctx->id));
+ DEBUG(SSSDBG_MINOR_FAILURE, "No matching domain found for [%"PRIu32"]\n", cmdctx->id);
return ret;
}
@@ -1422,7 +1422,7 @@ static int nss_cmd_getbyid(enum sss_cli_command cmd, struct cli_ctx *cctx)
case SSS_NSS_GETSIDBYID:
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command type [%d].\n", cmd));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid command type [%d].\n", cmd);
return EINVAL;
}
@@ -1451,16 +1451,16 @@ static int nss_cmd_getbyid(enum sss_cli_command cmd, struct cli_ctx *cctx)
}
SAFEALIGN_COPY_UINT32(&cmdctx->id, body, NULL);
- DEBUG(SSSDBG_TRACE_FUNC, ("Running command [%d] with id [%"PRIu32"].\n",
- dctx->cmdctx->cmd, cmdctx->id));
+ DEBUG(SSSDBG_TRACE_FUNC, "Running command [%d] with id [%"PRIu32"].\n",
+ dctx->cmdctx->cmd, cmdctx->id);
switch(dctx->cmdctx->cmd) {
case SSS_NSS_GETPWUID:
ret = sss_ncache_check_uid(nctx->ncache, nctx->neg_timeout, cmdctx->id);
if (ret == EEXIST) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Uid [%"PRIu32"] does not exist! (negative cache)\n",
- cmdctx->id));
+ "Uid [%"PRIu32"] does not exist! (negative cache)\n",
+ cmdctx->id);
ret = ENOENT;
goto done;
}
@@ -1469,8 +1469,8 @@ static int nss_cmd_getbyid(enum sss_cli_command cmd, struct cli_ctx *cctx)
ret = sss_ncache_check_gid(nctx->ncache, nctx->neg_timeout, cmdctx->id);
if (ret == EEXIST) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Gid [%"PRIu32"] does not exist! (negative cache)\n",
- cmdctx->id));
+ "Gid [%"PRIu32"] does not exist! (negative cache)\n",
+ cmdctx->id);
ret = ENOENT;
goto done;
}
@@ -1483,15 +1483,15 @@ static int nss_cmd_getbyid(enum sss_cli_command cmd, struct cli_ctx *cctx)
}
if (ret == EEXIST) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Id [%"PRIu32"] does not exist! (negative cache)\n",
- cmdctx->id));
+ "Id [%"PRIu32"] does not exist! (negative cache)\n",
+ cmdctx->id);
ret = ENOENT;
goto done;
}
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n",
- dctx->cmdctx->cmd));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid command [%d].\n",
+ dctx->cmdctx->cmd);
ret = EINVAL;
goto done;
}
@@ -1536,8 +1536,8 @@ static int nss_cmd_getbyid(enum sss_cli_command cmd, struct cli_ctx *cctx)
}
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n",
- dctx->cmdctx->cmd));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid command [%d].\n",
+ dctx->cmdctx->cmd);
ret = EINVAL;
}
@@ -1578,8 +1578,8 @@ static void nss_cmd_getbyid_done(struct tevent_req *req)
ret = responder_get_domain_by_id(cmdctx->cctx->rctx, cmdctx->secid,
&dctx->domain);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Cannot find domain for SID [%s].\n",
- cmdctx->secid));
+ DEBUG(SSSDBG_OP_FAILURE, "Cannot find domain for SID [%s].\n",
+ cmdctx->secid);
ret = ENOENT;
goto done;
}
@@ -1598,8 +1598,8 @@ static void nss_cmd_getbyid_done(struct tevent_req *req)
}
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n",
- dctx->cmdctx->cmd));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid command [%d].\n",
+ dctx->cmdctx->cmd);
ret = EINVAL;
}
@@ -1642,7 +1642,7 @@ static int nss_cmd_setpwent(struct cli_ctx *cctx)
req = nss_cmd_setpwent_send(cmdctx, cctx);
if (!req) {
- DEBUG(0, ("Fatal error calling nss_cmd_setpwent_send\n"));
+ DEBUG(0, "Fatal error calling nss_cmd_setpwent_send\n");
ret = EIO;
goto done;
}
@@ -1663,7 +1663,7 @@ struct tevent_req *nss_cmd_setpwent_send(TALLOC_CTX *mem_ctx,
struct sss_domain_info *dom;
struct setent_step_ctx *step_ctx;
- DEBUG(4, ("Received setpwent request\n"));
+ DEBUG(4, "Received setpwent request\n");
nctx = talloc_get_type(client->rctx->pvt_ctx, struct nss_ctx);
/* Reset the read pointers */
@@ -1672,7 +1672,7 @@ struct tevent_req *nss_cmd_setpwent_send(TALLOC_CTX *mem_ctx,
req = tevent_req_create(mem_ctx, &state, struct setent_ctx);
if (!req) {
- DEBUG(0, ("Could not create tevent request for setpwent\n"));
+ DEBUG(0, "Could not create tevent request for setpwent\n");
return NULL;
}
@@ -1692,7 +1692,7 @@ struct tevent_req *nss_cmd_setpwent_send(TALLOC_CTX *mem_ctx,
state->dctx->domain = dom;
if (state->dctx->domain == NULL) {
- DEBUG(2, ("Enumeration disabled on all domains!\n"));
+ DEBUG(2, "Enumeration disabled on all domains!\n");
ret = ENOENT;
goto error;
}
@@ -1812,10 +1812,10 @@ static errno_t nss_cmd_setpwent_step(struct setent_step_ctx *step_ctx)
/* make sure to update the dctx if we changed domain */
dctx->domain = dom;
- DEBUG(6, ("Requesting info for domain [%s]\n", dom->name));
+ DEBUG(6, "Requesting info for domain [%s]\n", dom->name);
if (dom->sysdb == NULL) {
- DEBUG(0, ("Fatal: Sysdb CTX not found for this domain!\n"));
+ DEBUG(0, "Fatal: Sysdb CTX not found for this domain!\n");
return EIO;
}
@@ -1830,9 +1830,9 @@ static errno_t nss_cmd_setpwent_step(struct setent_step_ctx *step_ctx)
SSS_DP_USER, NULL, 0, NULL);
if (!dpreq) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Enum Cache refresh for domain [%s] failed."
+ "Enum Cache refresh for domain [%s] failed."
" Trying to return what we have in cache!\n",
- dom->name));
+ dom->name);
} else {
cb_ctx = talloc_zero(step_ctx, struct dp_callback_ctx);
if(!cb_ctx) {
@@ -1853,14 +1853,14 @@ static errno_t nss_cmd_setpwent_step(struct setent_step_ctx *step_ctx)
ret = sysdb_enumpwent(dctx, dom, &res);
if (ret != EOK) {
- DEBUG(1, ("Enum from cache failed, skipping domain [%s]\n",
- dom->name));
+ DEBUG(1, "Enum from cache failed, skipping domain [%s]\n",
+ dom->name);
dom = get_next_domain(dom, true);
continue;
}
if (res->count == 0) {
- DEBUG(4, ("Domain [%s] has no users, skipping.\n", dom->name));
+ DEBUG(4, "Domain [%s] has no users, skipping.\n", dom->name);
dom = get_next_domain(dom, true);
continue;
}
@@ -1895,8 +1895,8 @@ static errno_t nss_cmd_setpwent_step(struct setent_step_ctx *step_ctx)
te = tevent_add_timer(rctx->ev, nctx->pctx, tv,
setpwent_result_timeout, nctx);
if (!te) {
- DEBUG(0, ("Could not set up life timer for setpwent result object. "
- "Entries may become stale.\n"));
+ DEBUG(0, "Could not set up life timer for setpwent result object. "
+ "Entries may become stale.\n");
}
/* Notify the waiting clients */
@@ -1916,7 +1916,7 @@ static void setpwent_result_timeout(struct tevent_context *ev,
{
struct nss_ctx *nctx = talloc_get_type(pvt, struct nss_ctx);
- DEBUG(1, ("setpwent result object has expired. Cleaning up.\n"));
+ DEBUG(1, "setpwent result object has expired. Cleaning up.\n");
/* Free the passwd enumeration context.
* If additional getpwent requests come in, they will invoke
@@ -1933,10 +1933,10 @@ static void nss_cmd_setpwent_dp_callback(uint16_t err_maj, uint32_t err_min,
int ret;
if (err_maj) {
- DEBUG(2, ("Unable to get information from Data Provider\n"
+ DEBUG(2, "Unable to get information from Data Provider\n"
"Error: %u, %u, %s\n"
"Will try to return what we have in cache\n",
- (unsigned int)err_maj, (unsigned int)err_min, err_msg));
+ (unsigned int)err_maj, (unsigned int)err_min, err_msg);
}
ret = nss_cmd_setpwent_step(step_ctx);
@@ -1982,7 +1982,7 @@ static int nss_cmd_getpwent(struct cli_ctx *cctx)
struct nss_cmd_ctx *cmdctx;
struct tevent_req *req;
- DEBUG(4, ("Requesting info for all accounts\n"));
+ DEBUG(4, "Requesting info for all accounts\n");
cmdctx = talloc_zero(cctx, struct nss_cmd_ctx);
if (!cmdctx) {
@@ -2076,10 +2076,10 @@ static int nss_cmd_retpwent(struct cli_ctx *cctx, int num)
if (!n) break;
if (n < 0) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("BUG: Negative difference"
- "[%d - %d = %d]\n", pdom->res->count, cctx->pwent_cur, n));
- DEBUG(SSSDBG_CRIT_FAILURE, ("Domain: %d (total %d)\n",
- cctx->pwent_dom_idx, pctx->num));
+ DEBUG(SSSDBG_CRIT_FAILURE, "BUG: Negative difference"
+ "[%d - %d = %d]\n", pdom->res->count, cctx->pwent_cur, n);
+ DEBUG(SSSDBG_CRIT_FAILURE, "Domain: %d (total %d)\n",
+ cctx->pwent_dom_idx, pctx->num);
break;
}
@@ -2114,8 +2114,8 @@ static void nss_cmd_implicit_setpwent_done(struct tevent_req *req)
* later.
*/
if (ret != EOK && ret != ENOENT) {
- DEBUG(0, ("Implicit setpwent failed with unexpected error [%d][%s]\n",
- ret, strerror(ret)));
+ DEBUG(0, "Implicit setpwent failed with unexpected error [%d][%s]\n",
+ ret, strerror(ret));
NSS_CMD_FATAL_ERROR(cmdctx);
}
@@ -2125,8 +2125,8 @@ static void nss_cmd_implicit_setpwent_done(struct tevent_req *req)
ret = nss_cmd_getpwent_immediate(cmdctx);
if (ret != EOK) {
- DEBUG(0, ("Immediate retrieval failed with unexpected error "
- "[%d][%s]\n", ret, strerror(ret)));
+ DEBUG(0, "Immediate retrieval failed with unexpected error "
+ "[%d][%s]\n", ret, strerror(ret));
NSS_CMD_FATAL_ERROR(cmdctx);
}
}
@@ -2136,7 +2136,7 @@ static int nss_cmd_endpwent(struct cli_ctx *cctx)
struct nss_ctx *nctx;
int ret;
- DEBUG(4, ("Terminating request info for all accounts\n"));
+ DEBUG(4, "Terminating request info for all accounts\n");
nctx = talloc_get_type(cctx->rctx->pvt_ctx, struct nss_ctx);
@@ -2180,7 +2180,7 @@ void nss_update_gr_memcache(struct nss_ctx *nctx)
ret = sysdb_enumgrent(nctx, dom, &res);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to enumerate users for domain [%s]\n", dom->name));
+ "Failed to enumerate users for domain [%s]\n", dom->name);
continue;
}
@@ -2197,8 +2197,8 @@ void nss_update_gr_memcache(struct nss_ctx *nctx)
id = ldb_msg_find_attr_as_string(res->msgs[i], SYSDB_GIDNUM, NULL);
if (!id) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to find gidNumber in %s.\n",
- ldb_dn_get_linearized(res->msgs[i]->dn)));
+ "Failed to find gidNumber in %s.\n",
+ ldb_dn_get_linearized(res->msgs[i]->dn));
continue;
}
to_sized_string(&key, id);
@@ -2206,8 +2206,8 @@ void nss_update_gr_memcache(struct nss_ctx *nctx)
ret = sss_mmap_cache_gr_invalidate(nctx->grp_mc_ctx, &key);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Internal failure in memory cache code: %d [%s]\n",
- ret, strerror(ret)));
+ "Internal failure in memory cache code: %d [%s]\n",
+ ret, strerror(ret));
}
}
talloc_zfree(res);
@@ -2231,8 +2231,8 @@ static int parse_member(TALLOC_CTX *mem_ctx, struct sss_domain_info *group_dom,
ret = sss_parse_name(mem_ctx, group_dom->names, member, &domname, &username);
if (ret != EOK) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Could not parse [%s] into "
- "name-value components.\n", member));
+ DEBUG(SSSDBG_MINOR_FAILURE, "Could not parse [%s] into "
+ "name-value components.\n", member);
return ret;
}
@@ -2300,7 +2300,7 @@ static int fill_members(struct sss_packet *packet,
dom->case_sensitive);
if (tmpstr == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("sss_get_cased_name failed, skipping\n"));
+ "sss_get_cased_name failed, skipping\n");
continue;
}
@@ -2310,9 +2310,9 @@ static int fill_members(struct sss_packet *packet,
dom, tmpstr);
if (ret == EEXIST) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Group [%s] member [%s@%s] filtered out!"
+ "Group [%s] member [%s@%s] filtered out!"
" (negative cache)\n",
- (char *)&body[rzero+STRS_ROFFSET], tmpstr, domain));
+ (char *)&body[rzero+STRS_ROFFSET], tmpstr, domain);
continue;
}
}
@@ -2320,7 +2320,7 @@ static int fill_members(struct sss_packet *packet,
ret = parse_member(tmp_ctx, dom, tmpstr, &member_dom, &name, &add_domain);
if (ret != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Could not process member %s, skipping\n", tmpstr));
+ "Could not process member %s, skipping\n", tmpstr);
continue;
}
@@ -2346,10 +2346,10 @@ static int fill_members(struct sss_packet *packet,
ret = sss_fqname((char *)&body[rzero + rsize], nlen,
member_dom->names, member_dom, name.str);
if (ret < 0 || ret != nlen - 1) {
- DEBUG(SSSDBG_OP_FAILURE, ("Failed to generate a fully qualified name"
+ DEBUG(SSSDBG_OP_FAILURE, "Failed to generate a fully qualified name"
" for member [%s@%s] of group [%s]!"
" Skipping\n", name.str, domain,
- (char *)&body[rzero+STRS_ROFFSET]));
+ (char *)&body[rzero+STRS_ROFFSET]);
/* reclaim space */
ret = sss_packet_shrink(packet, nlen);
if (ret != EOK) {
@@ -2422,8 +2422,8 @@ static int fill_grent(struct sss_packet *packet,
/* new group */
if (!ldb_msg_check_string_attribute(msg, "objectClass",
SYSDB_GROUP_CLASS)) {
- DEBUG(1, ("Wrong object (%s) found on stack!\n",
- ldb_dn_get_linearized(msg->dn)));
+ DEBUG(1, "Wrong object (%s) found on stack!\n",
+ ldb_dn_get_linearized(msg->dn));
continue;
}
@@ -2435,8 +2435,8 @@ static int fill_grent(struct sss_packet *packet,
orig_name = ldb_msg_find_attr_as_string(msg, SYSDB_NAME, NULL);
gid = ldb_msg_find_attr_as_uint64(msg, SYSDB_GIDNUM, 0);
if (!orig_name || !gid) {
- DEBUG(2, ("Incomplete group object for %s[%llu]! Skipping\n",
- orig_name?orig_name:"<NULL>", (unsigned long long int)gid));
+ DEBUG(2, "Incomplete group object for %s[%llu]! Skipping\n",
+ orig_name?orig_name:"<NULL>", (unsigned long long int)gid);
continue;
}
@@ -2445,8 +2445,8 @@ static int fill_grent(struct sss_packet *packet,
nctx->neg_timeout, dom, orig_name);
if (ret == EEXIST) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Group [%s@%s] filtered out! (negative cache)\n",
- orig_name, domain));
+ "Group [%s@%s] filtered out! (negative cache)\n",
+ orig_name, domain);
continue;
}
}
@@ -2454,7 +2454,7 @@ static int fill_grent(struct sss_packet *packet,
tmpstr = sss_get_cased_name(tmp_ctx, orig_name, dom->case_sensitive);
if (tmpstr == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("sss_get_cased_name failed, skipping\n"));
+ "sss_get_cased_name failed, skipping\n");
continue;
}
to_sized_string(&name, tmpstr);
@@ -2492,8 +2492,8 @@ static int fill_grent(struct sss_packet *packet,
ret = sss_fqname((char *)&body[rzero+STRS_ROFFSET], fq_len,
dom->names, dom, name.str);
if (ret < 0 || ret != fq_len - 1) {
- DEBUG(1, ("Failed to generate a fully qualified name for"
- " group [%s] in [%s]! Skipping\n", name.str, domain));
+ DEBUG(1, "Failed to generate a fully qualified name for"
+ " group [%s] in [%s]! Skipping\n", name.str, domain);
/* reclaim space */
ret = sss_packet_shrink(packet, rsize);
if (ret != EOK) {
@@ -2554,8 +2554,8 @@ static int fill_grent(struct sss_packet *packet,
fullname.len - pwfield.len);
if (ret != EOK && ret != ENOMEM) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Failed to store group %s(%s) in mmap cache!",
- name.str, domain));
+ "Failed to store group %s(%s) in mmap cache!",
+ name.str, domain);
}
}
@@ -2658,8 +2658,8 @@ static int nss_cmd_getgrnam_search(struct nss_dom_ctx *dctx)
/* if neg cached, return we didn't find it */
if (ret == EEXIST) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Group [%s] does not exist in [%s]! (negative cache)\n",
- name, dom->name));
+ "Group [%s] does not exist in [%s]! (negative cache)\n",
+ name, dom->name);
/* if a multidomain search, try with next */
if (cmdctx->check_next) {
dom = get_next_domain(dom, false);
@@ -2671,21 +2671,21 @@ static int nss_cmd_getgrnam_search(struct nss_dom_ctx *dctx)
return ENOENT;
}
- DEBUG(4, ("Requesting info for [%s@%s]\n", name, dom->name));
+ DEBUG(4, "Requesting info for [%s@%s]\n", name, dom->name);
if (dom->sysdb == NULL) {
- DEBUG(0, ("Fatal: Sysdb CTX not found for this domain!\n"));
+ DEBUG(0, "Fatal: Sysdb CTX not found for this domain!\n");
return EIO;
}
ret = sysdb_getgrnam(cmdctx, dom, name, &dctx->res);
if (ret != EOK) {
- DEBUG(1, ("Failed to make request to our cache!\n"));
+ DEBUG(1, "Failed to make request to our cache!\n");
return EIO;
}
if (dctx->res->count > 1) {
- DEBUG(0, ("getgrnam call returned more than one result !?!\n"));
+ DEBUG(0, "getgrnam call returned more than one result !?!\n");
return ENOENT;
}
@@ -2693,8 +2693,8 @@ static int nss_cmd_getgrnam_search(struct nss_dom_ctx *dctx)
/* set negative cache only if not result of cache check */
ret = sss_ncache_set_group(nctx->ncache, false, dom, name);
if (ret != EOK) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Cannot set negcache for %s@%s\n",
- name, dom->name));
+ DEBUG(SSSDBG_MINOR_FAILURE, "Cannot set negcache for %s@%s\n",
+ name, dom->name);
}
/* if a multidomain search, try with next */
@@ -2703,14 +2703,14 @@ static int nss_cmd_getgrnam_search(struct nss_dom_ctx *dctx)
if (dom) continue;
}
- DEBUG(2, ("No results for getgrnam call\n"));
+ DEBUG(2, "No results for getgrnam call\n");
/* Group not found in ldb -> delete group from memory cache. */
ret = delete_entry_from_memcache(dctx->domain, name,
nctx->grp_mc_ctx);
if (ret != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Deleting group from memcache failed.\n"));
+ "Deleting group from memcache failed.\n");
}
@@ -2733,13 +2733,13 @@ static int nss_cmd_getgrnam_search(struct nss_dom_ctx *dctx)
}
/* One result found */
- DEBUG(6, ("Returning info for group [%s@%s]\n", name, dom->name));
+ DEBUG(6, "Returning info for group [%s@%s]\n", name, dom->name);
return EOK;
}
DEBUG(SSSDBG_MINOR_FAILURE,
- ("No matching domain found for [%s], fail!\n", cmdctx->name));
+ "No matching domain found for [%s], fail!\n", cmdctx->name);
return ENOENT;
}
@@ -2772,9 +2772,9 @@ static int nss_cmd_getgrgid_search(struct nss_dom_ctx *dctx)
/* check that the gid is valid for this domain */
if ((dom->id_min && (cmdctx->id < dom->id_min)) ||
(dom->id_max && (cmdctx->id > dom->id_max))) {
- DEBUG(4, ("Gid [%"PRIu32"] does not exist in domain [%s]! "
+ DEBUG(4, "Gid [%"PRIu32"] does not exist in domain [%s]! "
"(id out of range)\n",
- cmdctx->id, dom->name));
+ cmdctx->id, dom->name);
if (cmdctx->check_next) {
dom = get_next_domain(dom, true);
continue;
@@ -2792,23 +2792,23 @@ static int nss_cmd_getgrgid_search(struct nss_dom_ctx *dctx)
/* make sure to update the dctx if we changed domain */
dctx->domain = dom;
- DEBUG(4, ("Requesting info for [%"PRIu32"@%s]\n", cmdctx->id, dom->name));
+ DEBUG(4, "Requesting info for [%"PRIu32"@%s]\n", cmdctx->id, dom->name);
if (dom->sysdb == NULL) {
- DEBUG(0, ("Fatal: Sysdb CTX not found for this domain!\n"));
+ DEBUG(0, "Fatal: Sysdb CTX not found for this domain!\n");
ret = EIO;
goto done;
}
ret = sysdb_getgrgid(cmdctx, dom, cmdctx->id, &dctx->res);
if (ret != EOK) {
- DEBUG(1, ("Failed to make request to our cache!\n"));
+ DEBUG(1, "Failed to make request to our cache!\n");
ret = EIO;
goto done;
}
if (dctx->res->count > 1) {
- DEBUG(0, ("getgrgid call returned more than one result !?!\n"));
+ DEBUG(0, "getgrgid call returned more than one result !?!\n");
ret = ENOENT;
goto done;
}
@@ -2821,7 +2821,7 @@ static int nss_cmd_getgrgid_search(struct nss_dom_ctx *dctx)
}
/* set negative cache only if not result of cache check */
- DEBUG(SSSDBG_MINOR_FAILURE, ("No results for getgrgid call\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "No results for getgrgid call\n");
ret = ENOENT;
goto done;
}
@@ -2842,7 +2842,7 @@ static int nss_cmd_getgrgid_search(struct nss_dom_ctx *dctx)
}
/* One result found */
- DEBUG(6, ("Returning info for gid [%"PRIu32"@%s]\n", cmdctx->id, dom->name));
+ DEBUG(6, "Returning info for gid [%"PRIu32"@%s]\n", cmdctx->id, dom->name);
/* Success. Break from the loop and return EOK */
ret = EOK;
@@ -2857,11 +2857,11 @@ done:
err = sss_ncache_set_gid(nctx->ncache, false, cmdctx->id);
if (err != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Cannot set negative cache for GID %"PRIu32"\n", cmdctx->id));
+ "Cannot set negative cache for GID %"PRIu32"\n", cmdctx->id);
}
}
- DEBUG(SSSDBG_MINOR_FAILURE, ("No matching domain found for [%"PRIu32"]\n", cmdctx->id));
+ DEBUG(SSSDBG_MINOR_FAILURE, "No matching domain found for [%"PRIu32"]\n", cmdctx->id);
return ret;
}
@@ -2898,7 +2898,7 @@ static int nss_cmd_setgrent(struct cli_ctx *cctx)
req = nss_cmd_setgrent_send(cmdctx, cctx);
if (!req) {
- DEBUG(0, ("Fatal error calling nss_cmd_setgrent_send\n"));
+ DEBUG(0, "Fatal error calling nss_cmd_setgrent_send\n");
ret = EIO;
goto done;
}
@@ -2919,7 +2919,7 @@ struct tevent_req *nss_cmd_setgrent_send(TALLOC_CTX *mem_ctx,
struct sss_domain_info *dom;
struct setent_step_ctx *step_ctx;
- DEBUG(4, ("Received setgrent request\n"));
+ DEBUG(4, "Received setgrent request\n");
nctx = talloc_get_type(client->rctx->pvt_ctx, struct nss_ctx);
/* Reset the read pointers */
@@ -2928,7 +2928,7 @@ struct tevent_req *nss_cmd_setgrent_send(TALLOC_CTX *mem_ctx,
req = tevent_req_create(mem_ctx, &state, struct setent_ctx);
if (!req) {
- DEBUG(0, ("Could not create tevent request for setgrent\n"));
+ DEBUG(0, "Could not create tevent request for setgrent\n");
return NULL;
}
@@ -2948,7 +2948,7 @@ struct tevent_req *nss_cmd_setgrent_send(TALLOC_CTX *mem_ctx,
state->dctx->domain = dom;
if (state->dctx->domain == NULL) {
- DEBUG(2, ("Enumeration disabled on all domains!\n"));
+ DEBUG(2, "Enumeration disabled on all domains!\n");
ret = ENOENT;
goto error;
}
@@ -3068,10 +3068,10 @@ static errno_t nss_cmd_setgrent_step(struct setent_step_ctx *step_ctx)
/* make sure to update the dctx if we changed domain */
dctx->domain = dom;
- DEBUG(6, ("Requesting info for domain [%s]\n", dom->name));
+ DEBUG(6, "Requesting info for domain [%s]\n", dom->name);
if (dom->sysdb == NULL) {
- DEBUG(0, ("Fatal: Sysdb CTX not found for this domain!\n"));
+ DEBUG(0, "Fatal: Sysdb CTX not found for this domain!\n");
return EIO;
}
@@ -3086,9 +3086,9 @@ static errno_t nss_cmd_setgrent_step(struct setent_step_ctx *step_ctx)
SSS_DP_GROUP, NULL, 0, NULL);
if (!dpreq) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Enum Cache refresh for domain [%s] failed."
+ "Enum Cache refresh for domain [%s] failed."
" Trying to return what we have in cache!\n",
- dom->name));
+ dom->name);
} else {
cb_ctx = talloc_zero(step_ctx, struct dp_callback_ctx);
if(!cb_ctx) {
@@ -3109,14 +3109,14 @@ static errno_t nss_cmd_setgrent_step(struct setent_step_ctx *step_ctx)
ret = sysdb_enumgrent(dctx, dom, &res);
if (ret != EOK) {
- DEBUG(1, ("Enum from cache failed, skipping domain [%s]\n",
- dom->name));
+ DEBUG(1, "Enum from cache failed, skipping domain [%s]\n",
+ dom->name);
dom = get_next_domain(dom, true);
continue;
}
if (res->count == 0) {
- DEBUG(4, ("Domain [%s] has no groups, skipping.\n", dom->name));
+ DEBUG(4, "Domain [%s] has no groups, skipping.\n", dom->name);
dom = get_next_domain(dom, true);
continue;
}
@@ -3151,8 +3151,8 @@ static errno_t nss_cmd_setgrent_step(struct setent_step_ctx *step_ctx)
te = tevent_add_timer(rctx->ev, nctx->gctx, tv,
setgrent_result_timeout, nctx);
if (!te) {
- DEBUG(0, ("Could not set up life timer for setgrent result object. "
- "Entries may become stale.\n"));
+ DEBUG(0, "Could not set up life timer for setgrent result object. "
+ "Entries may become stale.\n");
}
/* Notify the waiting clients */
@@ -3173,7 +3173,7 @@ static void setgrent_result_timeout(struct tevent_context *ev,
{
struct nss_ctx *nctx = talloc_get_type(pvt, struct nss_ctx);
- DEBUG(1, ("setgrent result object has expired. Cleaning up.\n"));
+ DEBUG(1, "setgrent result object has expired. Cleaning up.\n");
/* Free the group enumeration context.
* If additional getgrent requests come in, they will invoke
@@ -3190,10 +3190,10 @@ static void nss_cmd_setgrent_dp_callback(uint16_t err_maj, uint32_t err_min,
int ret;
if (err_maj) {
- DEBUG(2, ("Unable to get information from Data Provider\n"
+ DEBUG(2, "Unable to get information from Data Provider\n"
"Error: %u, %u, %s\n"
"Will try to return what we have in cache\n",
- (unsigned int)err_maj, (unsigned int)err_min, err_msg));
+ (unsigned int)err_maj, (unsigned int)err_min, err_msg);
}
ret = nss_cmd_setgrent_step(step_ctx);
@@ -3317,7 +3317,7 @@ static int nss_cmd_getgrent(struct cli_ctx *cctx)
struct nss_cmd_ctx *cmdctx;
struct tevent_req *req;
- DEBUG(4, ("Requesting info for all groups\n"));
+ DEBUG(4, "Requesting info for all groups\n");
cmdctx = talloc_zero(cctx, struct nss_cmd_ctx);
if (!cmdctx) {
@@ -3363,8 +3363,8 @@ static void nss_cmd_implicit_setgrent_done(struct tevent_req *req)
* later.
*/
if (ret != EOK && ret != ENOENT) {
- DEBUG(0, ("Implicit setgrent failed with unexpected error [%d][%s]\n",
- ret, strerror(ret)));
+ DEBUG(0, "Implicit setgrent failed with unexpected error [%d][%s]\n",
+ ret, strerror(ret));
NSS_CMD_FATAL_ERROR(cmdctx);
}
@@ -3374,8 +3374,8 @@ static void nss_cmd_implicit_setgrent_done(struct tevent_req *req)
ret = nss_cmd_getgrent_immediate(cmdctx);
if (ret != EOK) {
- DEBUG(0, ("Immediate retrieval failed with unexpected error "
- "[%d][%s]\n", ret, strerror(ret)));
+ DEBUG(0, "Immediate retrieval failed with unexpected error "
+ "[%d][%s]\n", ret, strerror(ret));
NSS_CMD_FATAL_ERROR(cmdctx);
}
}
@@ -3385,7 +3385,7 @@ static int nss_cmd_endgrent(struct cli_ctx *cctx)
struct nss_ctx *nctx;
int ret;
- DEBUG(4, ("Terminating request info for all groups\n"));
+ DEBUG(4, "Terminating request info for all groups\n");
nctx = talloc_get_type(cctx->rctx->pvt_ctx, struct nss_ctx);
@@ -3430,7 +3430,7 @@ void nss_update_initgr_memcache(struct nss_ctx *nctx,
if (dom == NULL) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Unknown domain (%s) requested by provider\n", domain));
+ "Unknown domain (%s) requested by provider\n", domain);
return;
}
@@ -3439,8 +3439,8 @@ void nss_update_initgr_memcache(struct nss_ctx *nctx,
ret = sysdb_initgroups(tmp_ctx, dom, name, &res);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to make request to our cache! [%d][%s]\n",
- ret, strerror(ret)));
+ "Failed to make request to our cache! [%d][%s]\n",
+ ret, strerror(ret));
goto done;
}
@@ -3454,8 +3454,8 @@ void nss_update_initgr_memcache(struct nss_ctx *nctx,
ret = sss_mmap_cache_pw_invalidate(nctx->pwd_mc_ctx, &delete_name);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Internal failure in memory cache code: %d [%s]\n",
- ret, strerror(ret)));
+ "Internal failure in memory cache code: %d [%s]\n",
+ ret, strerror(ret));
}
/* Also invalidate his groups */
@@ -3501,8 +3501,8 @@ void nss_update_initgr_memcache(struct nss_ctx *nctx,
ret = sss_mmap_cache_gr_invalidate_gid(nctx->grp_mc_ctx, id);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Internal failure in memory cache code: %d [%s]\n",
- ret, strerror(ret)));
+ "Internal failure in memory cache code: %d [%s]\n",
+ ret, strerror(ret));
}
}
}
@@ -3564,7 +3564,7 @@ static int fill_initgr(struct sss_packet *packet, struct ldb_result *res)
skipped++;
continue;
} else {
- DEBUG(1, ("Incomplete group object for initgroups! Aborting\n"));
+ DEBUG(1, "Incomplete group object for initgroups! Aborting\n");
return EFAULT;
}
}
@@ -3588,7 +3588,7 @@ static int fill_initgr(struct sss_packet *packet, struct ldb_result *res)
ret = sss_packet_set_size(packet, blen);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Could not set packet size to value:%zu\n", blen));
+ "Could not set packet size to value:%zu\n", blen);
return ret;
}
@@ -3658,8 +3658,8 @@ static int nss_cmd_initgroups_search(struct nss_dom_ctx *dctx)
/* if neg cached, return we didn't find it */
if (ret == EEXIST) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("User [%s] does not exist in [%s]! (negative cache)\n",
- name, dom->name));
+ "User [%s] does not exist in [%s]! (negative cache)\n",
+ name, dom->name);
/* if a multidomain search, try with next */
if (cmdctx->check_next) {
dom = get_next_domain(dom, false);
@@ -3671,17 +3671,17 @@ static int nss_cmd_initgroups_search(struct nss_dom_ctx *dctx)
return ENOENT;
}
- DEBUG(4, ("Requesting info for [%s@%s]\n", name, dom->name));
+ DEBUG(4, "Requesting info for [%s@%s]\n", name, dom->name);
if (dom->sysdb == NULL) {
- DEBUG(0, ("Fatal: Sysdb CTX not found for this domain!\n"));
+ DEBUG(0, "Fatal: Sysdb CTX not found for this domain!\n");
return EIO;
}
ret = sysdb_initgroups(cmdctx, dom, name, &dctx->res);
if (ret != EOK) {
- DEBUG(1, ("Failed to make request to our cache! [%d][%s]\n",
- ret, strerror(ret)));
+ DEBUG(1, "Failed to make request to our cache! [%d][%s]\n",
+ ret, strerror(ret));
return EIO;
}
@@ -3689,8 +3689,8 @@ static int nss_cmd_initgroups_search(struct nss_dom_ctx *dctx)
/* set negative cache only if not result of cache check */
ret = sss_ncache_set_user(nctx->ncache, false, dom, name);
if (ret != EOK) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Cannot set negcache for %s@%s\n",
- name, dom->name));
+ DEBUG(SSSDBG_MINOR_FAILURE, "Cannot set negcache for %s@%s\n",
+ name, dom->name);
}
/* if a multidomain search, try with next */
@@ -3699,7 +3699,7 @@ static int nss_cmd_initgroups_search(struct nss_dom_ctx *dctx)
if (dom) continue;
}
- DEBUG(2, ("No results for initgroups call\n"));
+ DEBUG(2, "No results for initgroups call\n");
return ENOENT;
}
@@ -3719,12 +3719,12 @@ static int nss_cmd_initgroups_search(struct nss_dom_ctx *dctx)
}
}
- DEBUG(6, ("Initgroups for [%s@%s] completed\n", name, dom->name));
+ DEBUG(6, "Initgroups for [%s@%s] completed\n", name, dom->name);
return EOK;
}
DEBUG(SSSDBG_MINOR_FAILURE,
- ("No matching domain found for [%s], fail!\n", cmdctx->name));
+ "No matching domain found for [%s], fail!\n", cmdctx->name);
return ENOENT;
}
@@ -3762,9 +3762,9 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
if ((dom->id_min && (cmdctx->id < dom->id_min)) ||
(dom->id_max && (cmdctx->id > dom->id_max))) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Uid [%"PRIu32"] does not exist in domain [%s]! "
+ "Uid [%"PRIu32"] does not exist in domain [%s]! "
"(id out of range)\n",
- cmdctx->id, dom->name));
+ cmdctx->id, dom->name);
if (cmdctx->check_next) {
dom = get_next_domain(dom, true);
continue;
@@ -3792,15 +3792,15 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
dctx->domain = dom;
if (cmdctx->cmd == SSS_NSS_GETSIDBYID) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Requesting info for [%"PRIu32"@%s]\n",
- cmdctx->id, dom->name));
+ DEBUG(SSSDBG_TRACE_FUNC, "Requesting info for [%"PRIu32"@%s]\n",
+ cmdctx->id, dom->name);
} else {
talloc_free(name);
talloc_zfree(sysdb_name);
name = sss_get_cased_name(cmdctx, cmdctx->name, dom->case_sensitive);
if (name == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_get_cased_name failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_get_cased_name failed.\n");
ret = ENOMEM;
goto done;
}
@@ -3810,7 +3810,7 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
if (IS_SUBDOMAIN(dom)) {
sysdb_name = sss_tc_fqname(cmdctx, dom->names, dom, name);
if (sysdb_name == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_asprintf failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_asprintf failed.\n");
ret = ENOMEM;
goto done;
}
@@ -3825,8 +3825,8 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
/* if neg cached, return we didn't find it */
if (ret == EEXIST) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("User [%s] does not exist in [%s]! (negative cache)\n",
- name, dom->name));
+ "User [%s] does not exist in [%s]! (negative cache)\n",
+ name, dom->name);
/* if a multidomain search, try with next */
if (cmdctx->check_next) {
dom = get_next_domain(dom, false);
@@ -3839,15 +3839,15 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
goto done;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("Requesting info for [%s@%s]\n",
- name, dom->name));
+ DEBUG(SSSDBG_TRACE_FUNC, "Requesting info for [%s@%s]\n",
+ name, dom->name);
}
sysdb = dom->sysdb;
if (sysdb == NULL) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Fatal: Sysdb CTX not found for this domain!\n"));
+ "Fatal: Sysdb CTX not found for this domain!\n");
ret = EIO;
goto done;
}
@@ -3857,7 +3857,7 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
&msg);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to make request to our cache!\n"));
+ "Failed to make request to our cache!\n");
ret = EIO;
goto done;
}
@@ -3870,7 +3870,7 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
&msg);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to make request to our cache!\n"));
+ "Failed to make request to our cache!\n");
ret = EIO;
goto done;
}
@@ -3885,7 +3885,7 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
attrs, &msg);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to make request to our cache!\n"));
+ "Failed to make request to our cache!\n");
ret = EIO;
goto done;
}
@@ -3899,7 +3899,7 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
attrs, &msg);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to make request to our cache!\n"));
+ "Failed to make request to our cache!\n");
ret = EIO;
goto done;
}
@@ -3912,7 +3912,7 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
dctx->res = talloc_zero(cmdctx, struct ldb_result);
if (dctx->res == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_zero failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_zero failed.\n");
ret = ENOMEM;
goto done;
}
@@ -3921,7 +3921,7 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
dctx->res->count = 1;
dctx->res->msgs = talloc_array(dctx->res, struct ldb_message *, 1);
if (dctx->res->msgs == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_array failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_array failed.\n");
ret = ENOMEM;
goto done;
}
@@ -3933,13 +3933,13 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
ret = sss_ncache_set_user(nctx->ncache, false, dom, name);
if (ret != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Cannot set negcache for %s@%s\n", name, dom->name));
+ "Cannot set negcache for %s@%s\n", name, dom->name);
}
ret = sss_ncache_set_group(nctx->ncache, false, dom, name);
if (ret != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Cannot set negcache for %s@%s\n", name, dom->name));
+ "Cannot set negcache for %s@%s\n", name, dom->name);
}
}
/* if a multidomain search, try with next */
@@ -3948,7 +3948,7 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
continue;
}
- DEBUG(SSSDBG_OP_FAILURE, ("No matching user or group found.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "No matching user or group found.\n");
ret = ENOENT;
goto done;
}
@@ -3985,11 +3985,11 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
/* One result found */
if (cmdctx->cmd == SSS_NSS_GETSIDBYID) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Returning info for id [%"PRIu32"@%s]\n",
- cmdctx->id, dom->name));
+ DEBUG(SSSDBG_TRACE_FUNC, "Returning info for id [%"PRIu32"@%s]\n",
+ cmdctx->id, dom->name);
} else {
- DEBUG(SSSDBG_TRACE_FUNC, ("Returning info for user/group [%s@%s]\n",
- name, dom->name));
+ DEBUG(SSSDBG_TRACE_FUNC, "Returning info for user/group [%s@%s]\n",
+ name, dom->name);
}
/* Success. Break from the loop and return EOK */
@@ -4004,21 +4004,21 @@ done:
/* The entry was not found, need to set result in negative cache */
if (cmdctx->cmd == SSS_NSS_GETSIDBYID) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("No matching domain found for [%"PRIu32"], fail!\n", cmdctx->id));
+ "No matching domain found for [%"PRIu32"], fail!\n", cmdctx->id);
err = sss_ncache_set_uid(nctx->ncache, false, cmdctx->id);
if (err != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Cannot set negative cache for UID %"PRIu32"\n", cmdctx->id));
+ "Cannot set negative cache for UID %"PRIu32"\n", cmdctx->id);
}
err = sss_ncache_set_gid(nctx->ncache, false, cmdctx->id);
if (err != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Cannot set negative cache for GID %"PRIu32"\n", cmdctx->id));
+ "Cannot set negative cache for GID %"PRIu32"\n", cmdctx->id);
}
} else {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("No matching domain found for [%s], fail!\n", cmdctx->name));
+ "No matching domain found for [%s], fail!\n", cmdctx->name);
}
}
return ret;
@@ -4035,37 +4035,37 @@ static errno_t nss_cmd_getbysid_search(struct nss_dom_ctx *dctx)
nctx = talloc_get_type(cctx->rctx->pvt_ctx, struct nss_ctx);
- DEBUG(SSSDBG_TRACE_FUNC, ("Requesting info for [%s@%s]\n", cmdctx->secid,
- dom->name));
+ DEBUG(SSSDBG_TRACE_FUNC, "Requesting info for [%s@%s]\n", cmdctx->secid,
+ dom->name);
sysdb = dom->sysdb;
if (sysdb == NULL) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Fatal: Sysdb CTX not found for this " \
- "domain!\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Fatal: Sysdb CTX not found for this " \
+ "domain!\n");
return EIO;
}
ret = sysdb_search_object_by_sid(cmdctx, dom, cmdctx->secid, NULL,
&dctx->res);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to make request to our cache!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Failed to make request to our cache!\n");
return EIO;
}
if (dctx->res->count > 1) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("getbysid call returned more than one " \
- "result !?!\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "getbysid call returned more than one " \
+ "result !?!\n");
return ENOENT;
}
if (dctx->res->count == 0 && !dctx->check_provider) {
- DEBUG(2, ("No results for getbysid call.\n"));
+ DEBUG(2, "No results for getbysid call.\n");
/* set negative cache only if not result of cache check */
ret = sss_ncache_set_sid(nctx->ncache, false, cmdctx->secid);
if (ret != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Cannot set negative cache for %s\n", cmdctx->secid));
+ "Cannot set negative cache for %s\n", cmdctx->secid);
}
return ENOENT;
@@ -4087,8 +4087,8 @@ static errno_t nss_cmd_getbysid_search(struct nss_dom_ctx *dctx)
}
/* One result found */
- DEBUG(SSSDBG_TRACE_FUNC, ("Returning info for sid [%s@%s]\n", cmdctx->secid,
- dom->name));
+ DEBUG(SSSDBG_TRACE_FUNC, "Returning info for sid [%s@%s]\n", cmdctx->secid,
+ dom->name);
return EOK;
}
@@ -4103,7 +4103,7 @@ static errno_t find_sss_id_type(struct ldb_message *msg,
el = ldb_msg_find_element(msg, SYSDB_OBJECTCLASS);
if (el == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("Objectclass attribute not found.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Objectclass attribute not found.\n");
return EINVAL;
}
@@ -4141,7 +4141,7 @@ static errno_t fill_sid(struct sss_packet *packet,
sid_str = ldb_msg_find_attr_as_string(msg, SYSDB_SID_STR, NULL);
if (sid_str == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Missing SID.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Missing SID.\n");
return EINVAL;
}
@@ -4149,7 +4149,7 @@ static errno_t fill_sid(struct sss_packet *packet,
ret = sss_packet_grow(packet, sid.len + 3* sizeof(uint32_t));
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_packet_grow failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_packet_grow failed.\n");
return ret;
}
@@ -4180,19 +4180,19 @@ static errno_t fill_name(struct sss_packet *packet,
orig_name = ldb_msg_find_attr_as_string(msg, SYSDB_NAME, NULL);
if (orig_name == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Missing name.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Missing name.\n");
return EINVAL;
}
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_new failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_new failed.\n");
return ENOMEM;
}
cased_name= sss_get_cased_name(tmp_ctx, orig_name, dom->case_sensitive);
if (cased_name == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_get_cased_name failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_get_cased_name failed.\n");
ret = ENOMEM;
goto done;
}
@@ -4200,7 +4200,7 @@ static errno_t fill_name(struct sss_packet *packet,
if (add_domain) {
fq_name = sss_tc_fqname(tmp_ctx, dom->names, dom, cased_name);
if (fq_name == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_asprintf failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_asprintf failed.\n");
ret = ENOMEM;
goto done;
}
@@ -4211,7 +4211,7 @@ static errno_t fill_name(struct sss_packet *packet,
ret = sss_packet_grow(packet, name.len + 3 * sizeof(uint32_t));
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_packet_grow failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_packet_grow failed.\n");
goto done;
}
@@ -4247,13 +4247,13 @@ static errno_t fill_id(struct sss_packet *packet,
}
if (id == 0 || id >= UINT32_MAX) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid POSIX ID.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid POSIX ID.\n");
return EINVAL;
}
ret = sss_packet_grow(packet, 4 * sizeof(uint32_t));
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_packet_grow failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_packet_grow failed.\n");
return ret;
}
@@ -4288,7 +4288,7 @@ static errno_t nss_cmd_getbysid_send_reply(struct nss_dom_ctx *dctx)
ret = find_sss_id_type(dctx->res->msgs[0], dctx->domain->mpg, &id_type);
if (ret != 0) {
- DEBUG(SSSDBG_OP_FAILURE, ("find_sss_id_type failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "find_sss_id_type failed.\n");
return ret;
}
@@ -4307,7 +4307,7 @@ static errno_t nss_cmd_getbysid_send_reply(struct nss_dom_ctx *dctx)
ret = fill_sid(cctx->creq->out, id_type, dctx->res->msgs[0]);
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Unsupported request type.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Unsupported request type.\n");
return EINVAL;
}
if (ret != EOK) {
@@ -4334,14 +4334,14 @@ static int nss_check_well_known_sid(struct nss_cmd_ctx *cmdctx)
ret = well_known_sid_to_name(cmdctx->secid, &wk_dom_name, &wk_name);
if (ret != EOK) {
- DEBUG(SSSDBG_TRACE_ALL, ("SID [%s] is not a Well-Known SID.\n",
- cmdctx->secid));
+ DEBUG(SSSDBG_TRACE_ALL, "SID [%s] is not a Well-Known SID.\n",
+ cmdctx->secid);
return ret;
}
if (cmdctx->cmd != SSS_NSS_GETNAMEBYSID) {
DEBUG(SSSDBG_TRACE_ALL,
- ("Well-Known SIDs can only be translated to names.\n"));
+ "Well-Known SIDs can only be translated to names.\n");
return EINVAL;
}
@@ -4350,7 +4350,7 @@ static int nss_check_well_known_sid(struct nss_cmd_ctx *cmdctx)
fq_name = sss_tc_fqname2(cmdctx, nss_ctx->global_names,
wk_dom_name, wk_dom_name, wk_name);
if (fq_name == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_tc_fqname2 failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_tc_fqname2 failed.\n");
return ENOMEM;
}
to_sized_string(&name, fq_name);
@@ -4394,7 +4394,7 @@ static int nss_cmd_getbysid(enum sss_cli_command cmd, struct cli_ctx *cctx)
size_t bin_sid_length;
if (cmd != SSS_NSS_GETNAMEBYSID && cmd != SSS_NSS_GETIDBYSID) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command type [%d].\n", cmd));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid command type [%d].\n", cmd);
return EINVAL;
}
@@ -4430,18 +4430,18 @@ static int nss_cmd_getbysid(enum sss_cli_command cmd, struct cli_ctx *cctx)
&bin_sid, &bin_sid_length);
sss_idmap_free_bin_sid(nctx->idmap_ctx, bin_sid);
if (err != IDMAP_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_idmap_sid_to_bin_sid failed for [%s].\n",
- body));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_idmap_sid_to_bin_sid failed for [%s].\n",
+ body);
ret = EINVAL;
goto done;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("Running command [%d] with SID [%s].\n",
- dctx->cmdctx->cmd, sid_str));
+ DEBUG(SSSDBG_TRACE_FUNC, "Running command [%d] with SID [%s].\n",
+ dctx->cmdctx->cmd, sid_str);
cmdctx->secid = talloc_strdup(cmdctx, sid_str);
if (cmdctx->secid == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_strdup failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
ret = ENOMEM;
goto done;
}
@@ -4449,10 +4449,10 @@ static int nss_cmd_getbysid(enum sss_cli_command cmd, struct cli_ctx *cctx)
ret = nss_check_well_known_sid(cmdctx);
if (ret != ENOENT) {
if (ret == EOK) {
- DEBUG(SSSDBG_TRACE_ALL, ("SID [%s] is a Well-Known SID.\n",
- cmdctx->secid));
+ DEBUG(SSSDBG_TRACE_ALL, "SID [%s] is a Well-Known SID.\n",
+ cmdctx->secid);
} else {
- DEBUG(SSSDBG_OP_FAILURE, ("nss_check_well_known_sid failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "nss_check_well_known_sid failed.\n");
}
goto done;
}
@@ -4469,12 +4469,12 @@ static int nss_cmd_getbysid(enum sss_cli_command cmd, struct cli_ctx *cctx)
}
goto done;
} else if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("responder_get_domain_by_id failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "responder_get_domain_by_id failed.\n");
goto done;
}
- DEBUG(4, ("Requesting info for [%s] from [%s]\n",
- cmdctx->secid, dctx->domain->name));
+ DEBUG(4, "Requesting info for [%s] from [%s]\n",
+ cmdctx->secid, dctx->domain->name);
dctx->check_provider = NEED_CHECK_PROVIDER(dctx->domain->provider);
diff --git a/src/responder/nss/nsssrv_mmap_cache.c b/src/responder/nss/nsssrv_mmap_cache.c
index 36110d66c..8072bb38e 100644
--- a/src/responder/nss/nsssrv_mmap_cache.c
+++ b/src/responder/nss/nsssrv_mmap_cache.c
@@ -133,20 +133,20 @@ static void sss_mc_save_corrupted(struct sss_mc_ctx *mc_ctx)
if (mc_ctx == NULL) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Cannot store uninitialized cache. Nothing to do.\n"));
+ "Cannot store uninitialized cache. Nothing to do.\n");
return;
}
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory.\n");
return;
}
file = talloc_asprintf(tmp_ctx, "%s_%s",
mc_ctx->file, "corrupted");
if (file == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory.\n");
goto done;
}
@@ -155,8 +155,8 @@ static void sss_mc_save_corrupted(struct sss_mc_ctx *mc_ctx)
if (fd == -1) {
err = errno;
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to open file '%s' [%d]: %s\n",
- file, err, strerror(err)));
+ "Failed to open file '%s' [%d]: %s\n",
+ file, err, strerror(err));
goto done;
}
@@ -165,11 +165,11 @@ static void sss_mc_save_corrupted(struct sss_mc_ctx *mc_ctx)
if (written == -1) {
err = errno;
DEBUG(SSSDBG_CRIT_FAILURE,
- ("write() failed [%d]: %s\n", err, strerror(err)));
+ "write() failed [%d]: %s\n", err, strerror(err));
} else {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("write() returned %zd (expected (%zd))\n",
- written, mc_ctx->mmap_size));
+ "write() returned %zd (expected (%zd))\n",
+ written, mc_ctx->mmap_size);
}
goto done;
}
@@ -184,8 +184,8 @@ done:
if (err != 0) {
err = errno;
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to remove file '%s': %s.\n", file,
- strerror(err)));
+ "Failed to remove file '%s': %s.\n", file,
+ strerror(err));
}
}
}
@@ -474,7 +474,7 @@ static errno_t sss_mc_get_strs_offset(struct sss_mc_ctx *mcc,
*_offset = offsetof(struct sss_mc_grp_data, strs);
return EOK;
default:
- DEBUG(SSSDBG_FATAL_FAILURE, ("Unknown memory cache type.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Unknown memory cache type.\n");
return EINVAL;
}
}
@@ -491,7 +491,7 @@ static errno_t sss_mc_get_strs_len(struct sss_mc_ctx *mcc,
*_len = ((struct sss_mc_grp_data *)&rec->data)->strs_len;
return EOK;
default:
- DEBUG(SSSDBG_FATAL_FAILURE, ("Unknown memory cache type.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Unknown memory cache type.\n");
return EINVAL;
}
}
@@ -527,7 +527,7 @@ static struct sss_mc_rec *sss_mc_find_record(struct sss_mc_ctx *mcc,
while (slot != MC_INVALID_VAL) {
if (!MC_SLOT_WITHIN_BOUNDS(slot, mcc->dt_size)) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Corrupted fastcache. Slot number too big.\n"));
+ "Corrupted fastcache. Slot number too big.\n");
sss_mc_save_corrupted(mcc);
sss_mmap_cache_reset(mcc);
return NULL;
@@ -544,7 +544,7 @@ static struct sss_mc_rec *sss_mc_find_record(struct sss_mc_ctx *mcc,
|| (name_ptr + key->len) > (strs_offset + strs_len)
|| (uint8_t *)rec->data + strs_offset + strs_len > max_addr) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Corrupted fastcache. name_ptr value is %u.\n", name_ptr));
+ "Corrupted fastcache. name_ptr value is %u.\n", name_ptr);
sss_mc_save_corrupted(mcc);
sss_mmap_cache_reset(mcc);
return NULL;
@@ -600,7 +600,7 @@ static errno_t sss_mc_get_record(struct sss_mc_ctx **_mcc,
if (ret != EOK) {
if (ret == EFAULT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Fatal internal mmap cache error, invalidating cache!\n"));
+ "Fatal internal mmap cache error, invalidating cache!\n");
(void)sss_mmap_cache_reinit(talloc_parent(mcc), -1, -1, _mcc);
}
return ret;
@@ -785,7 +785,7 @@ errno_t sss_mmap_cache_pw_invalidate_uid(struct sss_mc_ctx *mcc, uid_t uid)
while (slot != MC_INVALID_VAL) {
if (!MC_SLOT_WITHIN_BOUNDS(slot, mcc->dt_size)) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Corrupted fastcache.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Corrupted fastcache.\n");
sss_mc_save_corrupted(mcc);
sss_mmap_cache_reset(mcc);
ret = ENOENT;
@@ -924,7 +924,7 @@ errno_t sss_mmap_cache_gr_invalidate_gid(struct sss_mc_ctx *mcc, gid_t gid)
while (slot != MC_INVALID_VAL) {
if (!MC_SLOT_WITHIN_BOUNDS(slot, mcc->dt_size)) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Corrupted fastcache.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Corrupted fastcache.\n");
sss_mc_save_corrupted(mcc);
sss_mmap_cache_reset(mcc);
ret = ENOENT;
@@ -1011,29 +1011,29 @@ static errno_t sss_mc_create_file(struct sss_mc_ctx *mc_ctx)
ret = sss_br_lock_file(ofd, 0, 1, retries, t);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Failed to lock file %s.\n", mc_ctx->file));
+ "Failed to lock file %s.\n", mc_ctx->file);
}
ret = sss_mc_set_recycled(ofd);
if (ret) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Failed to mark mmap file %s as"
+ DEBUG(SSSDBG_FATAL_FAILURE, "Failed to mark mmap file %s as"
" recycled: %d(%s)\n",
- mc_ctx->file, ret, strerror(ret)));
+ mc_ctx->file, ret, strerror(ret));
}
close(ofd);
} else if (errno != ENOENT) {
ret = errno;
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to open old memory cache file %s: %d(%s).\n",
- mc_ctx->file, ret, strerror(ret)));
+ "Failed to open old memory cache file %s: %d(%s).\n",
+ mc_ctx->file, ret, strerror(ret));
}
errno = 0;
ret = unlink(mc_ctx->file);
if (ret == -1 && errno != ENOENT) {
ret = errno;
- DEBUG(SSSDBG_TRACE_FUNC, ("Failed to rm mmap file %s: %d(%s)\n",
- mc_ctx->file, ret, strerror(ret)));
+ DEBUG(SSSDBG_TRACE_FUNC, "Failed to rm mmap file %s: %d(%s)\n",
+ mc_ctx->file, ret, strerror(ret));
}
/* temporarily relax umask as we need the file to be readable
@@ -1045,15 +1045,15 @@ static errno_t sss_mc_create_file(struct sss_mc_ctx *mc_ctx)
umask(old_mask);
if (mc_ctx->fd == -1) {
ret = errno;
- DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to open mmap file %s: %d(%s)\n",
- mc_ctx->file, ret, strerror(ret)));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Failed to open mmap file %s: %d(%s)\n",
+ mc_ctx->file, ret, strerror(ret));
return ret;
}
ret = sss_br_lock_file(mc_ctx->fd, 0, 1, retries, t);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Failed to lock file %s.\n", mc_ctx->file));
+ "Failed to lock file %s.\n", mc_ctx->file);
close(mc_ctx->fd);
mc_ctx->fd = -1;
@@ -1064,8 +1064,8 @@ static errno_t sss_mc_create_file(struct sss_mc_ctx *mc_ctx)
uret = unlink(mc_ctx->file);
if (uret == -1) {
uret = errno;
- DEBUG(SSSDBG_TRACE_FUNC, ("Failed to rm mmap file %s: %d(%s)\n",
- mc_ctx->file, uret, strerror(uret)));
+ DEBUG(SSSDBG_TRACE_FUNC, "Failed to rm mmap file %s: %d(%s)\n",
+ mc_ctx->file, uret, strerror(uret));
}
return ret;
@@ -1111,8 +1111,8 @@ static int mc_ctx_destructor(struct sss_mc_ctx *mc_ctx)
if (ret == -1) {
ret = errno;
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to unmap old memory cache file."
- "[%d]: %s\n", ret, strerror(ret)));
+ "Failed to unmap old memory cache file."
+ "[%d]: %s\n", ret, strerror(ret));
}
}
@@ -1121,8 +1121,8 @@ static int mc_ctx_destructor(struct sss_mc_ctx *mc_ctx)
if (ret == -1) {
ret = errno;
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to close old memory cache file."
- "[%d]: %s\n", ret, strerror(ret)));
+ "Failed to close old memory cache file."
+ "[%d]: %s\n", ret, strerror(ret));
}
}
@@ -1199,8 +1199,8 @@ errno_t sss_mmap_cache_init(TALLOC_CTX *mem_ctx, const char *name,
ret = ftruncate(mc_ctx->fd, mc_ctx->mmap_size);
if (ret == -1) {
ret = errno;
- DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to resize file %s: %d(%s)\n",
- mc_ctx->file, ret, strerror(ret)));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Failed to resize file %s: %d(%s)\n",
+ mc_ctx->file, ret, strerror(ret));
goto done;
}
@@ -1209,9 +1209,9 @@ errno_t sss_mmap_cache_init(TALLOC_CTX *mem_ctx, const char *name,
MAP_SHARED, mc_ctx->fd, 0);
if (mc_ctx->mmap_base == MAP_FAILED) {
ret = errno;
- DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to mmap file %s(%zu): %d(%s)\n",
+ DEBUG(SSSDBG_CRIT_FAILURE, "Failed to mmap file %s(%zu): %d(%s)\n",
mc_ctx->file, mc_ctx->mmap_size,
- ret, strerror(ret)));
+ ret, strerror(ret));
goto done;
}
@@ -1242,8 +1242,8 @@ done:
dret = unlink(mc_ctx->file);
if (dret == -1) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to rm mmap file %s: %d(%s)\n", mc_ctx->file,
- dret, strerror(dret)));
+ "Failed to rm mmap file %s: %d(%s)\n", mc_ctx->file,
+ dret, strerror(dret));
}
}
@@ -1264,19 +1264,19 @@ errno_t sss_mmap_cache_reinit(TALLOC_CTX *mem_ctx, size_t n_elem,
if (mc_ctx == NULL || (*mc_ctx) == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to re-init unitialized memory cache.\n"));
+ "Unable to re-init unitialized memory cache.\n");
return EINVAL;
}
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory.\n");
return ENOMEM;
}
name = talloc_strdup(tmp_ctx, (*mc_ctx)->name);
if (name == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory.\n");
ret = ENOMEM;
goto done;
}
@@ -1298,7 +1298,7 @@ errno_t sss_mmap_cache_reinit(TALLOC_CTX *mem_ctx, size_t n_elem,
ret = sss_mmap_cache_init(mem_ctx, name, type, n_elem, timeout, mc_ctx);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to re-initialize mmap cache.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Failed to re-initialize mmap cache.\n");
goto done;
}
@@ -1313,7 +1313,7 @@ void sss_mmap_cache_reset(struct sss_mc_ctx *mc_ctx)
{
if (mc_ctx == NULL) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Fastcache not initialized. Nothing to do.\n"));
+ "Fastcache not initialized. Nothing to do.\n");
return;
}
diff --git a/src/responder/nss/nsssrv_netgroup.c b/src/responder/nss/nsssrv_netgroup.c
index 0028a8878..469445f88 100644
--- a/src/responder/nss/nsssrv_netgroup.c
+++ b/src/responder/nss/nsssrv_netgroup.c
@@ -50,8 +50,8 @@ static errno_t get_netgroup_entry(struct nss_ctx *nctx,
return ENOENT;
}
- DEBUG(1, ("Unexpected error reading from netgroup hash [%d][%s]\n",
- hret, hash_error_string(hret)));
+ DEBUG(1, "Unexpected error reading from netgroup hash [%d][%s]\n",
+ hret, hash_error_string(hret));
return EIO;
}
@@ -64,7 +64,7 @@ static errno_t set_netgroup_entry(struct nss_ctx *nctx,
int hret;
if (netgr->name == NULL) {
- DEBUG(1, ("Missing netgroup name.\n"));
+ DEBUG(1, "Missing netgroup name.\n");
return EINVAL;
}
/* Add this entry to the hash table */
@@ -74,8 +74,8 @@ static errno_t set_netgroup_entry(struct nss_ctx *nctx,
value.ptr = netgr;
hret = hash_enter(nctx->netgroups, &key, &value);
if (hret != EOK) {
- DEBUG(0, ("Unable to add hash table entry for [%s]", key.str));
- DEBUG(4, ("Hash error [%d][%s]", hret, hash_error_string(hret)));
+ DEBUG(0, "Unable to add hash table entry for [%s]", key.str);
+ DEBUG(4, "Hash error [%d][%s]", hret, hash_error_string(hret));
return EIO;
}
talloc_steal(nctx->netgroups, netgr);
@@ -125,7 +125,7 @@ int nss_cmd_setnetgrent(struct cli_ctx *client)
req = setnetgrent_send(cmdctx, rawname, cmdctx);
if (!req) {
- DEBUG(0, ("Fatal error calling setnetgrent_send\n"));
+ DEBUG(0, "Fatal error calling setnetgrent_send\n");
ret = EIO;
goto done;
}
@@ -143,8 +143,8 @@ static int netgr_hash_remove (TALLOC_CTX *ctx)
talloc_get_type(ctx, struct getent_ctx);
if (netgr->lookup_table == NULL) {
- DEBUG(SSSDBG_TRACE_LIBS, ("netgroup [%s] was already removed\n",
- netgr->name));
+ DEBUG(SSSDBG_TRACE_LIBS, "netgroup [%s] was already removed\n",
+ netgr->name);
return EOK;
}
@@ -154,8 +154,8 @@ static int netgr_hash_remove (TALLOC_CTX *ctx)
/* Remove the netgroup result object from the lookup table */
hret = hash_delete(netgr->lookup_table, &key);
if (hret != HASH_SUCCESS) {
- DEBUG(0, ("Could not remove key [%s] from table! [%d][%s]\n",
- netgr->name, hret, hash_error_string(hret)));
+ DEBUG(0, "Could not remove key [%s] from table! [%d][%s]\n",
+ netgr->name, hret, hash_error_string(hret));
return -1;
}
return 0;
@@ -187,7 +187,7 @@ static struct tevent_req *setnetgrent_send(TALLOC_CTX *mem_ctx,
req = tevent_req_create(mem_ctx, &state, struct setnetgrent_ctx);
if (!req) {
- DEBUG(0, ("Could not create tevent request for setnetgrent\n"));
+ DEBUG(0, "Could not create tevent request for setnetgrent\n");
return NULL;
}
@@ -207,12 +207,12 @@ static struct tevent_req *setnetgrent_send(TALLOC_CTX *mem_ctx,
client->rctx->default_domain, rawname,
&domname, &state->netgr_shortname);
if (ret != EOK) {
- DEBUG(2, ("Invalid name received [%s]\n", rawname));
+ DEBUG(2, "Invalid name received [%s]\n", rawname);
goto error;
}
- DEBUG(4, ("Requesting info for netgroup [%s] from [%s]\n",
- state->netgr_shortname, domname?domname:"<ALL>"));
+ DEBUG(4, "Requesting info for netgroup [%s] from [%s]\n",
+ state->netgr_shortname, domname?domname:"<ALL>");
if (domname) {
dctx->domain = responder_get_domain(client->rctx, domname);
@@ -341,7 +341,7 @@ static errno_t setnetgrent_retry(struct tevent_req *req)
ret = set_netgroup_entry(nctx, state->netgr);
if (ret != EOK) {
- DEBUG(1, ("set_netgroup_entry failed.\n"));
+ DEBUG(1, "set_netgroup_entry failed.\n");
talloc_free(state->netgr);
goto done;
}
@@ -418,8 +418,8 @@ static void set_netgr_lifetime(uint32_t lifetime,
setnetgrent_result_timeout,
netgr);
if (!te) {
- DEBUG(0, ("Could not set up life timer for setnetgrent result object. "
- "Entries may become stale.\n"));
+ DEBUG(0, "Could not set up life timer for setnetgrent result object. "
+ "Entries may become stale.\n");
}
}
@@ -454,14 +454,14 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx)
name = sss_get_cased_name(step_ctx, step_ctx->name,
dom->case_sensitive);
if (!name) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("sss_get_cased_name failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "sss_get_cased_name failed\n");
return ENOMEM;
}
- DEBUG(4, ("Requesting info for [%s@%s]\n",
- name, dom->name));
+ DEBUG(4, "Requesting info for [%s@%s]\n",
+ name, dom->name);
if (dom->sysdb == NULL) {
- DEBUG(0, ("Fatal: Sysdb CTX not found for this domain!\n"));
+ DEBUG(0, "Fatal: Sysdb CTX not found for this domain!\n");
return EIO;
}
@@ -469,7 +469,7 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx)
ret = sysdb_getnetgr(step_ctx->dctx, dom, name, &step_ctx->dctx->res);
if (step_ctx->dctx->res->count > 1) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("getnetgr call returned more than one result !?!\n"));
+ "getnetgr call returned more than one result !?!\n");
return EMSGSIZE;
}
if (ret == ENOENT) {
@@ -485,7 +485,7 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx)
}
if (ret != EOK) {
- DEBUG(1, ("Failed to make request to our cache!\n"));
+ DEBUG(1, "Failed to make request to our cache!\n");
return EIO;
}
@@ -493,7 +493,7 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx)
&netgr);
if (ret != EOK) {
/* Something really bad happened! */
- DEBUG(0, ("Netgroup entry was lost!\n"));
+ DEBUG(0, "Netgroup entry was lost!\n");
return ret;
}
@@ -502,8 +502,8 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx)
&netgr->entries);
if (ret == ENOENT) {
/* This netgroup was not found in this domain */
- DEBUG(2, ("No results for netgroup %s (domain %s)\n",
- name, dom->name));
+ DEBUG(2, "No results for netgroup %s (domain %s)\n",
+ name, dom->name);
if (!step_ctx->dctx->check_provider) {
if (step_ctx->check_next) {
@@ -516,7 +516,7 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx)
}
if (ret != EOK) {
- DEBUG(1, ("Failed to convert results into entries\n"));
+ DEBUG(1, "Failed to convert results into entries\n");
netgr->ready = true;
netgr->found = false;
set_netgr_lifetime(step_ctx->nctx->neg_timeout, step_ctx, netgr);
@@ -542,8 +542,8 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx)
}
/* Results found */
- DEBUG(6, ("Returning info for netgroup [%s@%s]\n",
- name, dom->name));
+ DEBUG(6, "Returning info for netgroup [%s@%s]\n",
+ name, dom->name);
netgr->ready = true;
netgr->found = true;
if (step_ctx->nctx->cache_refresh_percent) {
@@ -559,11 +559,11 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx)
/* If we've gotten here, then no domain contained this netgroup */
DEBUG(SSSDBG_MINOR_FAILURE,
- ("No matching domain found for [%s], fail!\n", step_ctx->name));
+ "No matching domain found for [%s], fail!\n", step_ctx->name);
netgr = talloc_zero(step_ctx->nctx, struct getent_ctx);
if (netgr == NULL) {
- DEBUG(1, ("talloc_zero failed, ignored.\n"));
+ DEBUG(1, "talloc_zero failed, ignored.\n");
} else {
netgr->ready = true;
netgr->found = false;
@@ -571,14 +571,14 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx)
netgr->lookup_table = step_ctx->nctx->netgroups;
netgr->name = talloc_strdup(netgr, step_ctx->name);
if (netgr->name == NULL) {
- DEBUG(1, ("talloc_strdup failed.\n"));
+ DEBUG(1, "talloc_strdup failed.\n");
talloc_free(netgr);
return ENOMEM;
}
ret = set_netgroup_entry(step_ctx->nctx, netgr);
if (ret != EOK) {
- DEBUG(1, ("set_netgroup_entry failed, ignored.\n"));
+ DEBUG(1, "set_netgroup_entry failed, ignored.\n");
}
set_netgr_lifetime(step_ctx->nctx->neg_timeout, step_ctx, netgr);
}
@@ -596,10 +596,10 @@ static void lookup_netgr_dp_callback(uint16_t err_maj, uint32_t err_min,
int ret;
if (err_maj) {
- DEBUG(2, ("Unable to get information from Data Provider\n"
+ DEBUG(2, "Unable to get information from Data Provider\n"
"Error: %u, %u, %s\n"
"Will try to return what we have in cache\n",
- (unsigned int)err_maj, (unsigned int)err_min, err_msg));
+ (unsigned int)err_maj, (unsigned int)err_min, err_msg);
/* Loop to the next domain if possible */
if (cmdctx->check_next && get_next_domain(dctx->domain, false)) {
dctx->domain = get_next_domain(dctx->domain, false);
@@ -658,7 +658,7 @@ static void nss_cmd_setnetgrent_done(struct tevent_req *req)
reqret = setnetgrent_recv(req);
talloc_zfree(req);
if (reqret != EOK && reqret != ENOENT) {
- DEBUG(1, ("setnetgrent failed\n"));
+ DEBUG(1, "setnetgrent failed\n");
nss_cmd_done(cmdctx, reqret);
return;
}
@@ -675,7 +675,7 @@ static void nss_cmd_setnetgrent_done(struct tevent_req *req)
packet = cmdctx->cctx->creq->out;
ret = sss_packet_grow(packet, 2*sizeof(uint32_t));
if (ret != EOK) {
- DEBUG(1, ("Couldn't grow the packet\n"));
+ DEBUG(1, "Couldn't grow the packet\n");
NSS_CMD_FATAL_ERROR(cmdctx);
}
@@ -692,7 +692,7 @@ static void nss_cmd_setnetgrent_done(struct tevent_req *req)
return;
}
- DEBUG(1, ("Error creating packet\n"));
+ DEBUG(1, "Error creating packet\n");
}
static void setnetgrent_implicit_done(struct tevent_req *req);
@@ -706,7 +706,7 @@ int nss_cmd_getnetgrent(struct cli_ctx *client)
struct getent_ctx *netgr;
struct tevent_req *req;
- DEBUG(4, ("Requesting netgroup data\n"));
+ DEBUG(4, "Requesting netgroup data\n");
cmdctx = talloc_zero(client, struct nss_cmd_ctx);
if (!cmdctx) {
@@ -739,8 +739,8 @@ int nss_cmd_getnetgrent(struct cli_ctx *client)
return EOK;
} else if (ret != EOK) {
- DEBUG(1, ("An unexpected error occurred: [%d][%s]\n",
- ret, strerror(ret)));
+ DEBUG(1, "An unexpected error occurred: [%d][%s]\n",
+ ret, strerror(ret));
return nss_cmd_done(cmdctx, ret);
}
@@ -758,16 +758,16 @@ int nss_cmd_getnetgrent(struct cli_ctx *client)
return EOK;
} else if (!netgr->found) {
- DEBUG(6, ("Results for [%s] not found.\n", client->netgr_name));
+ DEBUG(6, "Results for [%s] not found.\n", client->netgr_name);
return ENOENT;
}
- DEBUG(6, ("Returning results for [%s]\n", client->netgr_name));
+ DEBUG(6, "Returning results for [%s]\n", client->netgr_name);
/* Read the result strings */
ret = nss_cmd_getnetgrent_process(cmdctx, netgr);
if (ret != EOK) {
- DEBUG(1, ("Failed: [%d][%s]\n", ret, strerror(ret)));
+ DEBUG(1, "Failed: [%d][%s]\n", ret, strerror(ret));
}
return ret;
}
@@ -789,8 +789,8 @@ static void setnetgrent_implicit_done(struct tevent_req *req)
* nss_cmd_retnetgrent later
*/
if (ret != EOK && ret != ENOENT) {
- DEBUG(0, ("Implicit setnetgrent failed with unexpected error "
- "[%d][%s]\n", ret, strerror(ret)));
+ DEBUG(0, "Implicit setnetgrent failed with unexpected error "
+ "[%d][%s]\n", ret, strerror(ret));
NSS_CMD_FATAL_ERROR(cmdctx);
}
@@ -804,27 +804,27 @@ static void setnetgrent_implicit_done(struct tevent_req *req)
ret = get_netgroup_entry(nctx, cmdctx->cctx->netgr_name, &netgr);
if (ret == ENOENT) {
/* Critical error. This should never happen */
- DEBUG(0, ("Implicit setnetgrent returned success without creating "
- "result object.\n"));
+ DEBUG(0, "Implicit setnetgrent returned success without creating "
+ "result object.\n");
NSS_CMD_FATAL_ERROR(cmdctx);
} else if (ret != EOK) {
- DEBUG(1, ("An unexpected error occurred: [%d][%s]\n",
- ret, strerror(ret)));
+ DEBUG(1, "An unexpected error occurred: [%d][%s]\n",
+ ret, strerror(ret));
NSS_CMD_FATAL_ERROR(cmdctx);
}
if (!netgr->ready) {
/* Critical error. This should never happen */
- DEBUG(0, ("Implicit setnetgrent returned success without creating "
- "result object.\n"));
+ DEBUG(0, "Implicit setnetgrent returned success without creating "
+ "result object.\n");
NSS_CMD_FATAL_ERROR(cmdctx);
}
ret = nss_cmd_getnetgrent_process(cmdctx, netgr);
if (ret != EOK) {
- DEBUG(0, ("Immediate retrieval failed with unexpected error "
- "[%d][%s]\n", ret, strerror(ret)));
+ DEBUG(0, "Immediate retrieval failed with unexpected error "
+ "[%d][%s]\n", ret, strerror(ret));
NSS_CMD_FATAL_ERROR(cmdctx);
}
}
@@ -858,7 +858,7 @@ static errno_t nss_cmd_getnetgrent_process(struct nss_cmd_ctx *cmdctx,
if (!netgr->entries || netgr->entries[0] == NULL) {
/* No entries */
- DEBUG(5, ("No entries found\n"));
+ DEBUG(5, "No entries found\n");
ret = sss_cmd_empty_packet(client->creq->out);
if (ret != EOK) {
return nss_cmd_done(cmdctx, ret);
@@ -953,7 +953,7 @@ static errno_t nss_cmd_retnetgrent(struct cli_ctx *client,
} else if (entries[client->netgrent_cur]->type == SYSDB_NETGROUP_GROUP_VAL) {
if (entries[client->netgrent_cur]->value.groupname == NULL ||
entries[client->netgrent_cur]->value.groupname[0] == '\0') {
- DEBUG(1, ("Empty netgroup member. Please check your cache.\n"));
+ DEBUG(1, "Empty netgroup member. Please check your cache.\n");
continue;
}
@@ -975,8 +975,8 @@ static errno_t nss_cmd_retnetgrent(struct cli_ctx *client,
grouplen);
rp += grouplen;
} else {
- DEBUG(1, ("Unexpected value type for netgroup entry. "
- "Please check your cache.\n"));
+ DEBUG(1, "Unexpected value type for netgroup entry. "
+ "Please check your cache.\n");
continue;
}
@@ -1028,7 +1028,7 @@ netgroup_hash_delete_cb(hash_entry_t *item,
netgr = talloc_get_type(item->value.ptr, struct getent_ctx);
if (!netgr) {
- DEBUG(SSSDBG_OP_FAILURE, ("Invalid netgroup\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Invalid netgroup\n");
return;
}
@@ -1053,13 +1053,13 @@ errno_t nss_orphan_netgroups(struct nss_ctx *nctx)
return EIO;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("Removing netgroups from memory cache.\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Removing netgroups from memory cache.\n");
for (i = 0; i < mcount; i++) {
/* netgroup entry will be deleted by setnetgrent_result_timeout */
hret = hash_delete(nctx->netgroups, &netgroups[i]);
if (hret != HASH_SUCCESS) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Could not delete key from hash\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "Could not delete key from hash\n");
continue;
}
}
diff --git a/src/responder/nss/nsssrv_private.h b/src/responder/nss/nsssrv_private.h
index c1d6b119c..fbfe5ee94 100644
--- a/src/responder/nss/nsssrv_private.h
+++ b/src/responder/nss/nsssrv_private.h
@@ -95,13 +95,13 @@ struct setent_step_ctx {
};
#define NSS_CMD_FATAL_ERROR(cctx) do { \
- DEBUG(1,("Fatal error, killing connection!\n")); \
+ DEBUG(1,"Fatal error, killing connection!\n"); \
talloc_free(cctx); \
return; \
} while(0)
#define NSS_CMD_FATAL_ERROR_CODE(cctx, ret) do { \
- DEBUG(1,("Fatal error, killing connection!\n")); \
+ DEBUG(1,"Fatal error, killing connection!\n"); \
talloc_free(cctx); \
return ret; \
} while(0)
diff --git a/src/responder/nss/nsssrv_services.c b/src/responder/nss/nsssrv_services.c
index 80c59e2d8..7cfaf1e6b 100644
--- a/src/responder/nss/nsssrv_services.c
+++ b/src/responder/nss/nsssrv_services.c
@@ -166,7 +166,7 @@ getserv_send(TALLOC_CTX *mem_ctx,
if (dom->sysdb == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Critical: Sysdb CTX not found for [%s]!\n", dom->name));
+ "Critical: Sysdb CTX not found for [%s]!\n", dom->name);
ret = EINVAL;
goto immediate;
}
@@ -182,11 +182,11 @@ getserv_send(TALLOC_CTX *mem_ctx,
/* If negatively cached, return we didn't find it */
if (ret == EEXIST) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Service [%s:%s] does not exist in [%s]! "
+ "Service [%s:%s] does not exist in [%s]! "
"(negative cache)\n",
SVC_NAME_CASED,
SVC_PROTO_CASED ? SVC_PROTO_CASED : "<ANY>",
- dom->name));
+ dom->name);
/* If this is a multi-domain search, try the next one */
if (cmdctx->check_next) {
@@ -205,10 +205,10 @@ getserv_send(TALLOC_CTX *mem_ctx,
/* Check the cache */
DEBUG(SSSDBG_TRACE_FUNC,
- ("Checking cache for [%s:%s@%s]\n",
+ "Checking cache for [%s:%s@%s]\n",
SVC_NAME_CASED,
SVC_PROTO_CASED ? SVC_PROTO_CASED : "<ANY>",
- dom->name));
+ dom->name);
ret = sysdb_getservbyname(state, dom,
SVC_NAME_CASED,
@@ -223,11 +223,11 @@ getserv_send(TALLOC_CTX *mem_ctx,
/* If negatively cached, return we didn't find it */
if (ret == EEXIST) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Service [%"PRIu16":%s] does not exist in [%s]! "
+ "Service [%"PRIu16":%s] does not exist in [%s]! "
"(negative cache)\n",
port,
SVC_PROTO_CASED ? SVC_PROTO_CASED : "<ANY>",
- dom->name));
+ dom->name);
/* If this is a multi-domain search, try the next one */
if (cmdctx->check_next) {
@@ -246,10 +246,10 @@ getserv_send(TALLOC_CTX *mem_ctx,
/* Check the cache */
DEBUG(SSSDBG_TRACE_FUNC,
- ("Checking cache for [%"PRIu16":%s@%s]\n",
+ "Checking cache for [%"PRIu16":%s@%s]\n",
port,
SVC_PROTO_CASED ? SVC_PROTO_CASED : "<ANY>",
- dom->name));
+ dom->name);
ret = sysdb_getservbyport(state, dom, port,
SVC_PROTO_CASED,
@@ -276,8 +276,8 @@ getserv_send(TALLOC_CTX *mem_ctx,
* We'll log an error and continue.
*/
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Could not set negative cache for [%s][%s]\n",
- SVC_NAME_CASED, SVC_PROTO_CASED));
+ "Could not set negative cache for [%s][%s]\n",
+ SVC_NAME_CASED, SVC_PROTO_CASED);
}
} else {
ret = sss_ncache_set_service_port(nctx->ncache, false,
@@ -289,9 +289,9 @@ getserv_send(TALLOC_CTX *mem_ctx,
* We'll log an error and continue.
*/
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Could not set negative cache for "
+ "Could not set negative cache for "
"[%"PRIu16"][%s]\n",
- state->port, SVC_PROTO_CASED));
+ state->port, SVC_PROTO_CASED);
}
}
}
@@ -311,7 +311,7 @@ getserv_send(TALLOC_CTX *mem_ctx,
/* Found a result. Check its validity */
if (state->res->count > 1) {
DEBUG(SSSDBG_OP_FAILURE,
- ("getservby* returned more than one result!\n"));
+ "getservby* returned more than one result!\n");
ret = ENOENT;
goto immediate;
}
@@ -346,7 +346,7 @@ getserv_send(TALLOC_CTX *mem_ctx,
* queue the cache entry for update out-of-band.
*/
DEBUG(SSSDBG_TRACE_FUNC,
- ("Performing midpoint cache update\n"));
+ "Performing midpoint cache update\n");
/* Update the cache */
subreq = sss_dp_get_account_send(cctx, cctx->rctx,
@@ -356,8 +356,8 @@ getserv_send(TALLOC_CTX *mem_ctx,
port, NULL);
if (!subreq) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Out of memory sending out-of-band data provider "
- "request\n"));
+ "Out of memory sending out-of-band data provider "
+ "request\n");
/* This is non-fatal, so we'll continue here */
}
/* We don't need to listen for a reply, so we will free the
@@ -464,11 +464,11 @@ static void lookup_service_done(struct tevent_req *subreq)
talloc_zfree(subreq);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Unable to get information from Data Provider\n"
+ "Unable to get information from Data Provider\n"
"dp_error: [%u], errno: [%u], error_msg: [%s]\n"
"Will try to return what we have in cache\n",
(unsigned int)err_maj, (unsigned int)err_min,
- err_msg ? err_msg : "none"));
+ err_msg ? err_msg : "none");
}
/* Recheck the cache after the lookup.
@@ -480,18 +480,18 @@ static void lookup_service_done(struct tevent_req *subreq)
*/
if (dom->sysdb == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Critical: Sysdb CTX not found for [%s]!\n",
- dom->name));
+ "Critical: Sysdb CTX not found for [%s]!\n",
+ dom->name);
ret = EINVAL;
goto done;
}
if (state->name) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Re-checking cache for [%s:%s@%s]\n",
+ "Re-checking cache for [%s:%s@%s]\n",
SVC_NAME_CASED,
SVC_PROTO_CASED ? SVC_PROTO_CASED : "<ANY>",
- dom->name));
+ dom->name);
ret = sysdb_getservbyname(state, dom,
SVC_NAME_CASED,
@@ -499,10 +499,10 @@ static void lookup_service_done(struct tevent_req *subreq)
&state->res);
} else {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Re-checking cache for [%"PRIu16":%s@%s]\n",
+ "Re-checking cache for [%"PRIu16":%s@%s]\n",
state->port,
SVC_PROTO_CASED ? SVC_PROTO_CASED : "<ANY>",
- dom->name));
+ dom->name);
ret = sysdb_getservbyport(state, dom,
state->port,
@@ -524,8 +524,8 @@ static void lookup_service_done(struct tevent_req *subreq)
* We'll log an error and continue.
*/
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Could not set negative cache for [%s][%s]\n",
- SVC_NAME_CASED, SVC_PROTO_CASED));
+ "Could not set negative cache for [%s][%s]\n",
+ SVC_NAME_CASED, SVC_PROTO_CASED);
}
} else {
ret = sss_ncache_set_service_port(nctx->ncache, false,
@@ -537,8 +537,8 @@ static void lookup_service_done(struct tevent_req *subreq)
* We'll log an error and continue.
*/
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Could not set negative cache for [%"PRIu16"][%s]\n",
- state->port, SVC_PROTO_CASED));
+ "Could not set negative cache for [%"PRIu16"][%s]\n",
+ state->port, SVC_PROTO_CASED);
}
}
@@ -631,8 +631,8 @@ fill_service(struct sss_packet *packet,
/* new service */
if (!ldb_msg_check_string_attribute(msg, "objectClass",
SYSDB_SVC_CLASS)) {
- DEBUG(1, ("Wrong object (%s) found on stack!\n",
- ldb_dn_get_linearized(msg->dn)));
+ DEBUG(1, "Wrong object (%s) found on stack!\n",
+ ldb_dn_get_linearized(msg->dn));
continue;
}
@@ -645,7 +645,7 @@ fill_service(struct sss_packet *packet,
tmpstr = sss_get_cased_name(tmp_ctx, orig_name, dom->case_sensitive);
if (tmpstr == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not identify service name, skipping\n"));
+ "Could not identify service name, skipping\n");
continue;
}
to_sized_string(&cased_name, tmpstr);
@@ -654,7 +654,7 @@ fill_service(struct sss_packet *packet,
port = (uint16_t) ldb_msg_find_attr_as_uint(msg, SYSDB_SVC_PORT, 0);
if (!port) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("No port for service [%s]. Skipping\n", tmpstr));
+ "No port for service [%s]. Skipping\n", tmpstr);
}
@@ -680,7 +680,7 @@ fill_service(struct sss_packet *packet,
tmpstr = sss_get_cased_name(tmp_ctx, orig_proto, dom->case_sensitive);
if (tmpstr == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("sss_get_cased_name failed, skipping\n"));
+ "sss_get_cased_name failed, skipping\n");
continue;
}
to_sized_string(&cased_proto, tmpstr);
@@ -832,17 +832,17 @@ int nss_cmd_getservbyname(struct cli_ctx *cctx)
&service_protocol);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Could not parse request\n"));
+ "Could not parse request\n");
goto done;
}
dctx->protocol = service_protocol;
DEBUG(SSSDBG_TRACE_FUNC,
- ("Requesting info for service [%s:%s] from [%s]\n",
+ "Requesting info for service [%s:%s] from [%s]\n",
service_name,
service_protocol ? service_protocol : "<ANY>",
- domname ? domname : "<ALL>"));
+ domname ? domname : "<ALL>");
if (domname) {
dctx->domain = responder_get_domain(cctx->rctx, domname);
@@ -960,7 +960,7 @@ errno_t parse_getservbyname(TALLOC_CTX *mem_ctx,
if (j != blen - namelen - 1) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Body longer than the name and protocol\n"));
+ "Body longer than the name and protocol\n");
ret = EINVAL;
goto done;
}
@@ -970,8 +970,8 @@ errno_t parse_getservbyname(TALLOC_CTX *mem_ctx,
&domname, &svc_name);
if (ret != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Could not split name and domain of [%s]\n",
- rawname));
+ "Could not split name and domain of [%s]\n",
+ rawname);
goto done;
}
@@ -1000,7 +1000,7 @@ nss_cmd_getserv_done(struct tevent_req *req)
talloc_zfree(req);
if (reqret != EOK && reqret != ENOENT) {
DEBUG(SSSDBG_OP_FAILURE,
- ("getservbyname failed\n"));
+ "getservbyname failed\n");
nss_cmd_done(cmdctx, reqret);
return;
}
@@ -1023,15 +1023,15 @@ nss_cmd_getserv_done(struct tevent_req *req)
}
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Could not create response packet: [%s]\n",
- strerror(ret)));
+ "Could not create response packet: [%s]\n",
+ strerror(ret));
}
sss_cmd_done(cmdctx->cctx, cmdctx);
return;
}
- DEBUG(SSSDBG_OP_FAILURE, ("Error creating packet\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Error creating packet\n");
}
errno_t parse_getservbyport(TALLOC_CTX *mem_ctx,
@@ -1088,7 +1088,7 @@ errno_t parse_getservbyport(TALLOC_CTX *mem_ctx,
if (j != blen - port_and_padding_len - 1) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Body longer than the name and protocol\n"));
+ "Body longer than the name and protocol\n");
ret = EINVAL;
goto done;
}
@@ -1143,15 +1143,15 @@ int nss_cmd_getservbyport(struct cli_ctx *cctx)
&service_protocol);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Could not parse request\n"));
+ "Could not parse request\n");
goto done;
}
dctx->protocol = service_protocol;
DEBUG(SSSDBG_TRACE_FUNC,
- ("Requesting info for service on port [%"PRIu16"/%s]\n",
- port, service_protocol ? service_protocol : "<ANY>"));
+ "Requesting info for service on port [%"PRIu16"/%s]\n",
+ port, service_protocol ? service_protocol : "<ANY>");
/* All port lookups are multidomain searches */
dctx->domain = cctx->rctx->domains;
@@ -1202,7 +1202,7 @@ setservent_send(TALLOC_CTX *mem_ctx, struct cli_ctx *cctx)
struct nss_ctx *nctx =
talloc_get_type(cctx->rctx->pvt_ctx, struct nss_ctx);
- DEBUG(SSSDBG_TRACE_FUNC, ("Received setservent request\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Received setservent request\n");
/* Reset the read pointers */
cctx->svc_dom_idx = 0;
@@ -1302,8 +1302,8 @@ setservent_send(TALLOC_CTX *mem_ctx, struct cli_ctx *cctx)
}
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Error [%s] requesting info from domain [%s]. Skipping.\n",
- strerror(ret), step_ctx->dctx->domain->name));
+ "Error [%s] requesting info from domain [%s]. Skipping.\n",
+ strerror(ret), step_ctx->dctx->domain->name);
step_ctx->dctx->domain = get_next_domain(step_ctx->dctx->domain, false);
}
@@ -1378,7 +1378,7 @@ lookup_servent_send(TALLOC_CTX *mem_ctx,
sysdb = dom->sysdb;
if (sysdb == NULL) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Sysdb CTX not found for [%s]!\n", dom->name));
+ "Sysdb CTX not found for [%s]!\n", dom->name);
ret = EINVAL;
goto immediate;
}
@@ -1429,18 +1429,18 @@ lookup_servent_done(struct tevent_req *subreq)
talloc_zfree(subreq);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Unable to get information from Data Provider\n"
+ "Unable to get information from Data Provider\n"
"dp_error: [%u], errno: [%u], error_msg: [%s]\n"
"Will try to return what we have in cache\n",
(unsigned int)dp_err, (unsigned int)dp_ret,
- err_msg ? err_msg : "none"));
+ err_msg ? err_msg : "none");
}
/* Check the cache now */
sysdb = state->dom->sysdb;
if (sysdb == NULL) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Sysdb CTX not found for [%s]!\n", state->dom->name));
+ "Sysdb CTX not found for [%s]!\n", state->dom->name);
ret = EINVAL;
goto done;
}
@@ -1485,11 +1485,11 @@ setservent_step_done(struct tevent_req *req)
talloc_zfree(req);
if (ret == ENOENT) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Domain [%s] returned no results\n", dctx->domain->name));
+ "Domain [%s] returned no results\n", dctx->domain->name);
} else if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Error [%s] while retrieving info from domain [%s]. "
- "Skipping.\n", strerror(ret), dctx->domain->name));
+ "Error [%s] while retrieving info from domain [%s]. "
+ "Skipping.\n", strerror(ret), dctx->domain->name);
/* Continue on */
} else {
/* Got some results
@@ -1511,8 +1511,8 @@ setservent_step_done(struct tevent_req *req)
}
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Error [%s] requesting info from domain [%s]. Skipping.\n",
- strerror(ret), step_ctx->dctx->domain->name));
+ "Error [%s] requesting info from domain [%s]. Skipping.\n",
+ strerror(ret), step_ctx->dctx->domain->name);
step_ctx->dctx->domain = get_next_domain(step_ctx->dctx->domain, false);
}
@@ -1549,8 +1549,8 @@ setservent_finalize(struct setent_step_ctx *step_ctx)
setservent_result_timeout, nctx);
if (!te) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not set up life timer for setservent result object. "
- "Entries may become stale.\n"));
+ "Could not set up life timer for setservent result object. "
+ "Entries may become stale.\n");
}
nss_setent_notify_done(nctx->svcctx);
@@ -1565,7 +1565,7 @@ setservent_result_timeout(struct tevent_context *ev,
struct nss_ctx *nctx = talloc_get_type(pvt, struct nss_ctx);
DEBUG(SSSDBG_TRACE_FUNC,
- ("setservent result object has expired. Cleaning up.\n"));
+ "setservent result object has expired. Cleaning up.\n");
/* Free the service enumeration context.
* If additional getservent requests come in, they will invoke
@@ -1600,7 +1600,7 @@ nss_cmd_setservent(struct cli_ctx *cctx)
req = setservent_send(cmdctx, cctx);
if (!req) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Fatal error calling nss_cmd_setservent_send\n"));
+ "Fatal error calling nss_cmd_setservent_send\n");
ret = EIO;
goto done;
}
@@ -1655,7 +1655,7 @@ int nss_cmd_getservent(struct cli_ctx *cctx)
struct tevent_req *req;
DEBUG(SSSDBG_TRACE_FUNC,
- ("Requesting info for all services\n"));
+ "Requesting info for all services\n");
cmdctx = talloc_zero(cctx, struct nss_cmd_ctx);
if (!cmdctx) {
@@ -1705,8 +1705,8 @@ nss_cmd_implicit_setservent_done(struct tevent_req *req)
*/
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Implicit setservent failed with unexpected error [%d][%s]\n",
- ret, strerror(ret)));
+ "Implicit setservent failed with unexpected error [%d][%s]\n",
+ ret, strerror(ret));
NSS_CMD_FATAL_ERROR(cmdctx);
}
@@ -1717,8 +1717,8 @@ nss_cmd_implicit_setservent_done(struct tevent_req *req)
ret = nss_cmd_getservent_immediate(cmdctx);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Immediate retrieval failed with unexpected error "
- "[%d][%s]\n", ret, strerror(ret)));
+ "Immediate retrieval failed with unexpected error "
+ "[%d][%s]\n", ret, strerror(ret));
NSS_CMD_FATAL_ERROR(cmdctx);
}
}
@@ -1810,7 +1810,7 @@ int nss_cmd_endservent(struct cli_ctx *cctx)
int ret;
DEBUG(SSSDBG_TRACE_FUNC,
- ("Terminating request info for all accounts\n"));
+ "Terminating request info for all accounts\n");
nctx = talloc_get_type(cctx->rctx->pvt_ctx, struct nss_ctx);
diff --git a/src/responder/pac/pacsrv.c b/src/responder/pac/pacsrv.c
index 7fdc476a2..2fb94293c 100644
--- a/src/responder/pac/pacsrv.c
+++ b/src/responder/pac/pacsrv.c
@@ -85,7 +85,7 @@ static void pac_dp_reconnect_init(struct sbus_connection *conn,
/* Did we reconnect successfully? */
if (status == SBUS_RECONNECT_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("Reconnected to the Data Provider.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Reconnected to the Data Provider.\n");
/* Identify ourselves to the data provider */
ret = dp_common_send_id(be_conn->conn,
@@ -99,8 +99,8 @@ static void pac_dp_reconnect_init(struct sbus_connection *conn,
}
/* Failed to reconnect */
- DEBUG(SSSDBG_FATAL_FAILURE, ("Could not reconnect to %s provider.\n",
- be_conn->domain->name));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Could not reconnect to %s provider.\n",
+ be_conn->domain->name);
/* FIXME: kill the frontend and let the monitor restart it ? */
/* nss_shutdown(rctx); */
@@ -131,13 +131,13 @@ int pac_process_init(TALLOC_CTX *mem_ctx,
"PAC", &pac_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;
}
pac_ctx = talloc_zero(rctx, struct pac_ctx);
if (!pac_ctx) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("fatal error initializing pac_ctx\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "fatal error initializing pac_ctx\n");
ret = ENOMEM;
goto fail;
}
@@ -150,7 +150,7 @@ int pac_process_init(TALLOC_CTX *mem_ctx,
CONFDB_PAC_CONF_ENTRY, CONFDB_SERVICE_ALLOWED_UIDS,
DEFAULT_ALLOWED_UIDS, &uid_str);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Failed to get allowed UIDs.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Failed to get allowed UIDs.\n");
goto fail;
}
@@ -159,7 +159,7 @@ int pac_process_init(TALLOC_CTX *mem_ctx,
&pac_ctx->rctx->allowed_uids);
talloc_free(uid_str);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Failed to set allowed UIDs.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Failed to set allowed UIDs.\n");
goto fail;
}
@@ -169,7 +169,7 @@ int pac_process_init(TALLOC_CTX *mem_ctx,
CONFDB_SERVICE_RECON_RETRIES,
3, &max_retries);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Failed to set up automatic reconnection\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Failed to set up automatic reconnection\n");
goto fail;
}
@@ -181,7 +181,7 @@ int pac_process_init(TALLOC_CTX *mem_ctx,
err = sss_idmap_init(sss_idmap_talloc, pac_ctx, sss_idmap_talloc_free,
&pac_ctx->idmap_ctx);
if (err != IDMAP_SUCCESS) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("sss_idmap_init failed.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "sss_idmap_init failed.\n");
ret = EFAULT;
goto fail;
}
@@ -194,18 +194,18 @@ int pac_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 fail;
}
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 fail;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("PAC Initialization complete\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "PAC Initialization complete\n");
return EOK;
@@ -254,7 +254,7 @@ int main(int argc, const char *argv[])
ret = die_if_parent_died();
if (ret != EOK) {
/* This is not fatal, don't return */
- DEBUG(SSSDBG_OP_FAILURE, ("Could not set up to exit when parent process does\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Could not set up to exit when parent process does\n");
}
ret = pac_process_init(main_ctx,
diff --git a/src/responder/pac/pacsrv_cmd.c b/src/responder/pac/pacsrv_cmd.c
index 40ce46bbd..229c30783 100644
--- a/src/responder/pac/pacsrv_cmd.c
+++ b/src/responder/pac/pacsrv_cmd.c
@@ -36,8 +36,8 @@ static errno_t pac_cmd_done(struct cli_ctx *cctx, int cmd_ret)
ret = sss_packet_new(cctx->creq, 0, sss_packet_get_cmd(cctx->creq->in),
&cctx->creq->out);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_packet_new failed [%d][%s].\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_packet_new failed [%d][%s].\n",
+ ret, strerror(ret));
return ret;
}
@@ -110,7 +110,7 @@ static errno_t pac_add_pac_user(struct cli_ctx *cctx)
pr_ctx = talloc_zero(cctx, struct pac_req_ctx);
if (pr_ctx == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_new failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_new failed.\n");
return ENOMEM;
}
@@ -118,27 +118,27 @@ static errno_t pac_add_pac_user(struct cli_ctx *cctx)
pr_ctx->pac_ctx = talloc_get_type(cctx->rctx->pvt_ctx, struct pac_ctx);
if (pr_ctx->pac_ctx == NULL) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Cannot find pac responder context.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Cannot find pac responder context.\n");
return EINVAL;
}
ret = get_data_from_pac(pr_ctx, body, blen,
&pr_ctx->logon_info);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("get_data_from_pac failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "get_data_from_pac failed.\n");
goto done;
}
pr_ctx->domain_name = pr_ctx->logon_info->info3.base.logon_domain.string;
if (pr_ctx->domain_name == NULL) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("No domain name in PAC"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "No domain name in PAC");
ret = EINVAL;
goto done;
}
if (pr_ctx->logon_info->info3.base.account_name.string == NULL) {
ret = EINVAL;
- DEBUG(SSSDBG_FATAL_FAILURE, ("Missing account name in PAC.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Missing account name in PAC.\n");
goto done;
}
@@ -148,7 +148,7 @@ static errno_t pac_add_pac_user(struct cli_ctx *cctx)
pr_ctx->logon_info->info3.base.account_name.string);
if (pr_ctx->user_name == NULL) {
ret = ENOMEM;
- DEBUG(SSSDBG_FATAL_FAILURE, ("sss_tc_utf8_str_tolower failed.\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "sss_tc_utf8_str_tolower failed.\n");
goto done;
}
@@ -156,7 +156,7 @@ static errno_t pac_add_pac_user(struct cli_ctx *cctx)
pr_ctx->logon_info->info3.base.domain_sid,
&pr_ctx->user_dom_sid_str);
if (err != IDMAP_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_idmap_smb_sid_to_sid failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_idmap_smb_sid_to_sid failed.\n");
ret = EFAULT;
goto done;
}
@@ -176,7 +176,7 @@ static errno_t pac_add_pac_user(struct cli_ctx *cctx)
}
goto done;
} else if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("responder_get_domain_by_id failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "responder_get_domain_by_id failed.\n");
goto done;
}
@@ -205,8 +205,8 @@ static void pac_get_domains_done(struct tevent_req *req)
ret = responder_get_domain_by_id(cctx->rctx, pr_ctx->user_dom_sid_str,
&pr_ctx->dom);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Corresponding domain [%s] has not been "
- "found\n", pr_ctx->user_dom_sid_str));
+ DEBUG(SSSDBG_OP_FAILURE, "Corresponding domain [%s] has not been "
+ "found\n", pr_ctx->user_dom_sid_str);
ret = ENOENT;
goto done;
}
@@ -230,14 +230,14 @@ static errno_t pac_resolve_sids_next(struct pac_req_ctx *pr_ctx)
&pr_ctx->primary_group_sid_str,
&pr_ctx->sid_table);
if (ret != 0) {
- DEBUG(SSSDBG_OP_FAILURE, ("get_sids_from_pac failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "get_sids_from_pac failed.\n");
return ret;
}
req = pac_lookup_sids_send(pr_ctx, pr_ctx->cctx->ev, pr_ctx,
pr_ctx->pac_ctx, pr_ctx->sid_table);
if (req == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("pac_lookup_sids_send failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "pac_lookup_sids_send failed.\n");
return ENOMEM;
}
@@ -281,8 +281,8 @@ static void pac_lookup_sids_done(struct tevent_req *req)
ret =responder_get_domain_by_id(cctx->rctx,
entries[c].key.str, &dom);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("No domain found for SID [%s].\n",
- entries[c].key.str));
+ DEBUG(SSSDBG_OP_FAILURE, "No domain found for SID [%s].\n",
+ entries[c].key.str);
continue;
}
@@ -290,19 +290,19 @@ static void pac_lookup_sids_done(struct tevent_req *req)
ret = sysdb_search_object_by_sid(pr_ctx, dom, entries[c].key.str,
NULL, &msg);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_search_object_by_sid " \
- "failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_search_object_by_sid " \
+ "failed.\n");
continue;
}
if (msg->count == 0) {
- DEBUG(SSSDBG_OP_FAILURE, ("No entry found for SID [%s].\n",
- entries[c].key.str));
+ DEBUG(SSSDBG_OP_FAILURE, "No entry found for SID [%s].\n",
+ entries[c].key.str);
continue;
} else if (msg->count > 1) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("More then one result returned " \
+ DEBUG(SSSDBG_CRIT_FAILURE, "More then one result returned " \
"for SID [%s].\n",
- entries[c].key.str));
+ entries[c].key.str);
talloc_free(msg);
pac_cmd_done(cctx, EINVAL);
return;
@@ -316,7 +316,7 @@ static void pac_lookup_sids_done(struct tevent_req *req)
}
if (id == 0) {
- DEBUG(SSSDBG_OP_FAILURE, ("No ID found in entry.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "No ID found in entry.\n");
talloc_free(msg);
continue;
}
@@ -326,8 +326,8 @@ static void pac_lookup_sids_done(struct tevent_req *req)
ret = hash_enter(pr_ctx->sid_table, &key, &value);
if (ret != HASH_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("hash_enter failed [%d][%s].\n",
- ret, hash_error_string(ret)));
+ DEBUG(SSSDBG_OP_FAILURE, "hash_enter failed [%d][%s].\n",
+ ret, hash_error_string(ret));
continue;
}
talloc_free(msg);
@@ -345,7 +345,7 @@ static void pac_add_user_next(struct pac_req_ctx *pr_ctx)
ret = save_pac_user(pr_ctx);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("save_pac_user failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "save_pac_user failed.\n");
goto done;
}
@@ -353,7 +353,7 @@ static void pac_add_user_next(struct pac_req_ctx *pr_ctx)
&pr_ctx->del_grp_list,
&pr_ctx->add_sid_count, &pr_ctx->add_sids);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("pac_user_get_grp_info failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "pac_user_get_grp_info failed.\n");
goto done;
}
@@ -405,26 +405,26 @@ static errno_t pac_user_get_grp_info(TALLOC_CTX *mem_ctx,
sysdb = pr_ctx->dom->sysdb;
if (sysdb == NULL) {
ret = EINVAL;
- DEBUG(SSSDBG_FATAL_FAILURE, ("Fatal: Sysdb CTX not found for this domain!\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Fatal: Sysdb CTX not found for this domain!\n");
goto done;
}
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
ret = ENOMEM;
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_new failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_new failed.\n");
goto done;
}
ret = sysdb_initgroups(tmp_ctx, pr_ctx->dom, pr_ctx->user_name, &res);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_initgroups failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_initgroups failed.\n");
goto done;
}
if (res->count == 0) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_initgroups did not found [%s].\n",
- pr_ctx->user_name));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_initgroups did not found [%s].\n",
+ pr_ctx->user_name);
ret = ENOENT;
goto done;
}
@@ -435,7 +435,7 @@ static errno_t pac_user_get_grp_info(TALLOC_CTX *mem_ctx,
del_grp_list = talloc_zero_array(tmp_ctx, struct grp_info,
del_grp_count);
if (del_grp_list == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_array failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_array failed.\n");
ret = ENOMEM;
goto done;
}
@@ -447,7 +447,7 @@ static errno_t pac_user_get_grp_info(TALLOC_CTX *mem_ctx,
cur_sid = ldb_msg_find_attr_as_string(res->msgs[c + 1],
SYSDB_SID_STR, NULL);
if (cur_sid == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("Missing SID in group entry.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Missing SID in group entry.\n");
ret = EINVAL;
goto done;
}
@@ -455,20 +455,20 @@ static errno_t pac_user_get_grp_info(TALLOC_CTX *mem_ctx,
key.str = discard_const(cur_sid);
ret = hash_lookup(pr_ctx->sid_table, &key, &value);
if (ret == HASH_SUCCESS) {
- DEBUG(SSSDBG_TRACE_ALL, ("User [%s] already member of group " \
+ DEBUG(SSSDBG_TRACE_ALL, "User [%s] already member of group " \
"with SID [%s].\n",
- pr_ctx->user_name, cur_sid));
+ pr_ctx->user_name, cur_sid);
ret = hash_delete(pr_ctx->sid_table, &key);
if (ret != HASH_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("Failed to remove hash entry.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Failed to remove hash entry.\n");
ret = EIO;
goto done;
}
} else if (ret == HASH_ERROR_KEY_NOT_FOUND) {
- DEBUG(SSSDBG_TRACE_INTERNAL, ("Group with SID [%s] is not in " \
+ DEBUG(SSSDBG_TRACE_INTERNAL, "Group with SID [%s] is not in " \
"the PAC anymore, membership " \
- "must be removed.\n", cur_sid));
+ "must be removed.\n", cur_sid);
tmp_str = ldb_msg_find_attr_as_string(res->msgs[c + 1],
SYSDB_ORIG_DN, NULL);
@@ -476,7 +476,7 @@ static errno_t pac_user_get_grp_info(TALLOC_CTX *mem_ctx,
del_grp_list[del_idx].orig_dn = talloc_strdup(del_grp_list,
tmp_str);
if (del_grp_list[del_idx].orig_dn == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_strdup failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
ret = ENOMEM;
goto done;
}
@@ -485,7 +485,7 @@ static errno_t pac_user_get_grp_info(TALLOC_CTX *mem_ctx,
del_grp_list[del_idx].dn = ldb_dn_copy(del_grp_list,
res->msgs[c + 1]->dn);
if (del_grp_list[del_idx].dn == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("ldb_dn_copy failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "ldb_dn_copy failed.\n");
ret = ENOMEM;
goto done;
}
@@ -500,7 +500,7 @@ static errno_t pac_user_get_grp_info(TALLOC_CTX *mem_ctx,
if (add_sid_count > 0) {
add_sids = talloc_array(tmp_ctx, char *, add_sid_count);
if (add_sids == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_array failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_array failed.\n");
ret = ENOMEM;
goto done;
}
@@ -511,12 +511,12 @@ static errno_t pac_user_get_grp_info(TALLOC_CTX *mem_ctx,
if (strcmp(entry->key.str, pr_ctx->user_sid_str) != 0) {
add_sids[c] = talloc_strdup(add_sids, entry->key.str);
if (add_sids[c] == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_strdup failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
ret = ENOMEM;
goto done;
}
- DEBUG(SSSDBG_TRACE_ALL, ("SID [%s] added to add_sids " \
- "list.\n", entry->key.str));
+ DEBUG(SSSDBG_TRACE_ALL, "SID [%s] added to add_sids " \
+ "list.\n", entry->key.str);
c++;
}
}
@@ -553,14 +553,14 @@ static errno_t save_pac_user(struct pac_req_ctx *pr_ctx)
sysdb = pr_ctx->dom->sysdb;
if (sysdb == NULL) {
ret = EINVAL;
- DEBUG(SSSDBG_FATAL_FAILURE, ("Fatal: Sysdb CTX not found for this domain!\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Fatal: Sysdb CTX not found for this domain!\n");
goto done;
}
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
ret = ENOMEM;
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_new failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_new failed.\n");
goto done;
}
@@ -568,7 +568,7 @@ static errno_t save_pac_user(struct pac_req_ctx *pr_ctx)
pr_ctx->primary_group_sid_str, pr_ctx->sid_table,
pr_ctx->logon_info, &pwd, &user_attrs);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("get_pwd_from_pac failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "get_pwd_from_pac failed.\n");
goto done;
}
@@ -576,7 +576,7 @@ static errno_t save_pac_user(struct pac_req_ctx *pr_ctx)
&msg);
if (ret == ENOENT) {
if (pwd->pw_gid == 0 && !pr_ctx->dom->mpg) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Primary group RID from the PAC " \
+ DEBUG(SSSDBG_CRIT_FAILURE, "Primary group RID from the PAC " \
"cannot be translated into a GID for " \
"user [%s]. Typically this happens " \
"when UIDs and GIDs are read from AD " \
@@ -584,7 +584,7 @@ static errno_t save_pac_user(struct pac_req_ctx *pr_ctx)
"have a GID assigned. Make sure the " \
"user is created by the ID provider " \
"before GSSAPI based authentication " \
- "is used in this case.", pwd->pw_name));
+ "is used in this case.", pwd->pw_name);
ret = EINVAL;
goto done;
}
@@ -595,12 +595,12 @@ static errno_t save_pac_user(struct pac_req_ctx *pr_ctx)
pwd->pw_shell, NULL, user_attrs, NULL,
pr_ctx->dom->user_timeout, 0);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_store_user failed [%d][%s].\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_store_user failed [%d][%s].\n",
+ ret, strerror(ret));
goto done;
}
} else if (ret != EOK && ret != ENOENT) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_search_user_by_id failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_search_user_by_id failed.\n");
goto done;
}
@@ -639,15 +639,15 @@ struct tevent_req *pac_save_memberships_send(struct pac_req_ctx *pr_ctx)
dom_name = sss_get_domain_name(state, pr_ctx->user_name, dom);
if (dom_name == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_sprintf failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_sprintf failed.\n");
ret = ENOMEM;
goto done;
}
ret = sysdb_search_user_by_name(state, dom, dom_name, NULL, &msg);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_search_user_by_name failed " \
- "[%d][%s].\n", ret, strerror(ret)));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_search_user_by_name failed " \
+ "[%d][%s].\n", ret, strerror(ret));
goto done;
}
@@ -656,7 +656,7 @@ struct tevent_req *pac_save_memberships_send(struct pac_req_ctx *pr_ctx)
ret = pac_save_memberships_delete(state);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("pac_save_memberships_delete failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "pac_save_memberships_delete failed.\n");
goto done;
}
@@ -694,19 +694,19 @@ pac_save_memberships_delete(struct pac_save_memberships_state *state)
}
if (pr_ctx->del_grp_list == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("Missing group list.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Missing group list.\n");
return EINVAL;
}
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_new failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_new failed.\n");
return ENOMEM;
}
ret = sysdb_transaction_start(pr_ctx->dom->sysdb);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_transaction_start failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_transaction_start failed.\n");
goto done;
}
in_transaction = true;
@@ -718,32 +718,32 @@ pac_save_memberships_delete(struct pac_save_memberships_state *state)
pr_ctx->del_grp_list[c].dn,
LDB_FLAG_MOD_DELETE);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_mod_group_member failed for " \
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_mod_group_member failed for " \
"user [%s] and group[%s].\n",
ldb_dn_get_linearized(state->user_dn),
ldb_dn_get_linearized(
- pr_ctx->del_grp_list[c].dn)));
+ pr_ctx->del_grp_list[c].dn));
continue;
}
if (pr_ctx->del_grp_list[c].orig_dn != NULL) {
user_attrs = sysdb_new_attrs(tmp_ctx);
if (user_attrs == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_new_attrs failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_new_attrs failed.\n");
continue;
}
ret = sysdb_attrs_add_string(user_attrs, SYSDB_ORIG_MEMBEROF,
pr_ctx->del_grp_list[c].orig_dn);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_attrs_add_string failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_attrs_add_string failed.\n");
continue;
}
ret = sysdb_set_entry_attr(pr_ctx->dom->sysdb, state->user_dn, user_attrs,
LDB_FLAG_MOD_DELETE);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_set_entry_attr failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_set_entry_attr failed.\n");
continue;
}
talloc_free(user_attrs);
@@ -752,7 +752,7 @@ pac_save_memberships_delete(struct pac_save_memberships_state *state)
ret = sysdb_transaction_commit(pr_ctx->dom->sysdb);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_transaction_commit failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_transaction_commit failed.\n");
goto done;
}
in_transaction = false;
@@ -762,7 +762,7 @@ done:
if (in_transaction) {
sret = sysdb_transaction_cancel(pr_ctx->dom->sysdb);
if (sret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_transaction_cancel failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_transaction_cancel failed.\n");
}
}
@@ -788,7 +788,7 @@ static errno_t pac_save_memberships_next(struct tevent_req *req)
}
if (pr_ctx->add_sids == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("Missing list of SIDs.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Missing list of SIDs.\n");
return EINVAL;
}
@@ -796,8 +796,8 @@ static errno_t pac_save_memberships_next(struct tevent_req *req)
sid = pr_ctx->add_sids[state->sid_iter];
ret = responder_get_domain_by_id(pr_ctx->pac_ctx->rctx, sid, &grp_dom);
if (ret != EOK) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("responder_get_domain_by_id failed, " \
- "will try next group\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "responder_get_domain_by_id failed, " \
+ "will try next group\n");
state->sid_iter++;
continue;
}
@@ -818,8 +818,8 @@ static errno_t pac_save_memberships_next(struct tevent_req *req)
return EAGAIN;
} else {
- DEBUG(SSSDBG_OP_FAILURE, ("pac_store_membership failed, "
- "trying next group.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "pac_store_membership failed, "
+ "trying next group.\n");
state->sid_iter++;
continue;
}
@@ -858,14 +858,14 @@ static void pac_get_group_done(struct tevent_req *subreq)
sid = pr_ctx->add_sids[state->sid_iter];
ret = responder_get_domain_by_id(pr_ctx->pac_ctx->rctx,sid, &grp_dom);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("responder_get_domain_by_id failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "responder_get_domain_by_id failed.\n");
goto error;
}
ret = pac_store_membership(state->pr_ctx, state->user_dn, sid, grp_dom);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("pac_store_membership failed, "
- "trying next group.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "pac_store_membership failed, "
+ "trying next group.\n");
}
state->sid_iter++;
@@ -904,48 +904,48 @@ pac_store_membership(struct pac_req_ctx *pr_ctx,
ret = sysdb_search_object_by_sid(tmp_ctx, grp_dom, grp_sid_str,
group_attrs, &group);
if (ret != EOK) {
- DEBUG(SSSDBG_TRACE_INTERNAL, ("sysdb_search_object_by_sid " \
+ DEBUG(SSSDBG_TRACE_INTERNAL, "sysdb_search_object_by_sid " \
"for SID [%s] failed [%d][%s].\n",
- grp_sid_str, ret, strerror(ret)));
+ grp_sid_str, ret, strerror(ret));
goto done;
}
if (group->count != 1) {
- DEBUG(SSSDBG_OP_FAILURE, ("Unexpected number of groups returned.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Unexpected number of groups returned.\n");
ret = EINVAL;
goto done;
}
oc = ldb_msg_find_attr_as_string(group->msgs[0], SYSDB_OBJECTCLASS, NULL);
if (oc == NULL || strcmp(oc, SYSDB_GROUP_CLASS) != 0) {
- DEBUG(SSSDBG_OP_FAILURE, ("Return object does not have group " \
- "objectclass.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Return object does not have group " \
+ "objectclass.\n");
ret = EINVAL;
goto done;
}
- DEBUG(SSSDBG_TRACE_ALL, ("Adding user [%s] to group [%s][%s].\n",
+ DEBUG(SSSDBG_TRACE_ALL, "Adding user [%s] to group [%s][%s].\n",
ldb_dn_get_linearized(user_dn), grp_sid_str,
- ldb_dn_get_linearized(group->msgs[0]->dn)));
+ ldb_dn_get_linearized(group->msgs[0]->dn));
ret = sysdb_mod_group_member(grp_dom, user_dn, group->msgs[0]->dn,
LDB_FLAG_MOD_ADD);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_mod_group_member failed user [%s] " \
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_mod_group_member failed user [%s] " \
"group [%s].\n",
ldb_dn_get_linearized(user_dn),
- ldb_dn_get_linearized(group->msgs[0]->dn)));
+ ldb_dn_get_linearized(group->msgs[0]->dn));
goto done;
}
orig_group_dn = ldb_msg_find_attr_as_string(group->msgs[0], SYSDB_ORIG_DN,
NULL);
if (orig_group_dn != NULL) {
- DEBUG(SSSDBG_TRACE_ALL, ("Adding original group DN [%s] to user [%s].\n",
+ DEBUG(SSSDBG_TRACE_ALL, "Adding original group DN [%s] to user [%s].\n",
orig_group_dn,
- ldb_dn_get_linearized(user_dn)));
+ ldb_dn_get_linearized(user_dn));
user_attrs = sysdb_new_attrs(tmp_ctx);
if (user_attrs == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_new_attrs failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_new_attrs failed.\n");
ret = ENOMEM;
goto done;
}
@@ -953,20 +953,20 @@ pac_store_membership(struct pac_req_ctx *pr_ctx,
ret = sysdb_attrs_add_string(user_attrs, SYSDB_ORIG_MEMBEROF,
orig_group_dn);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_attrs_add_string failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_attrs_add_string failed.\n");
goto done;
}
ret = sysdb_set_entry_attr(pr_ctx->dom->sysdb, user_dn, user_attrs,
LDB_FLAG_MOD_ADD);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_set_entry_attr failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_set_entry_attr failed.\n");
goto done;
}
} else {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Original DN not available for group " \
+ DEBUG(SSSDBG_MINOR_FAILURE, "Original DN not available for group " \
"[%s][%s].\n", grp_sid_str,
- ldb_dn_get_linearized(group->msgs[0]->dn)));
+ ldb_dn_get_linearized(group->msgs[0]->dn));
}
done:
diff --git a/src/responder/pac/pacsrv_utils.c b/src/responder/pac/pacsrv_utils.c
index 0872e86dc..035fe84c0 100644
--- a/src/responder/pac/pacsrv_utils.c
+++ b/src/responder/pac/pacsrv_utils.c
@@ -87,7 +87,7 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
char *primary_group_sid_str = NULL;
if (pac_ctx == NULL || logon_info == NULL || _sid_table == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("Missing parameter.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Missing parameter.\n");
return EINVAL;
}
@@ -97,7 +97,7 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
info3->sidcount + info3->base.groups.count + 2,
&sid_table);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_hash_create failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_hash_create failed.\n");
goto done;
}
@@ -107,7 +107,7 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
err = sss_idmap_smb_sid_to_sid(pac_ctx->idmap_ctx, info3->base.domain_sid,
&user_dom_sid_str);
if (err != IDMAP_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_idmap_smb_sid_to_sid failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_idmap_smb_sid_to_sid failed.\n");
ret = EFAULT;
goto done;
}
@@ -115,7 +115,7 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
ret = responder_get_domain_by_id(pac_ctx->rctx, user_dom_sid_str,
&user_dom);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("responder_get_domain_by_id failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "responder_get_domain_by_id failed.\n");
ret = EINVAL;
goto done;
}
@@ -123,7 +123,7 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
user_dom_sid_str_len = strlen(user_dom_sid_str);
sid_str = talloc_zero_size(mem_ctx, user_dom_sid_str_len + 12);
if (sid_str == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_zero_size failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_zero_size failed.\n");
ret = ENOMEM;
goto done;
}
@@ -135,14 +135,14 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
ret = snprintf(rid_start, 12, "-%lu",
(unsigned long) info3->base.rid);
if (ret < 0 || ret > 12) {
- DEBUG(SSSDBG_OP_FAILURE, ("snprintf failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "snprintf failed.\n");
ret = EIO;
goto done;
}
user_sid_str = talloc_strdup(mem_ctx, sid_str);
if (user_sid_str == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_strdup failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
ret = ENOMEM;
goto done;
}
@@ -158,8 +158,8 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
ret = hash_enter(sid_table, &key, &value);
if (ret != HASH_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("hash_enter failed [%d][%s].\n",
- ret, hash_error_string(ret)));
+ DEBUG(SSSDBG_OP_FAILURE, "hash_enter failed [%d][%s].\n",
+ ret, hash_error_string(ret));
ret = EIO;
goto done;
}
@@ -169,14 +169,14 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
ret = snprintf(rid_start, 12, "-%lu",
(unsigned long) info3->base.primary_gid);
if (ret < 0 || ret > 12) {
- DEBUG(SSSDBG_OP_FAILURE, ("snprintf failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "snprintf failed.\n");
ret = EIO;
goto done;
}
primary_group_sid_str = talloc_strdup(mem_ctx, sid_str);
if (primary_group_sid_str == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_strdup failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
ret = ENOMEM;
goto done;
}
@@ -192,8 +192,8 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
ret = hash_enter(sid_table, &key, &value);
if (ret != HASH_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("hash_enter failed [%d][%s].\n",
- ret, hash_error_string(ret)));
+ DEBUG(SSSDBG_OP_FAILURE, "hash_enter failed [%d][%s].\n",
+ ret, hash_error_string(ret));
ret = EIO;
goto done;
}
@@ -204,7 +204,7 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
ret = snprintf(rid_start, 12, "-%lu",
(unsigned long) info3->base.groups.rids[s].rid);
if (ret < 0 || ret > 12) {
- DEBUG(SSSDBG_OP_FAILURE, ("snprintf failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "snprintf failed.\n");
ret = EIO;
goto done;
}
@@ -222,8 +222,8 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
ret = hash_enter(sid_table, &key, &value);
if (ret != HASH_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("hash_enter failed [%d][%s].\n",
- ret, hash_error_string(ret)));
+ DEBUG(SSSDBG_OP_FAILURE, "hash_enter failed [%d][%s].\n",
+ ret, hash_error_string(ret));
ret = EIO;
goto done;
}
@@ -234,7 +234,7 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
err = sss_idmap_smb_sid_to_sid(pac_ctx->idmap_ctx, info3->sids[s].sid,
&msid_str);
if (err != IDMAP_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_idmap_smb_sid_to_sid failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_idmap_smb_sid_to_sid failed.\n");
ret = EFAULT;
goto done;
}
@@ -256,8 +256,8 @@ errno_t get_sids_from_pac(TALLOC_CTX *mem_ctx,
ret = hash_enter(sid_table, &key, &value);
sss_idmap_free_sid(pac_ctx->idmap_ctx, msid_str);
if (ret != HASH_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("hash_enter failed [%d][%s].\n",
- ret, hash_error_string(ret)));
+ DEBUG(SSSDBG_OP_FAILURE, "hash_enter failed [%d][%s].\n",
+ ret, hash_error_string(ret));
ret = EIO;
goto done;
}
@@ -301,20 +301,20 @@ errno_t get_data_from_pac(TALLOC_CTX *mem_ctx,
ndr_pull = ndr_pull_init_blob(&blob, mem_ctx);
if (ndr_pull == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("ndr_pull_init_blob failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "ndr_pull_init_blob failed.\n");
return ENOMEM;
}
ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC; /* FIXME: is this really needed ? */
pac_data = talloc_zero(mem_ctx, struct PAC_DATA);
if (pac_data == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_zero failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_zero failed.\n");
return ENOMEM;
}
ndr_err = ndr_pull_PAC_DATA(ndr_pull, NDR_SCALARS|NDR_BUFFERS, pac_data);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- DEBUG(SSSDBG_OP_FAILURE, ("ndr_pull_PAC_DATA failed [%d]\n", ndr_err));
+ DEBUG(SSSDBG_OP_FAILURE, "ndr_pull_PAC_DATA failed [%d]\n", ndr_err);
return EBADMSG;
}
@@ -356,19 +356,19 @@ errno_t get_pwd_from_pac(TALLOC_CTX *mem_ctx,
pwd = talloc_zero(mem_ctx, struct passwd);
if (pwd == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_zero failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_zero failed.\n");
return ENOMEM;
}
base_info = &logon_info->info3.base;
if (base_info->account_name.size == 0) {
- DEBUG(SSSDBG_OP_FAILURE, ("Missing account name in PAC.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Missing account name in PAC.\n");
ret = EINVAL;
goto done;
}
if (base_info->rid == 0) {
- DEBUG(SSSDBG_OP_FAILURE, ("Missing user RID in PAC.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Missing user RID in PAC.\n");
ret = EINVAL;
goto done;
}
@@ -377,7 +377,7 @@ errno_t get_pwd_from_pac(TALLOC_CTX *mem_ctx,
* case names only, effectively making the domain case-insenvitive. */
lname = sss_tc_utf8_str_tolower(pwd, base_info->account_name.string);
if (lname == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("sss_tc_utf8_str_tolower failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sss_tc_utf8_str_tolower failed.\n");
ret = ENOMEM;
goto done;
}
@@ -385,7 +385,7 @@ errno_t get_pwd_from_pac(TALLOC_CTX *mem_ctx,
/* Subdomain use fully qualified names */
pwd->pw_name = sss_get_domain_name(pwd, lname, dom);
if (!pwd->pw_name) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_sprintf failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_sprintf failed.\n");
ret = ENOMEM;
goto done;
}
@@ -394,12 +394,12 @@ errno_t get_pwd_from_pac(TALLOC_CTX *mem_ctx,
key.str = user_sid_str;
ret = hash_lookup(sid_table, &key, &value);
if (ret != HASH_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("hash_lookup failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "hash_lookup failed.\n");
ret = EIO;
goto done;
}
if (value.type != HASH_VALUE_ULONG) {
- DEBUG(SSSDBG_OP_FAILURE, ("Wrong value type.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Wrong value type.\n");
ret = EIO;
goto done;
}
@@ -412,12 +412,12 @@ errno_t get_pwd_from_pac(TALLOC_CTX *mem_ctx,
key.str = primary_group_sid_str;
ret = hash_lookup(sid_table, &key, &value);
if (ret != HASH_SUCCESS) {
- DEBUG(SSSDBG_OP_FAILURE, ("hash_lookup failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "hash_lookup failed.\n");
ret = EIO;
goto done;
}
if (value.type != HASH_VALUE_ULONG) {
- DEBUG(SSSDBG_OP_FAILURE, ("Wrong value type.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Wrong value type.\n");
ret = EIO;
goto done;
}
@@ -427,13 +427,13 @@ errno_t get_pwd_from_pac(TALLOC_CTX *mem_ctx,
if (base_info->full_name.size != 0) {
pwd->pw_gecos = talloc_strdup(pwd, base_info->full_name.string);
if (pwd->pw_gecos == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_strdup failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
ret = ENOMEM;
goto done;
}
} else {
- DEBUG(SSSDBG_OP_FAILURE, ("Missing full name in PAC, "
- "gecos field will by empty.\n "));
+ DEBUG(SSSDBG_OP_FAILURE, "Missing full name in PAC, "
+ "gecos field will by empty.\n ");
}
/* Check if there is a special homedir template for sub-domains. If not a
@@ -452,14 +452,14 @@ errno_t get_pwd_from_pac(TALLOC_CTX *mem_ctx,
attrs = sysdb_new_attrs(mem_ctx);
if (attrs == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_new_attrs failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_new_attrs failed.\n");
ret = ENOMEM;
goto done;
}
uc_realm = get_uppercase_realm(mem_ctx, dom->name);
if (uc_realm == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("get_uppercase_realm failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "get_uppercase_realm failed.\n");
ret = ENOMEM;
goto done;
}
@@ -467,7 +467,7 @@ errno_t get_pwd_from_pac(TALLOC_CTX *mem_ctx,
upn = talloc_asprintf(mem_ctx, "%s@%s", lname, uc_realm);
talloc_free(uc_realm);
if (upn == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("talloc_asprintf failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "talloc_asprintf failed.\n");
ret = ENOMEM;
goto done;
}
@@ -475,19 +475,19 @@ errno_t get_pwd_from_pac(TALLOC_CTX *mem_ctx,
ret = sysdb_attrs_add_string(attrs, SYSDB_UPN, upn);
talloc_free(upn);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_attrs_add_string failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_attrs_add_string failed.\n");
goto done;
}
ret = sysdb_attrs_add_lc_name_alias(attrs, pwd->pw_name);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_attrs_add_lc_name_alias failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_attrs_add_lc_name_alias failed.\n");
goto done;
}
ret = sysdb_attrs_add_string(attrs, SYSDB_SID_STR, user_sid_str);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("sysdb_attrs_add_string failed.\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "sysdb_attrs_add_string failed.\n");
goto done;
}
diff --git a/src/responder/pam/pam_LOCAL_domain.c b/src/responder/pam/pam_LOCAL_domain.c
index 036b47fda..b602259ee 100644
--- a/src/responder/pam/pam_LOCAL_domain.c
+++ b/src/responder/pam/pam_LOCAL_domain.c
@@ -31,7 +31,7 @@
#define NULL_CHECK_OR_JUMP(var, msg, ret, err, label) do { \
if (var == NULL) { \
- DEBUG(1, (msg)); \
+ DEBUG(1, msg); \
ret = (err); \
goto label; \
} \
@@ -39,7 +39,7 @@
#define NEQ_CHECK_OR_JUMP(var, val, msg, ret, err, label) do { \
if (var != (val)) { \
- DEBUG(1, (msg)); \
+ DEBUG(1, msg); \
ret = (err); \
goto label; \
} \
@@ -168,7 +168,7 @@ static void do_pam_chauthtok(struct LOCAL_request *lreq)
if (ret) {
/* TODO: should we allow null passwords via a config option ? */
if (ret == ENOENT) {
- DEBUG(1, ("Empty passwords are not allowed!\n"));
+ DEBUG(1, "Empty passwords are not allowed!\n");
}
lreq->error = EINVAL;
goto done;
@@ -177,12 +177,12 @@ static void do_pam_chauthtok(struct LOCAL_request *lreq)
ret = s3crypt_gen_salt(lreq, &salt);
NEQ_CHECK_OR_JUMP(ret, EOK, ("Salt generation failed.\n"),
lreq->error, ret, done);
- DEBUG(4, ("Using salt [%s]\n", salt));
+ DEBUG(4, "Using salt [%s]\n", salt);
ret = s3crypt_sha512(lreq, password, salt, &new_hash);
NEQ_CHECK_OR_JUMP(ret, EOK, ("Hash generation failed.\n"),
lreq->error, ret, done);
- DEBUG(4, ("New hash [%s]\n", new_hash));
+ DEBUG(4, "New hash [%s]\n", new_hash);
lreq->mod_attrs = sysdb_new_attrs(lreq);
NULL_CHECK_OR_JUMP(lreq->mod_attrs, ("sysdb_new_attrs failed.\n"),
@@ -229,7 +229,7 @@ int LOCAL_pam_handler(struct pam_auth_req *preq)
struct pam_data *pd = preq->pd;
int ret;
- DEBUG(4, ("LOCAL pam handler.\n"));
+ DEBUG(4, "LOCAL pam handler.\n");
lreq = talloc_zero(preq, struct LOCAL_request);
if (!lreq) {
@@ -238,7 +238,7 @@ int LOCAL_pam_handler(struct pam_auth_req *preq)
lreq->dbctx = preq->domain->sysdb;
if (lreq->dbctx == NULL) {
- DEBUG(0, ("Fatal: Sysdb CTX not found for this domain!\n"));
+ DEBUG(0, "Fatal: Sysdb CTX not found for this domain!\n");
talloc_free(lreq);
return ENOENT;
}
@@ -251,26 +251,26 @@ int LOCAL_pam_handler(struct pam_auth_req *preq)
ret = sysdb_get_user_attr(lreq, preq->domain, preq->pd->user, attrs,
&res);
if (ret != EOK) {
- DEBUG(1, ("sysdb_get_user_attr failed.\n"));
+ DEBUG(1, "sysdb_get_user_attr failed.\n");
talloc_free(lreq);
return ret;
}
if (res->count < 1) {
- DEBUG(4, ("No user found with filter ["SYSDB_PWNAM_FILTER"]\n",
- pd->user, pd->user, pd->user));
+ DEBUG(4, "No user found with filter ["SYSDB_PWNAM_FILTER"]\n",
+ pd->user, pd->user, pd->user);
pd->pam_status = PAM_USER_UNKNOWN;
goto done;
} else if (res->count > 1) {
- DEBUG(4, ("More than one object found with filter ["SYSDB_PWNAM_FILTER"]\n",
- pd->user, pd->user, pd->user));
+ DEBUG(4, "More than one object found with filter ["SYSDB_PWNAM_FILTER"]\n",
+ pd->user, pd->user, pd->user);
lreq->error = EFAULT;
goto done;
}
username = ldb_msg_find_attr_as_string(res->msgs[0], SYSDB_NAME, NULL);
if (strcmp(username, pd->user) != 0) {
- DEBUG(1, ("Expected username [%s] get [%s].\n", pd->user, username));
+ DEBUG(1, "Expected username [%s] get [%s].\n", pd->user, username);
lreq->error = EINVAL;
goto done;
}
@@ -285,7 +285,7 @@ int LOCAL_pam_handler(struct pam_auth_req *preq)
pd->cmd == SSS_PAM_CHAUTHTOK_PRELIM) &&
lreq->preq->cctx->priv == 1) {
/* TODO: maybe this is a candiate for an explicit audit message. */
- DEBUG(4, ("allowing root to reset a password.\n"));
+ DEBUG(4, "allowing root to reset a password.\n");
break;
}
ret = sss_authtok_get_password(pd->authtok, &password, NULL);
@@ -295,16 +295,16 @@ int LOCAL_pam_handler(struct pam_auth_req *preq)
pwdhash = ldb_msg_find_attr_as_string(res->msgs[0], SYSDB_PWD, NULL);
NULL_CHECK_OR_JUMP(pwdhash, ("No password stored.\n"),
lreq->error, LDB_ERR_NO_SUCH_ATTRIBUTE, done);
- DEBUG(4, ("user: [%s], password hash: [%s]\n", username, pwdhash));
+ DEBUG(4, "user: [%s], password hash: [%s]\n", username, pwdhash);
ret = s3crypt_sha512(lreq, password, pwdhash, &new_hash);
NEQ_CHECK_OR_JUMP(ret, EOK, ("nss_sha512_crypt failed.\n"),
lreq->error, ret, done);
- DEBUG(4, ("user: [%s], new hash: [%s]\n", username, new_hash));
+ DEBUG(4, "user: [%s], new hash: [%s]\n", username, new_hash);
if (strcmp(new_hash, pwdhash) != 0) {
- DEBUG(1, ("Passwords do not match.\n"));
+ DEBUG(1, "Passwords do not match.\n");
do_failed_login(lreq);
goto done;
}
@@ -332,7 +332,7 @@ int LOCAL_pam_handler(struct pam_auth_req *preq)
break;
default:
lreq->error = EINVAL;
- DEBUG(SSSDBG_CRIT_FAILURE, ("Unknown PAM task [%d].\n", pd->cmd));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Unknown PAM task [%d].\n", pd->cmd);
}
done:
diff --git a/src/responder/pam/pam_helpers.c b/src/responder/pam/pam_helpers.c
index d2068e57c..1b94f7adf 100644
--- a/src/responder/pam/pam_helpers.c
+++ b/src/responder/pam/pam_helpers.c
@@ -68,14 +68,14 @@ errno_t pam_initgr_cache_set(struct tevent_context *ev,
hret = hash_enter(id_table, &key, &val);
if (hret != HASH_SUCCESS) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Could not update initgr cache for [%s]: [%s]\n",
- name, hash_error_string(hret)));
+ "Could not update initgr cache for [%s]: [%s]\n",
+ name, hash_error_string(hret));
ret = EIO;
goto done;
} else {
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("[%s] added to PAM initgroup cache\n",
- name));
+ "[%s] added to PAM initgroup cache\n",
+ name);
}
/* Create a timer event to remove the entry from the cache */
@@ -115,13 +115,13 @@ static void pam_initgr_cache_remove(struct tevent_context *ev,
if (hret != HASH_SUCCESS
&& hret != HASH_ERROR_KEY_NOT_FOUND) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Could not clear [%s] from initgr cache: [%s]\n",
+ "Could not clear [%s] from initgr cache: [%s]\n",
table_ctx->name,
- hash_error_string(hret)));
+ hash_error_string(hret));
} else {
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("[%s] removed from PAM initgroup cache\n",
- table_ctx->name));
+ "[%s] removed from PAM initgroup cache\n",
+ table_ctx->name);
}
talloc_free(table_ctx);
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,
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index 2bceb8985..f3ceea49d 100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -120,12 +120,12 @@ static int pd_set_primary_name(const struct ldb_message *msg,struct pam_data *pd
name = ldb_msg_find_attr_as_string(msg, SYSDB_NAME, NULL);
if (!name) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("A user with no name?\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "A user with no name?\n");
return EIO;
}
if (strcmp(pd->user, name)) {
- DEBUG(SSSDBG_TRACE_FUNC, ("User's primary name is %s\n", name));
+ DEBUG(SSSDBG_TRACE_FUNC, "User's primary name is %s\n", name);
talloc_free(pd->user);
pd->user = talloc_strdup(pd, name);
if (!pd->user) return ENOMEM;
@@ -148,7 +148,7 @@ static int pam_parse_in_data_v2(struct sss_domain_info *domains,
uint32_t terminator;
if (blen < 4*sizeof(uint32_t)+2) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Received data is invalid.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Received data is invalid.\n");
return EINVAL;
}
@@ -157,7 +157,7 @@ static int pam_parse_in_data_v2(struct sss_domain_info *domains,
if (start != SSS_START_OF_PAM_REQUEST
|| terminator != SSS_END_OF_PAM_REQUEST) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Received data is invalid.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Received data is invalid.\n");
return EINVAL;
}
@@ -172,7 +172,7 @@ static int pam_parse_in_data_v2(struct sss_domain_info *domains,
/* the uint32_t end maker SSS_END_OF_PAM_REQUEST does not count to
* the remaining buffer */
if (size > (blen - c - sizeof(uint32_t))) {
- DEBUG(1, ("Invalid data size.\n"));
+ DEBUG(1, "Invalid data size.\n");
return EINVAL;
}
@@ -218,7 +218,7 @@ static int pam_parse_in_data_v2(struct sss_domain_info *domains,
if (ret != EOK) return ret;
break;
default:
- DEBUG(1,("Ignoring unknown data type [%d].\n", type));
+ DEBUG(1,"Ignoring unknown data type [%d].\n", type);
c += size;
}
}
@@ -242,12 +242,12 @@ static int pam_parse_in_data_v3(struct sss_domain_info *domains,
ret = pam_parse_in_data_v2(domains, default_domain, pd, body, blen);
if (ret != EOK) {
- DEBUG(1, ("pam_parse_in_data_v2 failed.\n"));
+ DEBUG(1, "pam_parse_in_data_v2 failed.\n");
return ret;
}
if (pd->cli_pid == 0) {
- DEBUG(1, ("Missing client PID.\n"));
+ DEBUG(1, "Missing client PID.\n");
return EINVAL;
}
@@ -322,12 +322,12 @@ static int pam_parse_in_data(struct sss_domain_info *domains,
ret = extract_authtok_v1(pd->authtok, body, blen, &end);
if (ret) {
- DEBUG(1, ("Invalid auth token\n"));
+ DEBUG(1, "Invalid auth token\n");
return ret;
}
ret = extract_authtok_v1(pd->newauthtok, body, blen, &end);
if (ret) {
- DEBUG(1, ("Invalid new auth token\n"));
+ DEBUG(1, "Invalid new auth token\n");
return ret;
}
@@ -362,7 +362,7 @@ static errno_t set_last_login(struct pam_auth_req *preq)
ret = sysdb_set_user_attr(preq->domain, preq->pd->user, attrs,
SYSDB_MOD_REP);
if (ret != EOK) {
- DEBUG(2, ("set_last_login failed.\n"));
+ DEBUG(2, "set_last_login failed.\n");
preq->pd->pam_status = PAM_SYSTEM_ERR;
goto fail;
} else {
@@ -389,7 +389,7 @@ static errno_t filter_responses(struct confdb_ctx *cdb,
CONFDB_PAM_VERBOSITY, DEFAULT_PAM_VERBOSITY,
&pam_verbosity);
if (ret != EOK) {
- DEBUG(1, ("Failed to read PAM verbosity, not fatal.\n"));
+ DEBUG(1, "Failed to read PAM verbosity, not fatal.\n");
pam_verbosity = DEFAULT_PAM_VERBOSITY;
}
@@ -397,7 +397,7 @@ static errno_t filter_responses(struct confdb_ctx *cdb,
while(resp != NULL) {
if (resp->type == SSS_PAM_USER_INFO) {
if (resp->len < sizeof(uint32_t)) {
- DEBUG(1, ("User info entry is too short.\n"));
+ DEBUG(1, "User info entry is too short.\n");
return EINVAL;
}
@@ -413,8 +413,8 @@ static errno_t filter_responses(struct confdb_ctx *cdb,
switch (user_info_type) {
case SSS_PAM_USER_INFO_OFFLINE_AUTH:
if (resp->len != sizeof(uint32_t) + sizeof(int64_t)) {
- DEBUG(1, ("User info offline auth entry is "
- "too short.\n"));
+ DEBUG(1, "User info offline auth entry is "
+ "too short.\n");
return EINVAL;
}
memcpy(&expire_date, resp->data + sizeof(uint32_t),
@@ -429,8 +429,8 @@ static errno_t filter_responses(struct confdb_ctx *cdb,
break;
default:
DEBUG(SSSDBG_TRACE_LIBS,
- ("User info type [%d] not filtered.\n",
- user_info_type));
+ "User info type [%d] not filtered.\n",
+ user_info_type);
}
} else if (resp->type & SSS_SERVER_INFO) {
resp->do_not_send_to_client = true;
@@ -447,7 +447,7 @@ static void pam_reply_delay(struct tevent_context *ev, struct tevent_timer *te,
{
struct pam_auth_req *preq;
- DEBUG(4, ("pam_reply_delay get called.\n"));
+ DEBUG(4, "pam_reply_delay get called.\n");
preq = talloc_get_type(pvt, struct pam_auth_req);
@@ -482,7 +482,7 @@ static void pam_reply(struct pam_auth_req *preq)
DEBUG(SSSDBG_FUNC_DATA,
- ("pam_reply called with result [%d].\n", pd->pam_status));
+ "pam_reply called with result [%d].\n", pd->pam_status);
if (pd->pam_status == PAM_AUTHINFO_UNAVAIL) {
switch(pd->cmd) {
@@ -496,14 +496,14 @@ static void pam_reply(struct pam_auth_req *preq)
pd->offline_auth = true;
if (preq->domain->sysdb == NULL) {
- DEBUG(0, ("Fatal: Sysdb CTX not found for domain"
- " [%s]!\n", preq->domain->name));
+ DEBUG(0, "Fatal: Sysdb CTX not found for domain"
+ " [%s]!\n", preq->domain->name);
goto done;
}
ret = sss_authtok_get_password(pd->authtok, &password, NULL);
if (ret) {
- DEBUG(0, ("Failed to get password.\n"));
+ DEBUG(0, "Failed to get password.\n");
goto done;
}
@@ -518,13 +518,13 @@ static void pam_reply(struct pam_auth_req *preq)
break;
case SSS_PAM_CHAUTHTOK_PRELIM:
case SSS_PAM_CHAUTHTOK:
- DEBUG(5, ("Password change not possible while offline.\n"));
+ DEBUG(5, "Password change not possible while offline.\n");
pd->pam_status = PAM_AUTHTOK_ERR;
user_info_type = SSS_PAM_USER_INFO_OFFLINE_CHPASS;
ret = pam_add_response(pd, SSS_PAM_USER_INFO, sizeof(uint32_t),
(const uint8_t *) &user_info_type);
if (ret != EOK) {
- DEBUG(1, ("pam_add_response failed.\n"));
+ DEBUG(1, "pam_add_response failed.\n");
goto done;
}
break;
@@ -534,12 +534,12 @@ static void pam_reply(struct pam_auth_req *preq)
case SSS_PAM_ACCT_MGMT:
case SSS_PAM_OPEN_SESSION:
case SSS_PAM_CLOSE_SESSION:
- DEBUG(2, ("Assuming offline authentication setting status for "
- "pam call %d to PAM_SUCCESS.\n", pd->cmd));
+ DEBUG(2, "Assuming offline authentication setting status for "
+ "pam call %d to PAM_SUCCESS.\n", pd->cmd);
pd->pam_status = PAM_SUCCESS;
break;
default:
- DEBUG(1, ("Unknown PAM call [%d].\n", pd->cmd));
+ DEBUG(1, "Unknown PAM call [%d].\n", pd->cmd);
pd->pam_status = PAM_MODULE_UNKNOWN;
}
}
@@ -547,8 +547,8 @@ static void pam_reply(struct pam_auth_req *preq)
if (pd->response_delay > 0) {
ret = gettimeofday(&tv, NULL);
if (ret != EOK) {
- DEBUG(1, ("gettimeofday failed [%d][%s].\n",
- errno, strerror(errno)));
+ DEBUG(1, "gettimeofday failed [%d][%s].\n",
+ errno, strerror(errno));
goto done;
}
tv.tv_sec += pd->response_delay;
@@ -557,7 +557,7 @@ static void pam_reply(struct pam_auth_req *preq)
te = tevent_add_timer(cctx->ev, cctx, tv, pam_reply_delay, preq);
if (te == NULL) {
- DEBUG(1, ("Failed to add event pam_reply_delay.\n"));
+ DEBUG(1, "Failed to add event pam_reply_delay.\n");
goto done;
}
@@ -586,14 +586,14 @@ static void pam_reply(struct pam_auth_req *preq)
ret = filter_responses(pctx->rctx->cdb, pd->resp_list);
if (ret != EOK) {
- DEBUG(1, ("filter_responses failed, not fatal.\n"));
+ DEBUG(1, "filter_responses failed, not fatal.\n");
}
if (pd->domain != NULL) {
ret = pam_add_response(pd, SSS_PAM_DOMAIN_NAME, strlen(pd->domain)+1,
(uint8_t *) pd->domain);
if (ret != EOK) {
- DEBUG(1, ("pam_add_response failed.\n"));
+ DEBUG(1, "pam_add_response failed.\n");
goto done;
}
}
@@ -618,7 +618,7 @@ static void pam_reply(struct pam_auth_req *preq)
}
sss_packet_get_body(cctx->creq->out, &body, &blen);
- DEBUG(SSSDBG_FUNC_DATA, ("blen: %zu\n", blen));
+ DEBUG(SSSDBG_FUNC_DATA, "blen: %zu\n", blen);
p = 0;
memcpy(&body[p], &pd->pam_status, sizeof(int32_t));
@@ -661,7 +661,7 @@ static void pam_handle_cached_login(struct pam_auth_req *preq, int ret,
resp_len = sizeof(uint32_t) + sizeof(int64_t);
resp = talloc_size(preq->pd, resp_len);
if (resp == NULL) {
- DEBUG(1, ("talloc_size failed, cannot prepare user info.\n"));
+ DEBUG(1, "talloc_size failed, cannot prepare user info.\n");
} else {
memcpy(resp, &resp_type, sizeof(uint32_t));
dummy = (int64_t) expire_date;
@@ -669,7 +669,7 @@ static void pam_handle_cached_login(struct pam_auth_req *preq, int ret,
ret = pam_add_response(preq->pd, SSS_PAM_USER_INFO, resp_len,
(const uint8_t *) resp);
if (ret != EOK) {
- DEBUG(1, ("pam_add_response failed.\n"));
+ DEBUG(1, "pam_add_response failed.\n");
}
}
break;
@@ -679,7 +679,7 @@ static void pam_handle_cached_login(struct pam_auth_req *preq, int ret,
resp_len = sizeof(uint32_t) + sizeof(int64_t);
resp = talloc_size(preq->pd, resp_len);
if (resp == NULL) {
- DEBUG(1, ("talloc_size failed, cannot prepare user info.\n"));
+ DEBUG(1, "talloc_size failed, cannot prepare user info.\n");
} else {
memcpy(resp, &resp_type, sizeof(uint32_t));
dummy = (int64_t) delayed_until;
@@ -687,14 +687,14 @@ static void pam_handle_cached_login(struct pam_auth_req *preq, int ret,
ret = pam_add_response(preq->pd, SSS_PAM_USER_INFO, resp_len,
(const uint8_t *) resp);
if (ret != EOK) {
- DEBUG(1, ("pam_add_response failed.\n"));
+ DEBUG(1, "pam_add_response failed.\n");
}
}
}
break;
default:
DEBUG(SSSDBG_TRACE_LIBS,
- ("cached login returned: %d\n", preq->pd->pam_status));
+ "cached login returned: %d\n", preq->pd->pam_status);
}
pam_reply(preq);
@@ -725,7 +725,7 @@ errno_t pam_forwarder_parse_data(struct cli_ctx *cctx, struct pam_data *pd)
body + blen - sizeof(uint32_t),
NULL);
if (terminator != SSS_END_OF_PAM_REQUEST) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Received data not terminated.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Received data not terminated.\n");
ret = EINVAL;
goto done;
}
@@ -748,8 +748,8 @@ errno_t pam_forwarder_parse_data(struct cli_ctx *cctx, struct pam_data *pd)
body, blen);
break;
default:
- DEBUG(1, ("Illegal protocol version [%d].\n",
- cctx->cli_protocol_version->version));
+ DEBUG(1, "Illegal protocol version [%d].\n",
+ cctx->cli_protocol_version->version);
ret = EINVAL;
}
@@ -843,8 +843,8 @@ static int pam_forwarder(struct cli_ctx *cctx, int pam_cmd)
/* Try the next domain */
DEBUG(SSSDBG_TRACE_FUNC,
- ("User [%s@%s] filtered out (negative cache). "
- "Trying next domain.\n", pd->user, dom->name));
+ "User [%s@%s] filtered out (negative cache). "
+ "Trying next domain.\n", pd->user, dom->name);
}
if (!dom) {
ret = ENOENT;
@@ -854,7 +854,7 @@ static int pam_forwarder(struct cli_ctx *cctx, int pam_cmd)
}
if (preq->domain->provider == NULL) {
- DEBUG(1, ("Domain [%s] has no auth provider.\n", preq->domain->name));
+ DEBUG(1, "Domain [%s] has no auth provider.\n", preq->domain->name);
ret = EINVAL;
goto done;
}
@@ -956,7 +956,7 @@ static int pam_check_user_search(struct pam_auth_req *preq)
if (ret != EOK
&& ret != ENOENT) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Could not look up initgroup timout\n"));
+ "Could not look up initgroup timout\n");
return EIO;
} else if (ret == ENOENT) {
/* Call provider first */
@@ -965,22 +965,22 @@ static int pam_check_user_search(struct pam_auth_req *preq)
/* Entry is still valid, get it from the sysdb */
}
- DEBUG(4, ("Requesting info for [%s@%s]\n", name, dom->name));
+ DEBUG(4, "Requesting info for [%s@%s]\n", name, dom->name);
if (dom->sysdb == NULL) {
- DEBUG(0, ("Fatal: Sysdb CTX not found for this domain!\n"));
+ DEBUG(0, "Fatal: Sysdb CTX not found for this domain!\n");
preq->pd->pam_status = PAM_SYSTEM_ERR;
return EFAULT;
}
ret = sysdb_getpwnam(preq, dom, name, &preq->res);
if (ret != EOK) {
- DEBUG(1, ("Failed to make request to our cache!\n"));
+ DEBUG(1, "Failed to make request to our cache!\n");
return EIO;
}
if (preq->res->count > 1) {
- DEBUG(0, ("getpwnam call returned more than one result !?!\n"));
+ DEBUG(0, "getpwnam call returned more than one result !?!\n");
return ENOENT;
}
@@ -991,8 +991,8 @@ static int pam_check_user_search(struct pam_auth_req *preq)
if (ret != EOK) {
/* Should not be fatal, just slower next time */
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Cannot set ncache for [%s@%s]\n", name,
- dom->name));
+ "Cannot set ncache for [%s@%s]\n", name,
+ dom->name);
}
}
@@ -1002,7 +1002,7 @@ static int pam_check_user_search(struct pam_auth_req *preq)
continue;
}
- DEBUG(2, ("No results for getpwnam call\n"));
+ DEBUG(2, "No results for getpwnam call\n");
/* TODO: store negative cache ? */
@@ -1020,12 +1020,12 @@ static int pam_check_user_search(struct pam_auth_req *preq)
}
}
- DEBUG(6, ("Returning info for user [%s@%s]\n", name, dom->name));
+ DEBUG(6, "Returning info for user [%s@%s]\n", name, dom->name);
/* We might have searched by alias. Pass on the primary name */
ret = pd_set_primary_name(preq->res->msgs[0], preq->pd);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Could not canonicalize username\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Could not canonicalize username\n");
return ret;
}
@@ -1049,7 +1049,7 @@ static int pam_check_user_search(struct pam_auth_req *preq)
name, 0, NULL);
if (!dpreq) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Out of memory sending data provider request\n"));
+ "Out of memory sending data provider request\n");
return ENOMEM;
}
@@ -1071,7 +1071,7 @@ static int pam_check_user_search(struct pam_auth_req *preq)
}
DEBUG(SSSDBG_MINOR_FAILURE,
- ("No matching domain found for [%s], fail!\n", preq->pd->user));
+ "No matching domain found for [%s], fail!\n", preq->pd->user);
return ENOENT;
}
@@ -1091,7 +1091,7 @@ static void pam_dp_send_acct_req_done(struct tevent_req *req)
talloc_zfree(req);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Fatal error, killing connection!\n"));
+ "Fatal error, killing connection!\n");
talloc_free(cb_ctx->cctx);
return;
}
@@ -1133,9 +1133,9 @@ static void pam_check_user_dp_callback(uint16_t err_maj, uint32_t err_min,
char *name;
if (err_maj) {
- DEBUG(2, ("Unable to get information from Data Provider\n"
+ DEBUG(2, "Unable to get information from Data Provider\n"
"Error: %u, %u, %s\n",
- (unsigned int)err_maj, (unsigned int)err_min, err_msg));
+ (unsigned int)err_maj, (unsigned int)err_min, err_msg);
}
ret = pam_check_user_search(preq);
@@ -1154,8 +1154,8 @@ static void pam_check_user_dp_callback(uint16_t err_maj, uint32_t err_min,
talloc_free(name);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Could not save initgr timestamp. "
- "Proceeding with PAM actions\n"));
+ "Could not save initgr timestamp. "
+ "Proceeding with PAM actions\n");
/* This is non-fatal, we'll just end up going to the
* data provider again next time.
*/
@@ -1188,7 +1188,7 @@ static void pam_dom_forwarder(struct pam_auth_req *preq)
else {
preq->callback = pam_reply;
ret = pam_dp_send_req(preq, SSS_CLI_SOCKET_TIMEOUT/2);
- DEBUG(4, ("pam_dp_send_req returned %d\n", ret));
+ DEBUG(4, "pam_dp_send_req returned %d\n", ret);
}
if (ret != EOK) {
@@ -1198,37 +1198,37 @@ static void pam_dom_forwarder(struct pam_auth_req *preq)
}
static int pam_cmd_authenticate(struct cli_ctx *cctx) {
- DEBUG(4, ("entering pam_cmd_authenticate\n"));
+ DEBUG(4, "entering pam_cmd_authenticate\n");
return pam_forwarder(cctx, SSS_PAM_AUTHENTICATE);
}
static int pam_cmd_setcred(struct cli_ctx *cctx) {
- DEBUG(4, ("entering pam_cmd_setcred\n"));
+ DEBUG(4, "entering pam_cmd_setcred\n");
return pam_forwarder(cctx, SSS_PAM_SETCRED);
}
static int pam_cmd_acct_mgmt(struct cli_ctx *cctx) {
- DEBUG(4, ("entering pam_cmd_acct_mgmt\n"));
+ DEBUG(4, "entering pam_cmd_acct_mgmt\n");
return pam_forwarder(cctx, SSS_PAM_ACCT_MGMT);
}
static int pam_cmd_open_session(struct cli_ctx *cctx) {
- DEBUG(4, ("entering pam_cmd_open_session\n"));
+ DEBUG(4, "entering pam_cmd_open_session\n");
return pam_forwarder(cctx, SSS_PAM_OPEN_SESSION);
}
static int pam_cmd_close_session(struct cli_ctx *cctx) {
- DEBUG(4, ("entering pam_cmd_close_session\n"));
+ DEBUG(4, "entering pam_cmd_close_session\n");
return pam_forwarder(cctx, SSS_PAM_CLOSE_SESSION);
}
static int pam_cmd_chauthtok(struct cli_ctx *cctx) {
- DEBUG(4, ("entering pam_cmd_chauthtok\n"));
+ DEBUG(4, "entering pam_cmd_chauthtok\n");
return pam_forwarder(cctx, SSS_PAM_CHAUTHTOK);
}
static int pam_cmd_chauthtok_prelim(struct cli_ctx *cctx) {
- DEBUG(4, ("entering pam_cmd_chauthtok_prelim\n"));
+ DEBUG(4, "entering pam_cmd_chauthtok_prelim\n");
return pam_forwarder(cctx, SSS_PAM_CHAUTHTOK_PRELIM);
}
diff --git a/src/responder/pam/pamsrv_dp.c b/src/responder/pam/pamsrv_dp.c
index d5a52446f..a35627e11 100644
--- a/src/responder/pam/pamsrv_dp.c
+++ b/src/responder/pam/pamsrv_dp.c
@@ -50,7 +50,7 @@ static void pam_dp_process_reply(DBusPendingCall *pending, void *ptr)
/* Check if the client still exists. If not, simply free all the resources
* and quit */
if (preq == NULL) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Client already disconnected\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "Client already disconnected\n");
dbus_pending_call_unref(pending);
dbus_message_unref(msg);
return;
@@ -58,8 +58,8 @@ static void pam_dp_process_reply(DBusPendingCall *pending, void *ptr)
/* Sanity-check of message validity */
if (msg == NULL) {
- DEBUG(0, ("Severe error. A reply callback was called but no reply was"
- "received and no timeout occurred\n"));
+ DEBUG(0, "Severe error. A reply callback was called but no reply was"
+ "received and no timeout occurred\n");
preq->pd->pam_status = PAM_SYSTEM_ERR;
goto done;
}
@@ -69,18 +69,18 @@ static void pam_dp_process_reply(DBusPendingCall *pending, void *ptr)
case DBUS_MESSAGE_TYPE_METHOD_RETURN:
ret = dp_unpack_pam_response(msg, preq->pd, &dbus_error);
if (!ret) {
- DEBUG(0, ("Failed to parse reply.\n"));
+ DEBUG(0, "Failed to parse reply.\n");
preq->pd->pam_status = PAM_SYSTEM_ERR;
goto done;
}
- DEBUG(4, ("received: [%d][%s]\n", preq->pd->pam_status, preq->pd->domain));
+ DEBUG(4, "received: [%d][%s]\n", preq->pd->pam_status, preq->pd->domain);
break;
case DBUS_MESSAGE_TYPE_ERROR:
- DEBUG(0, ("Reply error.\n"));
+ DEBUG(0, "Reply error.\n");
preq->pd->pam_status = PAM_SYSTEM_ERR;
break;
default:
- DEBUG(0, ("Default... what now?.\n"));
+ DEBUG(0, "Default... what now?.\n");
preq->pd->pam_status = PAM_SYSTEM_ERR;
}
@@ -118,9 +118,9 @@ int pam_dp_send_req(struct pam_auth_req *preq, int timeout)
preq->domain->conn_name, &be_conn);
if (res != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("The Data Provider connection for %s is not available!"
+ "The Data Provider connection for %s is not available!"
" This maybe a bug, it shouldn't happen!\n",
- preq->domain->conn_name));
+ preq->domain->conn_name);
return EIO;
}
@@ -129,17 +129,17 @@ int pam_dp_send_req(struct pam_auth_req *preq, int timeout)
DP_INTERFACE,
DP_METHOD_PAMHANDLER);
if (msg == NULL) {
- DEBUG(0,("Out of memory?!\n"));
+ DEBUG(0,"Out of memory?!\n");
return ENOMEM;
}
- DEBUG(4, ("Sending request with the following data:\n"));
+ DEBUG(4, "Sending request with the following data:\n");
DEBUG_PAM_DATA(4, pd);
ret = dp_pack_pam_request(msg, pd);
if (!ret) {
- DEBUG(1,("Failed to build message\n"));
+ DEBUG(1,"Failed to build message\n");
return EIO;
}
diff --git a/src/responder/ssh/sshsrv.c b/src/responder/ssh/sshsrv.c
index a1d1f6c5e..ea943afda 100644
--- a/src/responder/ssh/sshsrv.c
+++ b/src/responder/ssh/sshsrv.c
@@ -63,7 +63,7 @@ static void ssh_dp_reconnect_init(struct sbus_connection *conn,
/* Did we reconnect successfully? */
if (status == SBUS_RECONNECT_SUCCESS) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Reconnected to the Data Provider.\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Reconnected to the Data Provider.\n");
/* Identify ourselves to the data provider */
ret = dp_common_send_id(be_conn->conn,
@@ -77,8 +77,8 @@ static void ssh_dp_reconnect_init(struct sbus_connection *conn,
}
/* Failed to reconnect */
- DEBUG(SSSDBG_FATAL_FAILURE, ("Could not reconnect to %s provider.\n",
- be_conn->domain->name));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Could not reconnect to %s provider.\n",
+ be_conn->domain->name);
}
int ssh_process_init(TALLOC_CTX *mem_ctx,
@@ -104,13 +104,13 @@ int ssh_process_init(TALLOC_CTX *mem_ctx,
&ssh_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;
}
ssh_ctx = talloc_zero(rctx, struct ssh_ctx);
if (!ssh_ctx) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("fatal error initializing ssh_ctx\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "fatal error initializing ssh_ctx\n");
ret = ENOMEM;
goto fail;
}
@@ -122,7 +122,7 @@ int ssh_process_init(TALLOC_CTX *mem_ctx,
"(?P<name>[^@]+)@?(?P<domain>[^@]*$)",
"%1$s@%2$s", &ssh_ctx->snctx);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("fatal error initializing regex data\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "fatal error initializing regex data\n");
goto fail;
}
@@ -133,7 +133,7 @@ int ssh_process_init(TALLOC_CTX *mem_ctx,
3, &max_retries);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Failed to set up automatic reconnection\n"));
+ "Failed to set up automatic reconnection\n");
goto fail;
}
@@ -150,8 +150,8 @@ int ssh_process_init(TALLOC_CTX *mem_ctx,
CONFDB_DEFAULT_SSH_HASH_KNOWN_HOSTS,
&ssh_ctx->hash_known_hosts);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Error reading from confdb (%d) [%s]\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Error reading from confdb (%d) [%s]\n",
+ ret, strerror(ret));
goto fail;
}
@@ -161,18 +161,18 @@ int ssh_process_init(TALLOC_CTX *mem_ctx,
CONFDB_DEFAULT_SSH_KNOWN_HOSTS_TIMEOUT,
&ssh_ctx->known_hosts_timeout);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Error reading from confdb (%d) [%s]\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Error reading from confdb (%d) [%s]\n",
+ ret, strerror(ret));
goto fail;
}
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 fail;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("SSH Initialization complete\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "SSH Initialization complete\n");
return EOK;
@@ -223,8 +223,8 @@ int main(int argc, const char *argv[])
ret = die_if_parent_died();
if (ret != EOK) {
/* This is not fatal, don't return */
- DEBUG(SSSDBG_OP_FAILURE, ("Could not set up to exit "
- "when parent process does\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Could not set up to exit "
+ "when parent process does\n");
}
ret = ssh_process_init(main_ctx,
diff --git a/src/responder/ssh/sshsrv_cmd.c b/src/responder/ssh/sshsrv_cmd.c
index b619a82d6..ad8316398 100644
--- a/src/responder/ssh/sshsrv_cmd.c
+++ b/src/responder/ssh/sshsrv_cmd.c
@@ -62,8 +62,8 @@ sss_ssh_cmd_get_user_pubkeys(struct cli_ctx *cctx)
}
DEBUG(SSSDBG_TRACE_FUNC,
- ("Requesting SSH user public keys for [%s] from [%s]\n",
- cmd_ctx->name, cmd_ctx->domname ? cmd_ctx->domname : "<ALL>"));
+ "Requesting SSH user public keys for [%s] from [%s]\n",
+ cmd_ctx->name, cmd_ctx->domname ? cmd_ctx->domname : "<ALL>");
if (strcmp(cmd_ctx->name, "root") == 0) {
ret = ENOENT;
@@ -112,9 +112,9 @@ sss_ssh_cmd_get_host_pubkeys(struct cli_ctx *cctx)
}
DEBUG(SSSDBG_TRACE_FUNC,
- ("Requesting SSH host public keys for [%s][%s] from [%s]\n",
+ "Requesting SSH host public keys for [%s][%s] from [%s]\n",
cmd_ctx->name, cmd_ctx->alias ? cmd_ctx->alias : "",
- cmd_ctx->domname ? cmd_ctx->domname : "<ALL>"));
+ cmd_ctx->domname ? cmd_ctx->domname : "<ALL>");
if (cmd_ctx->domname) {
cmd_ctx->domain = responder_get_domain(cctx->rctx, cmd_ctx->domname);
@@ -150,7 +150,7 @@ ssh_dp_send_req_done(struct tevent_req *req)
talloc_zfree(req);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Fatal error, killing connection!\n"));
+ "Fatal error, killing connection!\n");
talloc_free(cb_ctx->cctx);
return;
}
@@ -180,7 +180,7 @@ ssh_user_pubkeys_search(struct ssh_cmd_ctx *cmd_ctx)
if (!cmd_ctx->domain) {
DEBUG(SSSDBG_OP_FAILURE,
- ("No matching domain found for [%s], fail!\n", cmd_ctx->name));
+ "No matching domain found for [%s], fail!\n", cmd_ctx->name);
return ENOENT;
}
@@ -191,7 +191,7 @@ ssh_user_pubkeys_search(struct ssh_cmd_ctx *cmd_ctx)
cmd_ctx->name, 0, NULL);
if (!req) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Out of memory sending data provider request\n"));
+ "Out of memory sending data provider request\n");
return ENOMEM;
}
@@ -223,12 +223,12 @@ ssh_user_pubkeys_search_next(struct ssh_cmd_ctx *cmd_ctx)
struct ldb_result *res;
DEBUG(SSSDBG_TRACE_FUNC,
- ("Requesting SSH user public keys for [%s@%s]\n",
- cmd_ctx->name, cmd_ctx->domain->name));
+ "Requesting SSH user public keys for [%s@%s]\n",
+ cmd_ctx->name, cmd_ctx->domain->name);
if (cmd_ctx->domain->sysdb == NULL) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Fatal: Sysdb CTX not found for this domain!\n"));
+ "Fatal: Sysdb CTX not found for this domain!\n");
return EFAULT;
}
@@ -236,14 +236,14 @@ ssh_user_pubkeys_search_next(struct ssh_cmd_ctx *cmd_ctx)
cmd_ctx->name, attrs, &res);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to make request to our cache!\n"));
+ "Failed to make request to our cache!\n");
return EIO;
}
if (res->count > 1) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("User search by name (%s) returned > 1 results!\n",
- cmd_ctx->name));
+ "User search by name (%s) returned > 1 results!\n",
+ cmd_ctx->name);
return EINVAL;
}
@@ -255,7 +255,7 @@ ssh_user_pubkeys_search_next(struct ssh_cmd_ctx *cmd_ctx)
}
DEBUG(SSSDBG_OP_FAILURE,
- ("No attributes for user [%s] found.\n", cmd_ctx->name));
+ "No attributes for user [%s] found.\n", cmd_ctx->name);
return ENOENT;
}
@@ -277,9 +277,9 @@ ssh_user_pubkeys_search_dp_callback(uint16_t err_maj,
if (err_maj) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Unable to get information from Data Provider\n"
+ "Unable to get information from Data Provider\n"
"Error: %u, %u, %s\n",
- (unsigned int)err_maj, (unsigned int)err_min, err_msg));
+ (unsigned int)err_maj, (unsigned int)err_min, err_msg);
}
ret = ssh_user_pubkeys_search_next(cmd_ctx);
@@ -302,7 +302,7 @@ ssh_host_pubkeys_search(struct ssh_cmd_ctx *cmd_ctx)
if (!cmd_ctx->domain) {
DEBUG(SSSDBG_OP_FAILURE,
- ("No matching domain found for [%s], fail!\n", cmd_ctx->name));
+ "No matching domain found for [%s], fail!\n", cmd_ctx->name);
return ENOENT;
}
@@ -313,7 +313,7 @@ ssh_host_pubkeys_search(struct ssh_cmd_ctx *cmd_ctx)
cmd_ctx->name, cmd_ctx->alias);
if (!req) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Out of memory sending data provider request\n"));
+ "Out of memory sending data provider request\n");
return ENOMEM;
}
@@ -345,13 +345,13 @@ ssh_host_pubkeys_search_next(struct ssh_cmd_ctx *cmd_ctx)
const char *attrs[] = { SYSDB_NAME, SYSDB_SSH_PUBKEY, NULL };
DEBUG(SSSDBG_TRACE_FUNC,
- ("Requesting SSH host public keys for [%s@%s]\n",
- cmd_ctx->name, cmd_ctx->domain->name));
+ "Requesting SSH host public keys for [%s@%s]\n",
+ cmd_ctx->name, cmd_ctx->domain->name);
sysdb = cmd_ctx->domain->sysdb;
if (sysdb == NULL) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Fatal: Sysdb CTX not found for this domain!\n"));
+ "Fatal: Sysdb CTX not found for this domain!\n");
return EFAULT;
}
@@ -359,7 +359,7 @@ ssh_host_pubkeys_search_next(struct ssh_cmd_ctx *cmd_ctx)
cmd_ctx->name, attrs, &cmd_ctx->result);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Failed to make request to our cache!\n"));
+ "Failed to make request to our cache!\n");
return EIO;
}
@@ -371,7 +371,7 @@ ssh_host_pubkeys_search_next(struct ssh_cmd_ctx *cmd_ctx)
}
DEBUG(SSSDBG_OP_FAILURE,
- ("No attributes for host [%s] found.\n", cmd_ctx->name));
+ "No attributes for host [%s] found.\n", cmd_ctx->name);
return ENOENT;
}
@@ -390,9 +390,9 @@ ssh_host_pubkeys_search_dp_callback(uint16_t err_maj,
if (err_maj) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Unable to get information from Data Provider\n"
+ "Unable to get information from Data Provider\n"
"Error: %u, %u, %s\n",
- (unsigned int)err_maj, (unsigned int)err_min, err_msg));
+ (unsigned int)err_maj, (unsigned int)err_min, err_msg);
}
ret = ssh_host_pubkeys_search_next(cmd_ctx);
@@ -493,8 +493,8 @@ ssh_host_pubkeys_format_known_host_hashed(TALLOC_CTX *mem_ctx,
hash);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("sss_hmac_sha1() failed (%d): %s\n",
- ret, strerror(ret)));
+ "sss_hmac_sha1() failed (%d): %s\n",
+ ret, strerror(ret));
result = NULL;
goto done;
}
@@ -591,7 +591,7 @@ ssh_host_pubkeys_update_known_hosts(struct ssh_cmd_ctx *cmd_ctx)
sysdb = dom->sysdb;
if (sysdb == NULL) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Fatal: Sysdb CTX not found for this domain!\n"));
+ "Fatal: Sysdb CTX not found for this domain!\n");
ret = EFAULT;
goto done;
}
@@ -601,7 +601,7 @@ ssh_host_pubkeys_update_known_hosts(struct ssh_cmd_ctx *cmd_ctx)
if (ret != EOK) {
if (ret != ENOENT) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Host search failed for domain [%s]\n", dom->name));
+ "Host search failed for domain [%s]\n", dom->name);
}
continue;
}
@@ -610,7 +610,7 @@ ssh_host_pubkeys_update_known_hosts(struct ssh_cmd_ctx *cmd_ctx)
ret = sss_ssh_make_ent(tmp_ctx, hosts[i], &ent);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Failed to get SSH host public keys\n"));
+ "Failed to get SSH host public keys\n");
continue;
}
@@ -621,8 +621,8 @@ ssh_host_pubkeys_update_known_hosts(struct ssh_cmd_ctx *cmd_ctx)
}
if (!entstr) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Failed to format known_hosts data for [%s]\n",
- ent->name));
+ "Failed to format known_hosts data for [%s]\n",
+ ent->name);
continue;
}
@@ -682,20 +682,20 @@ ssh_cmd_parse_request(struct ssh_cmd_ctx *cmd_ctx)
SAFEALIGN_COPY_UINT32_CHECK(&flags, body+c, body_len, &c);
if (flags & ~(uint32_t)SSS_SSH_REQ_MASK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid flags received [0x%x]\n", flags));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid flags received [0x%x]\n", flags);
return EINVAL;
}
SAFEALIGN_COPY_UINT32_CHECK(&name_len, body+c, body_len, &c);
if (name_len == 0 || name_len > body_len - c) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid name length\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid name length\n");
return EINVAL;
}
name = (char *)(body+c);
if (!sss_utf8_check((const uint8_t *)name, name_len-1) ||
name[name_len-1] != 0) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Name is not valid UTF-8 string\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Name is not valid UTF-8 string\n");
return EINVAL;
}
c += name_len;
@@ -703,14 +703,14 @@ ssh_cmd_parse_request(struct ssh_cmd_ctx *cmd_ctx)
if (flags & SSS_SSH_REQ_ALIAS) {
SAFEALIGN_COPY_UINT32_CHECK(&alias_len, body+c, body_len, &c);
if (alias_len == 0 || alias_len > body_len - c) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid alias length\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid alias length\n");
return EINVAL;
}
alias = (char *)(body+c);
if (!sss_utf8_check((const uint8_t *)alias, alias_len-1) ||
alias[alias_len-1] != 0) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Alias is not valid UTF-8 string\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Alias is not valid UTF-8 string\n");
return EINVAL;
}
c += alias_len;
@@ -720,7 +720,7 @@ ssh_cmd_parse_request(struct ssh_cmd_ctx *cmd_ctx)
SAFEALIGN_COPY_UINT32_CHECK(&domain_len, body+c, body_len, &c);
if (domain_len > 0) {
if (domain_len > body_len - c) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid domain length\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid domain length\n");
return EINVAL;
}
@@ -728,21 +728,21 @@ ssh_cmd_parse_request(struct ssh_cmd_ctx *cmd_ctx)
if (!sss_utf8_check((const uint8_t *)domain, domain_len-1) ||
domain[domain_len-1] != 0) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Domain is not valid UTF-8 string\n"));
+ "Domain is not valid UTF-8 string\n");
return EINVAL;
}
c += domain_len;
}
DEBUG(SSSDBG_TRACE_FUNC,
- ("Requested domain [%s]\n", domain ? domain : "<ALL>"));
+ "Requested domain [%s]\n", domain ? domain : "<ALL>");
} else {
- DEBUG(SSSDBG_TRACE_FUNC, ("Splitting domain from name [%s]\n", name));
+ DEBUG(SSSDBG_TRACE_FUNC, "Splitting domain from name [%s]\n", name);
ret = sss_parse_name(cmd_ctx, ssh_ctx->snctx, name,
&cmd_ctx->domname, &cmd_ctx->name);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Invalid name received [%s]\n", name));
+ DEBUG(SSSDBG_OP_FAILURE, "Invalid name received [%s]\n", name);
return ENOENT;
}
@@ -751,7 +751,7 @@ ssh_cmd_parse_request(struct ssh_cmd_ctx *cmd_ctx)
if (cmd_ctx->is_user && cmd_ctx->domname == NULL) {
DEBUG(SSSDBG_TRACE_FUNC,
- ("Parsing name [%s][%s]\n", name, domain ? domain : "<ALL>"));
+ "Parsing name [%s][%s]\n", name, domain ? domain : "<ALL>");
ret = sss_parse_name_for_domains(cmd_ctx, cctx->rctx->domains,
domain, name,
@@ -759,7 +759,7 @@ ssh_cmd_parse_request(struct ssh_cmd_ctx *cmd_ctx)
&cmd_ctx->name);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Invalid name received [%s]\n", name));
+ "Invalid name received [%s]\n", name);
return ENOENT;
}
} else {
@@ -827,8 +827,8 @@ ssh_cmd_build_reply(struct ssh_cmd_ctx *cmd_ctx)
name = ldb_msg_find_attr_as_string(cmd_ctx->result, SYSDB_NAME, NULL);
if (!name) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Got unnamed result for [%s@%s]\n",
- cmd_ctx->name, cmd_ctx->domain->name));
+ "Got unnamed result for [%s@%s]\n",
+ cmd_ctx->name, cmd_ctx->domain->name);
return ENOENT;
}
@@ -925,7 +925,7 @@ ssh_cmd_done(struct ssh_cmd_ctx *cmd_ctx,
}
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Fatal error, killing connection!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Fatal error, killing connection!\n");
talloc_free(cmd_ctx->cctx);
return EFAULT;
}
diff --git a/src/responder/ssh/sshsrv_dp.c b/src/responder/ssh/sshsrv_dp.c
index 812e0c7f6..7ba65b12c 100644
--- a/src/responder/ssh/sshsrv_dp.c
+++ b/src/responder/ssh/sshsrv_dp.c
@@ -86,8 +86,8 @@ sss_dp_get_ssh_host_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;
}
@@ -120,7 +120,7 @@ sss_dp_get_ssh_host_msg(void *pvt)
filter = talloc_asprintf(info, "name=%s", info->name);
}
if (!filter) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory?!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory?!\n");
return NULL;
}
@@ -129,15 +129,15 @@ sss_dp_get_ssh_host_msg(void *pvt)
DP_INTERFACE,
DP_METHOD_HOSTHANDLER);
if (msg == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory?!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory?!\n");
talloc_free(filter);
return NULL;
}
/* create the message */
DEBUG(SSSDBG_TRACE_FUNC,
- ("Creating SSH host request for [%s][%u][%s]\n",
- info->dom->name, be_type, filter));
+ "Creating SSH host request for [%s][%u][%s]\n",
+ info->dom->name, be_type, filter);
dbret = dbus_message_append_args(msg,
DBUS_TYPE_UINT32, &be_type,
@@ -145,7 +145,7 @@ sss_dp_get_ssh_host_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;
}
diff --git a/src/responder/sudo/sudosrv.c b/src/responder/sudo/sudosrv.c
index e6bd997ec..b821c96cd 100644
--- a/src/responder/sudo/sudosrv.c
+++ b/src/responder/sudo/sudosrv.c
@@ -64,7 +64,7 @@ static void sudo_dp_reconnect_init(struct sbus_connection *conn,
/* Did we reconnect successfully? */
if (status == SBUS_RECONNECT_SUCCESS) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Reconnected to the Data Provider.\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Reconnected to the Data Provider.\n");
/* Identify ourselves to the data provider */
ret = dp_common_send_id(be_conn->conn,
@@ -78,8 +78,8 @@ static void sudo_dp_reconnect_init(struct sbus_connection *conn,
}
/* Failed to reconnect */
- DEBUG(SSSDBG_FATAL_FAILURE, ("Could not reconnect to %s provider.\n",
- be_conn->domain->name));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Could not reconnect to %s provider.\n",
+ be_conn->domain->name);
}
int sudo_process_init(TALLOC_CTX *mem_ctx,
@@ -105,13 +105,13 @@ int sudo_process_init(TALLOC_CTX *mem_ctx,
&sudo_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;
}
sudo_ctx = talloc_zero(rctx, struct sudo_ctx);
if (!sudo_ctx) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("fatal error initializing sudo_ctx\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "fatal error initializing sudo_ctx\n");
ret = ENOMEM;
goto fail;
}
@@ -126,7 +126,7 @@ int sudo_process_init(TALLOC_CTX *mem_ctx,
3, &max_retries);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
- ("Failed to set up automatic reconnection\n"));
+ "Failed to set up automatic reconnection\n");
goto fail;
}
@@ -143,18 +143,18 @@ int sudo_process_init(TALLOC_CTX *mem_ctx,
CONFDB_DEFAULT_SUDO_TIMED,
&sudo_ctx->timed);
if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("Error reading from confdb (%d) [%s]\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Error reading from confdb (%d) [%s]\n",
+ ret, strerror(ret));
goto fail;
}
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 fail;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("SUDO Initialization complete\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "SUDO Initialization complete\n");
return EOK;
@@ -205,8 +205,8 @@ int main(int argc, const char *argv[])
ret = die_if_parent_died();
if (ret != EOK) {
/* This is not fatal, don't return */
- DEBUG(SSSDBG_OP_FAILURE, ("Could not set up to exit "
- "when parent process does\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Could not set up to exit "
+ "when parent process does\n");
}
ret = sudo_process_init(main_ctx,
diff --git a/src/responder/sudo/sudosrv_cmd.c b/src/responder/sudo/sudosrv_cmd.c
index 8f07e8b3a..fd8c46d63 100644
--- a/src/responder/sudo/sudosrv_cmd.c
+++ b/src/responder/sudo/sudosrv_cmd.c
@@ -47,15 +47,15 @@ static errno_t sudosrv_cmd_send_reply(struct sudo_cmd_ctx *cmd_ctx,
&cli_ctx->creq->out);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to create a new packet [%d]; %s\n",
- ret, strerror(ret)));
+ "Unable to create a new packet [%d]; %s\n",
+ ret, strerror(ret));
goto done;
}
ret = sss_packet_grow(cli_ctx->creq->out, response_len);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to create response: %s\n", strerror(ret)));
+ "Unable to create response: %s\n", strerror(ret));
goto done;
}
sss_packet_get_body(cli_ctx->creq->out, &packet_body, &packet_len);
@@ -80,8 +80,8 @@ static errno_t sudosrv_cmd_send_error(TALLOC_CTX *mem_ctx,
int ret = EOK;
if (error == EOK) {
- DEBUG(SSSDBG_MINOR_FAILURE, ("Everything is fine but we are "
- "returning error?\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "Everything is fine but we are "
+ "returning error?\n");
return EFAULT;
}
@@ -109,8 +109,8 @@ errno_t sudosrv_cmd_done(struct sudo_cmd_ctx *cmd_ctx, int ret)
if (cmd_ctx->sudo_ctx->timed) {
/* filter rules by time */
- DEBUG(SSSDBG_TRACE_FUNC, ("Applying time restrictions on"
- "%u rules\n", cmd_ctx->num_rules));
+ DEBUG(SSSDBG_TRACE_FUNC, "Applying time restrictions on"
+ "%u rules\n", cmd_ctx->num_rules);
ret = sysdb_sudo_filter_rules_by_time(cmd_ctx, cmd_ctx->num_rules,
cmd_ctx->rules, 0,
@@ -119,8 +119,8 @@ errno_t sudosrv_cmd_done(struct sudo_cmd_ctx *cmd_ctx, int ret)
return EFAULT;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("Got %u rules after time filter\n",
- num_rules));
+ DEBUG(SSSDBG_TRACE_FUNC, "Got %u rules after time filter\n",
+ num_rules);
}
/* send result */
@@ -155,7 +155,7 @@ errno_t sudosrv_cmd_done(struct sudo_cmd_ctx *cmd_ctx, int ret)
}
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Fatal error, killing connection!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Fatal error, killing connection!\n");
talloc_free(cmd_ctx->cli_ctx);
return EFAULT;
}
@@ -179,7 +179,7 @@ static int sudosrv_cmd(enum sss_sudo_type type, struct cli_ctx *cli_ctx)
cmd_ctx = talloc_zero(cli_ctx, struct sudo_cmd_ctx);
if (cmd_ctx == NULL) {
/* kill the connection here as we have no context for reply */
- DEBUG(SSSDBG_FATAL_FAILURE, ("Out of memory?\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Out of memory?\n");
return ENOMEM;
}
@@ -188,25 +188,25 @@ static int sudosrv_cmd(enum sss_sudo_type type, struct cli_ctx *cli_ctx)
cmd_ctx->type = type;
cmd_ctx->sudo_ctx = talloc_get_type(cli_ctx->rctx->pvt_ctx, struct sudo_ctx);
if (cmd_ctx->sudo_ctx == NULL) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("sudo_ctx not set, killing connection!\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "sudo_ctx not set, killing connection!\n");
return EFAULT;
}
/* if protocol is invalid return */
switch (protocol) {
case 0:
- DEBUG(SSSDBG_FATAL_FAILURE, ("Protocol [%d] is not secure. "
- "SSSD does not allow to use this protocol.\n", protocol));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Protocol [%d] is not secure. "
+ "SSSD does not allow to use this protocol.\n", protocol);
ret = EFAULT;
goto done;
break;
case SSS_SUDO_PROTOCOL_VERSION:
- DEBUG(SSSDBG_TRACE_INTERNAL, ("Using protocol version [%d]\n",
- protocol));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "Using protocol version [%d]\n",
+ protocol);
break;
default:
- DEBUG(SSSDBG_FATAL_FAILURE, ("Invalid protocol version [%d]!\n",
- protocol));
+ DEBUG(SSSDBG_FATAL_FAILURE, "Invalid protocol version [%d]!\n",
+ protocol);
ret = EFAULT;
goto done;
}
@@ -215,7 +215,7 @@ static int sudosrv_cmd(enum sss_sudo_type type, struct cli_ctx *cli_ctx)
sss_packet_get_body(cli_ctx->creq->in, &query_body, &query_len);
if (query_len <= 0 || query_body == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Query is empty\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Query is empty\n");
ret = EINVAL;
goto done;
}
@@ -247,8 +247,8 @@ static void sudosrv_cmd_parse_query_done(struct tevent_req *req)
&cmd_ctx->username, &cmd_ctx->domain);
talloc_zfree(req);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid query [%d]: %s\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid query [%d]: %s\n",
+ ret, strerror(ret));
goto done;
}
@@ -256,14 +256,14 @@ static void sudosrv_cmd_parse_query_done(struct tevent_req *req)
switch (cmd_ctx->type) {
case SSS_SUDO_DEFAULTS:
- DEBUG(SSSDBG_FUNC_DATA, ("Requesting default options "
+ DEBUG(SSSDBG_FUNC_DATA, "Requesting default options "
"for [%s] from [%s]\n", cmd_ctx->username,
- cmd_ctx->domain ? cmd_ctx->domain->name : "<ALL>"));
+ cmd_ctx->domain ? cmd_ctx->domain->name : "<ALL>");
break;
case SSS_SUDO_USER:
- DEBUG(SSSDBG_FUNC_DATA, ("Requesting rules "
+ DEBUG(SSSDBG_FUNC_DATA, "Requesting rules "
"for [%s] from [%s]\n", cmd_ctx->username,
- cmd_ctx->domain ? cmd_ctx->domain->name : "<ALL>"));
+ cmd_ctx->domain ? cmd_ctx->domain->name : "<ALL>");
break;
}
diff --git a/src/responder/sudo/sudosrv_dp.c b/src/responder/sudo/sudosrv_dp.c
index 3cd8fe8d8..483533ccc 100644
--- a/src/responder/sudo/sudosrv_dp.c
+++ b/src/responder/sudo/sudosrv_dp.c
@@ -99,8 +99,8 @@ sss_dp_get_sudoers_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;
}
@@ -144,14 +144,14 @@ sss_dp_get_sudoers_msg(void *pvt)
DP_INTERFACE,
DP_METHOD_SUDOHANDLER);
if (msg == NULL) {
- 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 SUDOers request for [%s][%u][%s][%u]\n",
- info->dom->name, be_type, info->name, info->num_rules));
+ "Creating SUDOers request for [%s][%u][%s][%u]\n",
+ info->dom->name, be_type, info->name, info->num_rules);
dbus_message_iter_init_append(msg, &iter);
@@ -172,8 +172,8 @@ sss_dp_get_sudoers_msg(void *pvt)
for (i = 0; i < info->num_rules; i++) {
ret = sysdb_attrs_get_string(info->rules[i], SYSDB_NAME, &rule_name);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Could not get rule name [%d]: %s\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_OP_FAILURE, "Could not get rule name [%d]: %s\n",
+ ret, strerror(ret));
goto fail;
}
@@ -188,7 +188,7 @@ sss_dp_get_sudoers_msg(void *pvt)
return msg;
fail:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to build message\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Failed to build message\n");
dbus_message_unref(msg);
return NULL;
}
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c
index fa461b4f0..9d8ef5d2a 100644
--- a/src/responder/sudo/sudosrv_get_sudorules.c
+++ b/src/responder/sudo/sudosrv_get_sudorules.c
@@ -39,11 +39,11 @@ errno_t sudosrv_get_sudorules(struct sudo_dom_ctx *dctx)
ret = sudosrv_get_user(dctx);
if (ret == EAGAIN) {
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Looking up the user info from Data Provider\n"));
+ "Looking up the user info from Data Provider\n");
return EAGAIN;
} else if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Error looking up user information [%d]: %s\n", ret, strerror(ret)));
+ "Error looking up user information [%d]: %s\n", ret, strerror(ret));
return ret;
}
@@ -51,11 +51,11 @@ errno_t sudosrv_get_sudorules(struct sudo_dom_ctx *dctx)
ret = sudosrv_get_rules(dctx->cmd_ctx);
if (ret == EAGAIN) {
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Looking up the sudo rules from Data Provider\n"));
+ "Looking up the sudo rules from Data Provider\n");
return EAGAIN;
} else if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Error looking up sudo rules [%d]: %s\n", ret, strerror(ret)));
+ "Error looking up sudo rules [%d]: %s\n", ret, strerror(ret));
return ret;
}
@@ -83,7 +83,7 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_new() failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_new() failed\n");
return ENOMEM;
}
@@ -103,25 +103,25 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
name = sss_get_cased_name(tmp_ctx, cmd_ctx->username,
dom->case_sensitive);
if (name == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory\n");
ret = ENOMEM;
goto done;
}
- DEBUG(SSSDBG_FUNC_DATA, ("Requesting info about [%s@%s]\n",
- name, dom->name));
+ DEBUG(SSSDBG_FUNC_DATA, "Requesting info about [%s@%s]\n",
+ name, dom->name);
ret = sysdb_getpwnam(dctx, dctx->domain, name, &user);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Failed to make request to our cache!\n"));
+ "Failed to make request to our cache!\n");
ret = EIO;
goto done;
}
if (user->count > 1) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("getpwnam call returned more than one result !?!\n"));
+ "getpwnam call returned more than one result !?!\n");
ret = EIO;
goto done;
}
@@ -134,7 +134,7 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
if (dom) continue;
}
- DEBUG(SSSDBG_MINOR_FAILURE, ("No results for getpwnam call\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "No results for getpwnam call\n");
ret = ENOENT;
goto done;
}
@@ -154,7 +154,7 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
cmd_ctx->username, 0, NULL);
if (!dpreq) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Out of memory sending data provider request\n"));
+ "Out of memory sending data provider request\n");
ret = ENOMEM;
goto done;
}
@@ -188,7 +188,7 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
if (dom) continue;
}
- DEBUG(SSSDBG_MINOR_FAILURE, ("UID does not match\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "UID does not match\n");
ret = ENOENT;
goto done;
}
@@ -197,7 +197,7 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
original_name = ldb_msg_find_attr_as_string(user->msgs[0],
SYSDB_NAME, NULL);
if (original_name == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("A user with no name?\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "A user with no name?\n");
ret = EFAULT;
goto done;
}
@@ -205,7 +205,7 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
cmd_ctx->cased_username = talloc_move(cmd_ctx, &name);
cmd_ctx->orig_username = talloc_strdup(cmd_ctx, original_name);
if (cmd_ctx->orig_username == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory\n");
ret = ENOMEM;
goto done;
}
@@ -213,8 +213,8 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
/* and set domain */
cmd_ctx->domain = dom;
- DEBUG(SSSDBG_TRACE_FUNC, ("Returning info for user [%s@%s]\n",
- cmd_ctx->username, dctx->domain->name));
+ DEBUG(SSSDBG_TRACE_FUNC, "Returning info for user [%s@%s]\n",
+ cmd_ctx->username, dctx->domain->name);
ret = EOK;
goto done;
}
@@ -241,7 +241,7 @@ static void sudosrv_dp_send_acct_req_done(struct tevent_req *req)
talloc_zfree(req);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Fatal error, killing connection!\n"));
+ "Fatal error, killing connection!\n");
talloc_free(cb_ctx->cctx);
return;
}
@@ -257,33 +257,33 @@ static void sudosrv_check_user_dp_callback(uint16_t err_maj, uint32_t err_min,
if (err_maj) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to get information from Data Provider\n"
+ "Unable to get information from Data Provider\n"
"Error: %u, %u, %s\n",
- (unsigned int)err_maj, (unsigned int)err_min, err_msg));
+ (unsigned int)err_maj, (unsigned int)err_min, err_msg);
}
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Data Provider returned, check the cache again\n"));
+ "Data Provider returned, check the cache again\n");
dctx->check_provider = false;
ret = sudosrv_get_user(dctx);
if (ret == EAGAIN) {
goto done;
} else if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Could not look up the user [%d]: %s\n",
- ret, strerror(ret)));
+ "Could not look up the user [%d]: %s\n",
+ ret, strerror(ret));
sudosrv_cmd_done(dctx->cmd_ctx, ret);
return;
}
- DEBUG(SSSDBG_TRACE_INTERNAL, ("Looking up sudo rules..\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "Looking up sudo rules..\n");
ret = sudosrv_get_rules(dctx->cmd_ctx);
if (ret == EAGAIN) {
goto done;
} else if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Error getting sudo rules [%d]: %s\n",
- ret, strerror(ret)));
+ "Error getting sudo rules [%d]: %s\n",
+ ret, strerror(ret));
sudosrv_cmd_done(dctx->cmd_ctx, EIO);
return;
}
@@ -326,26 +326,26 @@ errno_t sudosrv_get_rules(struct sudo_cmd_ctx *cmd_ctx)
NULL };
if (cmd_ctx->domain == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Domain is not set!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Domain is not set!\n");
return EFAULT;
}
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_new() failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_new() failed\n");
return ENOMEM;
}
switch (cmd_ctx->type) {
case SSS_SUDO_DEFAULTS:
- DEBUG(SSSDBG_TRACE_FUNC, ("Retrieving default options "
+ DEBUG(SSSDBG_TRACE_FUNC, "Retrieving default options "
"for [%s] from [%s]\n", cmd_ctx->orig_username,
- cmd_ctx->domain->name));
+ cmd_ctx->domain->name);
break;
case SSS_SUDO_USER:
- DEBUG(SSSDBG_TRACE_FUNC, ("Retrieving rules "
+ DEBUG(SSSDBG_TRACE_FUNC, "Retrieving rules "
"for [%s] from [%s]\n", cmd_ctx->orig_username,
- cmd_ctx->domain->name));
+ cmd_ctx->domain->name);
break;
}
@@ -358,7 +358,7 @@ errno_t sudosrv_get_rules(struct sudo_cmd_ctx *cmd_ctx)
cmd_ctx->orig_username, NULL, &groupnames);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to retrieve user info [%d]: %s\n", ret, strerror(ret)));
+ "Unable to retrieve user info [%d]: %s\n", ret, strerror(ret));
goto done;
}
@@ -372,16 +372,16 @@ errno_t sudosrv_get_rules(struct sudo_cmd_ctx *cmd_ctx)
cmd_ctx->uid, groupnames,
&expired_rules, &expired_rules_num);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Unable to retrieve expired sudo rules "
- "[%d]: %s\n", ret, strerror(ret)));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Unable to retrieve expired sudo rules "
+ "[%d]: %s\n", ret, strerror(ret));
goto done;
}
cmd_ctx->expired_rules_num = expired_rules_num;
if (expired_rules_num > 0) {
/* refresh expired rules then continue */
- DEBUG(SSSDBG_TRACE_INTERNAL, ("Refreshing %d expired rules\n",
- expired_rules_num));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "Refreshing %d expired rules\n",
+ expired_rules_num);
dpreq = sss_dp_get_sudoers_send(tmp_ctx, cmd_ctx->cli_ctx->rctx,
cmd_ctx->domain, false,
SSS_DP_SUDO_REFRESH_RULES,
@@ -389,7 +389,7 @@ errno_t sudosrv_get_rules(struct sudo_cmd_ctx *cmd_ctx)
expired_rules_num, expired_rules);
if (dpreq == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Cannot issue DP request.\n"));
+ "Cannot issue DP request.\n");
ret = EIO;
goto done;
}
@@ -411,14 +411,14 @@ errno_t sudosrv_get_rules(struct sudo_cmd_ctx *cmd_ctx)
} else {
/* nothing is expired return what we have in the cache */
- DEBUG(SSSDBG_TRACE_INTERNAL, ("About to get sudo rules from cache\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "About to get sudo rules from cache\n");
ret = sudosrv_get_sudorules_from_cache(cmd_ctx, cmd_ctx,
&cmd_ctx->rules,
&cmd_ctx->num_rules);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Failed to make a request to our cache [%d]: %s\n",
- ret, strerror(ret)));
+ "Failed to make a request to our cache [%d]: %s\n",
+ ret, strerror(ret));
goto done;
}
}
@@ -455,7 +455,7 @@ sudosrv_dp_req_done(struct tevent_req *req)
&err_msg);
talloc_free(req);
if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Fatal error, killing connection!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Fatal error, killing connection!\n");
talloc_free(cli_ctx);
return;
}
@@ -466,7 +466,7 @@ sudosrv_dp_req_done(struct tevent_req *req)
static void
sudosrv_dp_oob_req_done(struct tevent_req *req)
{
- DEBUG(SSSDBG_TRACE_FUNC, ("Out of band refresh finished\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Out of band refresh finished\n");
talloc_free(req);
}
@@ -480,19 +480,19 @@ sudosrv_get_sudorules_dp_callback(uint16_t err_maj, uint32_t err_min,
if (err_maj) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to get information from Data Provider\n"
+ "Unable to get information from Data Provider\n"
"Error: %u, %u, %s\n"
"Will try to return what we have in cache\n",
- (unsigned int)err_maj, (unsigned int)err_min, err_msg));
+ (unsigned int)err_maj, (unsigned int)err_min, err_msg);
}
- DEBUG(SSSDBG_TRACE_INTERNAL, ("About to get sudo rules from cache\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "About to get sudo rules from cache\n");
ret = sudosrv_get_sudorules_from_cache(cmd_ctx, cmd_ctx, &cmd_ctx->rules,
&cmd_ctx->num_rules);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Failed to make a request to our cache [%d]: %s\n",
- ret, strerror(ret)));
+ "Failed to make a request to our cache [%d]: %s\n",
+ ret, strerror(ret));
sudosrv_cmd_done(cmd_ctx, EIO);
return;
}
@@ -500,8 +500,8 @@ sudosrv_get_sudorules_dp_callback(uint16_t err_maj, uint32_t err_min,
if (cmd_ctx->expired_rules_num > 0
&& err_min == ENOENT) {
DEBUG(SSSDBG_TRACE_INTERNAL,
- ("Some expired rules were removed from the server, "
- "scheduling full refresh out of band\n"));
+ "Some expired rules were removed from the server, "
+ "scheduling full refresh out of band\n");
dpreq = sss_dp_get_sudoers_send(cmd_ctx->cli_ctx->rctx,
cmd_ctx->cli_ctx->rctx,
cmd_ctx->domain, false,
@@ -510,7 +510,7 @@ sudosrv_get_sudorules_dp_callback(uint16_t err_maj, uint32_t err_min,
0, NULL);
if (dpreq == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Cannot issue DP request.\n"));
+ "Cannot issue DP request.\n");
} else {
tevent_req_set_callback(dpreq, sudosrv_dp_oob_req_done, NULL);
}
@@ -545,13 +545,13 @@ static errno_t sudosrv_get_sudorules_from_cache(TALLOC_CTX *mem_ctx,
NULL };
if (cmd_ctx->domain == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Domain is not set!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Domain is not set!\n");
return EFAULT;
}
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_new() failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_new() failed\n");
return ENOMEM;
}
@@ -564,8 +564,8 @@ static errno_t sudosrv_get_sudorules_from_cache(TALLOC_CTX *mem_ctx,
NULL, &groupnames);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to retrieve user info [%d]: %s\n",
- ret, strerror(ret)));
+ "Unable to retrieve user info [%d]: %s\n",
+ ret, strerror(ret));
goto done;
}
flags = SYSDB_SUDO_FILTER_USERINFO | SYSDB_SUDO_FILTER_INCLUDE_ALL;
@@ -583,12 +583,12 @@ static errno_t sudosrv_get_sudorules_from_cache(TALLOC_CTX *mem_ctx,
&rules, &num_rules);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to retrieve sudo rules [%d]: %s\n", ret, strerror(ret)));
+ "Unable to retrieve sudo rules [%d]: %s\n", ret, strerror(ret));
goto done;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("Returning %d rules for [%s@%s]\n",
- num_rules, debug_name, cmd_ctx->domain->name));
+ DEBUG(SSSDBG_TRACE_FUNC, "Returning %d rules for [%s@%s]\n",
+ num_rules, debug_name, cmd_ctx->domain->name);
if (_rules != NULL) {
*_rules = talloc_steal(mem_ctx, rules);
@@ -631,12 +631,12 @@ static errno_t sudosrv_get_sudorules_query_cache(TALLOC_CTX *mem_ctx,
flags, &filter);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not construct the search filter [%d]: %s\n",
- ret, strerror(ret)));
+ "Could not construct the search filter [%d]: %s\n",
+ ret, strerror(ret));
goto done;
}
- DEBUG(SSSDBG_FUNC_DATA, ("Searching sysdb with [%s]\n", filter));
+ DEBUG(SSSDBG_FUNC_DATA, "Searching sysdb with [%s]\n", filter);
if (IS_SUBDOMAIN(domain)) {
/* rules are stored inside parent domain tree */
@@ -647,7 +647,7 @@ static errno_t sudosrv_get_sudorules_query_cache(TALLOC_CTX *mem_ctx,
SUDORULE_SUBDIR, attrs,
&count, &msgs);
if (ret != EOK && ret != ENOENT) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Error looking up SUDO rules"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Error looking up SUDO rules");
goto done;
} if (ret == ENOENT) {
*_rules = NULL;
@@ -659,14 +659,14 @@ static errno_t sudosrv_get_sudorules_query_cache(TALLOC_CTX *mem_ctx,
ret = sysdb_msg2attrs(tmp_ctx, count, msgs, &rules);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Could not convert ldb message to sysdb_attrs\n"));
+ "Could not convert ldb message to sysdb_attrs\n");
goto done;
}
ret = sort_sudo_rules(rules, count);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Could not sort rules by sudoOrder\n"));
+ "Could not sort rules by sudoOrder\n");
goto done;
}
@@ -689,7 +689,7 @@ sudo_order_cmp_fn(const void *a, const void *b)
r1 = * (struct sysdb_attrs * const *) a;
r2 = * (struct sysdb_attrs * const *) b;
if (!r1 || !r2) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("BUG: Wrong data?\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "BUG: Wrong data?\n");
return 0;
}
@@ -699,7 +699,7 @@ sudo_order_cmp_fn(const void *a, const void *b)
* a value of 0 is assumed */
o1 = 0;
} else if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Cannot get sudoOrder value\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Cannot get sudoOrder value\n");
return 0;
}
@@ -709,7 +709,7 @@ sudo_order_cmp_fn(const void *a, const void *b)
* a value of 0 is assumed */
o2 = 0;
} else if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("Cannot get sudoOrder value\n"));
+ DEBUG(SSSDBG_OP_FAILURE, "Cannot get sudoOrder value\n");
return 0;
}
diff --git a/src/responder/sudo/sudosrv_query.c b/src/responder/sudo/sudosrv_query.c
index c60202f5e..632afa712 100644
--- a/src/responder/sudo/sudosrv_query.c
+++ b/src/responder/sudo/sudosrv_query.c
@@ -39,7 +39,7 @@ static int sudosrv_response_append_string(TALLOC_CTX *mem_ctx,
response_body = talloc_realloc(mem_ctx, response_body, uint8_t,
response_len + (str_len * sizeof(char)));
if (response_body == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_realloc() failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_realloc() failed\n");
return ENOMEM;
}
memcpy(response_body + response_len, str, str_len);
@@ -62,7 +62,7 @@ static int sudosrv_response_append_uint32(TALLOC_CTX *mem_ctx,
response_body = talloc_realloc(mem_ctx, response_body, uint8_t,
response_len + sizeof(uint32_t));
if (response_body == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_realloc() failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_realloc() failed\n");
return ENOMEM;
}
SAFEALIGN_SET_UINT32(response_body + response_len, number, &response_len);
@@ -88,7 +88,7 @@ static int sudosrv_response_append_attr(TALLOC_CTX *mem_ctx,
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_new() failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_new() failed\n");
return ENOMEM;
}
@@ -109,7 +109,7 @@ static int sudosrv_response_append_attr(TALLOC_CTX *mem_ctx,
/* values */
for (i = 0; i < values_num; i++) {
if (strlen((char*)(values[i].data)) != values[i].length) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("value is not a string"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "value is not a string");
ret = EINVAL;
goto done;
}
@@ -147,7 +147,7 @@ static int sudosrv_response_append_rule(TALLOC_CTX *mem_ctx,
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_new() failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_new() failed\n");
return ENOMEM;
}
@@ -201,7 +201,7 @@ errno_t sudosrv_build_response(TALLOC_CTX *mem_ctx,
tmp_ctx = talloc_new(NULL);
if (tmp_ctx == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_new() failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_new() failed\n");
return ENOMEM;
}
@@ -277,7 +277,7 @@ struct tevent_req *sudosrv_parse_query_send(TALLOC_CTX *mem_ctx,
req = tevent_req_create(mem_ctx, &state,
struct sudosrv_parse_query_state);
if (req == NULL) {
- DEBUG(SSSDBG_FATAL_FAILURE, ("tevent_req_create() failed\n"));
+ DEBUG(SSSDBG_FATAL_FAILURE, "tevent_req_create() failed\n");
return NULL;
}
@@ -286,7 +286,7 @@ struct tevent_req *sudosrv_parse_query_send(TALLOC_CTX *mem_ctx,
/* uid */
if (query_len < sizeof(uid_t)) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Query is too small\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Query is too small\n");
ret = EINVAL;
goto done;
}
@@ -298,19 +298,19 @@ struct tevent_req *sudosrv_parse_query_send(TALLOC_CTX *mem_ctx,
rawname_len = query_len - offset; /* strlen + zero */
if (rawname[rawname_len - 1] != '\0') {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Username is not zero terminated\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Username is not zero terminated\n");
ret = EINVAL;
goto done;
}
if (rawname_len < 2) { /* at least one character and zero */
- DEBUG(SSSDBG_CRIT_FAILURE, ("Query does not contain username\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Query does not contain username\n");
ret = EINVAL;
goto done;
}
if (!sss_utf8_check((uint8_t*)rawname, rawname_len - 1)) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Supplied data is not valid UTF-8 string\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Supplied data is not valid UTF-8 string\n");
ret = EINVAL;
goto done;
}
@@ -322,8 +322,8 @@ struct tevent_req *sudosrv_parse_query_send(TALLOC_CTX *mem_ctx,
rctx->default_domain, state->rawname,
&domainname, NULL);
if (ret == EAGAIN) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Domain [%s] not found, "
- "sending subdomain request\n", domainname));
+ DEBUG(SSSDBG_TRACE_FUNC, "Domain [%s] not found, "
+ "sending subdomain request\n", domainname);
subreq = sss_dp_get_domains_send(state, rctx, true, domainname);
if (subreq == NULL) {
@@ -334,7 +334,7 @@ struct tevent_req *sudosrv_parse_query_send(TALLOC_CTX *mem_ctx,
}
goto done;
} else if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid name received [%s]\n", rawname));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Invalid name received [%s]\n", rawname);
goto done;
}
@@ -386,7 +386,7 @@ errno_t sudosrv_parse_query_recv(TALLOC_CTX *mem_ctx,
TEVENT_REQ_RETURN_ON_ERROR(req);
if (state->rawname == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("No query specified?!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "No query specified?!\n");
return EINVAL;
}
@@ -399,13 +399,13 @@ errno_t sudosrv_parse_query_recv(TALLOC_CTX *mem_ctx,
state->rawname,
&domainname, &username);
if (ret != EOK) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Unable to parse domain [%d]: %s\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_TRACE_FUNC, "Unable to parse domain [%d]: %s\n",
+ ret, strerror(ret));
return ret;
}
if (username == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("No username specified!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "No username specified!\n");
return EINVAL;
}
@@ -414,8 +414,8 @@ errno_t sudosrv_parse_query_recv(TALLOC_CTX *mem_ctx,
* so I cannot easily steal it */
domain = responder_get_domain(state->rctx, domainname);
if (domain == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, ("Corresponding domain [%s] has not been "
- "found\n", domainname));
+ DEBUG(SSSDBG_OP_FAILURE, "Corresponding domain [%s] has not been "
+ "found\n", domainname);
return ENOENT;
}
}