summaryrefslogtreecommitdiffstats
path: root/src/sbus
diff options
context:
space:
mode:
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>2014-02-12 10:12:59 -0500
committerJakub Hrozek <jhrozek@redhat.com>2014-02-12 22:31:02 +0100
commit83bf46f4066e3d5e838a32357c201de9bd6ecdfd (patch)
tree65f491f7661bd533398625e015f2b5e5bff3badf /src/sbus
parent45a1d9d597df977354428440aeff11c6a0a947fe (diff)
downloadsssd-83bf46f4066e3d5e838a32357c201de9bd6ecdfd.tar.gz
sssd-83bf46f4066e3d5e838a32357c201de9bd6ecdfd.tar.xz
sssd-83bf46f4066e3d5e838a32357c201de9bd6ecdfd.zip
Update DEBUG* invocations to use new levels
Use a script to update DEBUG* macro invocations, which use literal numbers for levels, to use bitmask macros instead: grep -rl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e 'use strict; use File::Slurp; my @map=qw" SSSDBG_FATAL_FAILURE SSSDBG_CRIT_FAILURE SSSDBG_OP_FAILURE SSSDBG_MINOR_FAILURE SSSDBG_CONF_SETTINGS SSSDBG_FUNC_DATA SSSDBG_TRACE_FUNC SSSDBG_TRACE_LIBS SSSDBG_TRACE_INTERNAL SSSDBG_TRACE_ALL "; my $text=read_file(\*STDIN); my $repl; $text=~s/ ^ ( .* \b (DEBUG|DEBUG_PAM_DATA|DEBUG_GR_MEM) \s* \(\s* )( [0-9] )( \s*, ) ( \s* ) ( .* ) $ / $repl = $1.$map[$3].$4.$5.$6, length($repl) <= 80 ? $repl : $1.$map[$3].$4."\n".(" " x length($1)).$6 /xmge; print $text; ' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/sbus')
-rw-r--r--src/sbus/sbus_client.c5
-rw-r--r--src/sbus/sssd_dbus_common.c23
-rw-r--r--src/sbus/sssd_dbus_connection.c53
-rw-r--r--src/sbus/sssd_dbus_server.c57
4 files changed, 79 insertions, 59 deletions
diff --git a/src/sbus/sbus_client.c b/src/sbus/sbus_client.c
index 9f1d7e8f5..19627af14 100644
--- a/src/sbus/sbus_client.c
+++ b/src/sbus/sbus_client.c
@@ -43,13 +43,14 @@ int sbus_client_init(TALLOC_CTX *mem_ctx,
filename = strchr(server_address, '/');
if (filename == NULL) {
- DEBUG(1, "Unexpected dbus address [%s].\n", server_address);
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ "Unexpected dbus address [%s].\n", server_address);
return EIO;
}
ret = check_file(filename, 0, 0, 0600, CHECK_SOCK, NULL, true);
if (ret != EOK) {
- DEBUG(1, "check_file failed for [%s].\n", filename);
+ DEBUG(SSSDBG_CRIT_FAILURE, "check_file failed for [%s].\n", filename);
return EIO;
}
diff --git a/src/sbus/sssd_dbus_common.c b/src/sbus/sssd_dbus_common.c
index d754ed6bc..737d8d4f9 100644
--- a/src/sbus/sssd_dbus_common.c
+++ b/src/sbus/sssd_dbus_common.c
@@ -130,7 +130,7 @@ dbus_bool_t sbus_add_watch(DBusWatch *dbus_watch, void *data)
/* does not exist, allocate new one */
watch = talloc_zero(conn, struct sbus_watch_ctx);
if (!watch) {
- DEBUG(0, "Out of Memory!\n");
+ DEBUG(SSSDBG_FATAL_FAILURE, "Out of Memory!\n");
return FALSE;
}
watch->conn = conn;
@@ -170,7 +170,7 @@ dbus_bool_t sbus_add_watch(DBusWatch *dbus_watch, void *data)
watch, fd, event_flags,
sbus_watch_handler, watch);
if (!watch->fde) {
- DEBUG(0, "Failed to set up fd event!\n");
+ DEBUG(SSSDBG_FATAL_FAILURE, "Failed to set up fd event!\n");
talloc_zfree(watch);
return FALSE;
}
@@ -178,7 +178,7 @@ dbus_bool_t sbus_add_watch(DBusWatch *dbus_watch, void *data)
DLIST_ADD(conn->watch_list, watch);
talloc_set_destructor((TALLOC_CTX *)watch, watch_destructor);
- DEBUG(8, "%p/%p (%d), %s/%s (%s)\n",
+ DEBUG(SSSDBG_TRACE_INTERNAL, "%p/%p (%d), %s/%s (%s)\n",
watch, dbus_watch, fd,
((flags & DBUS_WATCH_READABLE)?"R":"-"),
((flags & DBUS_WATCH_WRITABLE)?"W":"-"),
@@ -206,7 +206,8 @@ void sbus_toggle_watch(DBusWatch *dbus_watch, void *data)
watch_data = dbus_watch_get_data(dbus_watch);
watch = talloc_get_type(watch_data, struct sbus_watch_ctx);
if (!watch) {
- DEBUG(2, "[%p] does not carry watch context?!\n", dbus_watch);
+ DEBUG(SSSDBG_OP_FAILURE,
+ "[%p] does not carry watch context?!\n", dbus_watch);
/* abort ? */
return;
}
@@ -255,10 +256,10 @@ void sbus_remove_watch(DBusWatch *dbus_watch, void *data)
watch_data = dbus_watch_get_data(dbus_watch);
watch = talloc_get_type(watch_data, struct sbus_watch_ctx);
- DEBUG(8, "%p/%p\n", watch, dbus_watch);
+ DEBUG(SSSDBG_TRACE_INTERNAL, "%p/%p\n", watch, dbus_watch);
if (!watch) {
- DEBUG(2, "DBUS trying to remove unknown watch!\n");
+ DEBUG(SSSDBG_OP_FAILURE, "DBUS trying to remove unknown watch!\n");
return;
}
@@ -314,7 +315,7 @@ dbus_bool_t sbus_add_timeout(DBusTimeout *dbus_timeout, void *data)
struct sbus_timeout_ctx *timeout;
struct timeval tv;
- DEBUG(8, "%p\n", dbus_timeout);
+ DEBUG(SSSDBG_TRACE_INTERNAL, "%p\n", dbus_timeout);
if (!dbus_timeout_get_enabled(dbus_timeout)) {
return TRUE;
@@ -324,7 +325,7 @@ dbus_bool_t sbus_add_timeout(DBusTimeout *dbus_timeout, void *data)
timeout = talloc_zero(conn, struct sbus_timeout_ctx);
if (!timeout) {
- DEBUG(0, "Out of Memory!\n");
+ DEBUG(SSSDBG_FATAL_FAILURE, "Out of Memory!\n");
return FALSE;
}
timeout->dbus_timeout = dbus_timeout;
@@ -333,7 +334,7 @@ dbus_bool_t sbus_add_timeout(DBusTimeout *dbus_timeout, void *data)
timeout->te = tevent_add_timer(conn->ev, timeout, tv,
sbus_timeout_handler, timeout);
if (!timeout->te) {
- DEBUG(0, "Failed to set up timeout event!\n");
+ DEBUG(SSSDBG_FATAL_FAILURE, "Failed to set up timeout event!\n");
return FALSE;
}
@@ -350,7 +351,7 @@ dbus_bool_t sbus_add_timeout(DBusTimeout *dbus_timeout, void *data)
*/
void sbus_toggle_timeout(DBusTimeout *dbus_timeout, void *data)
{
- DEBUG(8, "%p\n", dbus_timeout);
+ DEBUG(SSSDBG_TRACE_INTERNAL, "%p\n", dbus_timeout);
if (dbus_timeout_get_enabled(dbus_timeout)) {
sbus_add_timeout(dbus_timeout, data);
@@ -367,7 +368,7 @@ void sbus_remove_timeout(DBusTimeout *dbus_timeout, void *data)
{
void *timeout;
- DEBUG(8, "%p\n", dbus_timeout);
+ DEBUG(SSSDBG_TRACE_INTERNAL, "%p\n", dbus_timeout);
timeout = dbus_timeout_get_data(dbus_timeout);
diff --git a/src/sbus/sssd_dbus_connection.c b/src/sbus/sssd_dbus_connection.c
index d1b83214a..eb07b8d5b 100644
--- a/src/sbus/sssd_dbus_connection.c
+++ b/src/sbus/sssd_dbus_connection.c
@@ -58,12 +58,12 @@ static void sbus_dispatch(struct tevent_context *ev,
DEBUG(SSSDBG_TRACE_ALL, "dbus conn: %p\n", dbus_conn);
if (conn->retries > 0) {
- DEBUG(6, "SBUS is reconnecting. Deferring.\n");
+ DEBUG(SSSDBG_TRACE_FUNC, "SBUS is reconnecting. Deferring.\n");
/* Currently trying to reconnect, defer dispatch for 30ms */
tv = tevent_timeval_current_ofs(0, 30);
new_event = tevent_add_timer(ev, conn, tv, sbus_dispatch, conn);
if (new_event == NULL) {
- DEBUG(0,"Could not defer dispatch!\n");
+ DEBUG(SSSDBG_FATAL_FAILURE,"Could not defer dispatch!\n");
}
return;
}
@@ -73,11 +73,11 @@ static void sbus_dispatch(struct tevent_context *ev,
/* Attempt to reconnect automatically */
ret = sbus_auto_reconnect(conn);
if (ret == EOK) {
- DEBUG(1, "Performing auto-reconnect\n");
+ DEBUG(SSSDBG_CRIT_FAILURE, "Performing auto-reconnect\n");
return;
}
- DEBUG(0, "Cannot start auto-reconnection.\n");
+ DEBUG(SSSDBG_FATAL_FAILURE, "Cannot start auto-reconnection.\n");
conn->reconnect_callback(conn,
SBUS_RECONNECT_ERROR,
conn->reconnect_pvt);
@@ -86,7 +86,7 @@ static void sbus_dispatch(struct tevent_context *ev,
if ((conn->disconnect) ||
(!dbus_connection_get_is_connected(dbus_conn))) {
- DEBUG(3,"Connection is not open for dispatching.\n");
+ DEBUG(SSSDBG_MINOR_FAILURE,"Connection is not open for dispatching.\n");
/*
* Free the connection object.
* This will invoke the destructor for the connection
@@ -101,7 +101,7 @@ static void sbus_dispatch(struct tevent_context *ev,
*/
ret = dbus_connection_get_dispatch_status(dbus_conn);
if (ret != DBUS_DISPATCH_COMPLETE) {
- DEBUG(9,"Dispatching.\n");
+ DEBUG(SSSDBG_TRACE_ALL,"Dispatching.\n");
dbus_connection_dispatch(dbus_conn);
}
@@ -112,7 +112,7 @@ static void sbus_dispatch(struct tevent_context *ev,
if (ret != DBUS_DISPATCH_COMPLETE) {
new_event = tevent_add_timer(ev, conn, tv, sbus_dispatch, conn);
if (new_event == NULL) {
- DEBUG(2,"Could not add dispatch event!\n");
+ DEBUG(SSSDBG_OP_FAILURE,"Could not add dispatch event!\n");
/* TODO: Calling exit here is bad */
exit(1);
@@ -140,7 +140,7 @@ static void sbus_conn_wakeup_main(void *data)
/* D-BUS calls this function when it is time to do a dispatch */
te = tevent_add_timer(conn->ev, conn, tv, sbus_dispatch, conn);
if (te == NULL) {
- DEBUG(2,"Could not add dispatch event!\n");
+ DEBUG(SSSDBG_OP_FAILURE,"Could not add dispatch event!\n");
/* TODO: Calling exit here is bad */
exit(1);
}
@@ -205,7 +205,8 @@ static int sbus_conn_set_fns(struct sbus_connection *conn)
sbus_toggle_watch,
conn, NULL);
if (!dbret) {
- DEBUG(2,"Error setting up D-BUS connection watch functions\n");
+ DEBUG(SSSDBG_OP_FAILURE,
+ "Error setting up D-BUS connection watch functions\n");
return EIO;
}
@@ -216,7 +217,8 @@ static int sbus_conn_set_fns(struct sbus_connection *conn)
sbus_toggle_timeout,
conn, NULL);
if (!dbret) {
- DEBUG(2,"Error setting up D-BUS server timeout functions\n");
+ DEBUG(SSSDBG_OP_FAILURE,
+ "Error setting up D-BUS server timeout functions\n");
/* FIXME: free resources ? */
return EIO;
}
@@ -252,7 +254,8 @@ int sbus_new_connection(TALLOC_CTX *ctx, struct tevent_context *ev,
/* Open a shared D-BUS connection to the address */
dbus_conn = dbus_connection_open(address, &dbus_error);
if (!dbus_conn) {
- DEBUG(1, "Failed to open connection: name=%s, message=%s\n",
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ "Failed to open connection: name=%s, message=%s\n",
dbus_error.name, dbus_error.message);
if (dbus_error_is_set(&dbus_error)) dbus_error_free(&dbus_error);
return EIO;
@@ -308,7 +311,8 @@ int sbus_default_connection_destructor(void *ctx)
}
else {
/* Critical Error! */
- DEBUG(1,"Critical Error, connection_type is neither shared nor private!\n");
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ "Critical Error, connection_type is neither shared nor private!\n");
return -1;
}
@@ -411,7 +415,7 @@ DBusHandlerResult sbus_message_handler(DBusConnection *dbus_conn,
intf_p = talloc_get_type(user_data, struct sbus_interface_p);
method = dbus_message_get_member(message);
- DEBUG(9, "Received SBUS method [%s]\n", method);
+ DEBUG(SSSDBG_TRACE_ALL, "Received SBUS method [%s]\n", method);
path = dbus_message_get_path(message);
msg_interface = dbus_message_get_interface(message);
@@ -438,7 +442,8 @@ DBusHandlerResult sbus_message_handler(DBusConnection *dbus_conn,
if (!found) {
/* Reply DBUS_ERROR_UNKNOWN_METHOD */
- DEBUG(1, "No matching method found for %s.\n", method);
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ "No matching method found for %s.\n", method);
reply = dbus_message_new_error(message, DBUS_ERROR_UNKNOWN_METHOD, NULL);
sbus_conn_send_reply(intf_p->conn, reply);
dbus_message_unref(reply);
@@ -485,7 +490,8 @@ int sbus_conn_add_interface(struct sbus_connection *conn,
path = intf->path;
if (path_in_interface_list(conn->intf_list, path)) {
- DEBUG(0, "Cannot add method context with identical path.\n");
+ DEBUG(SSSDBG_FATAL_FAILURE,
+ "Cannot add method context with identical path.\n");
return EINVAL;
}
@@ -501,7 +507,8 @@ int sbus_conn_add_interface(struct sbus_connection *conn,
dbret = dbus_connection_register_object_path(conn->dbus.conn,
path, &intf->vtable, intf_p);
if (!dbret) {
- DEBUG(0, "Could not register object path to the connection.\n");
+ DEBUG(SSSDBG_FATAL_FAILURE,
+ "Could not register object path to the connection.\n");
return ENOMEM;
}
@@ -562,12 +569,12 @@ static void sbus_reconnect(struct tevent_context *ev,
conn = talloc_get_type(data, struct sbus_connection);
dbus_error_init(&dbus_error);
- DEBUG(3, "Making reconnection attempt %d to [%s]\n",
+ DEBUG(SSSDBG_MINOR_FAILURE, "Making reconnection attempt %d to [%s]\n",
conn->retries, conn->address);
conn->dbus.conn = dbus_connection_open(conn->address, &dbus_error);
if (conn->dbus.conn) {
/* We successfully reconnected. Set up mainloop integration. */
- DEBUG(3, "Reconnected to [%s]\n", conn->address);
+ DEBUG(SSSDBG_MINOR_FAILURE, "Reconnected to [%s]\n", conn->address);
ret = sbus_conn_set_fns(conn);
if (ret != EOK) {
dbus_connection_unref(conn->dbus.conn);
@@ -582,7 +589,8 @@ static void sbus_reconnect(struct tevent_context *ev,
&iter->intf->vtable,
iter);
if (!dbret) {
- DEBUG(0, "Could not register object path.\n");
+ DEBUG(SSSDBG_FATAL_FAILURE,
+ "Could not register object path.\n");
dbus_connection_unref(conn->dbus.conn);
goto failed;
}
@@ -603,7 +611,8 @@ static void sbus_reconnect(struct tevent_context *ev,
failed:
/* Reconnection failed, try again in a few seconds */
- DEBUG(1, "Failed to open connection: name=%s, message=%s\n",
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ "Failed to open connection: name=%s, message=%s\n",
dbus_error.name, dbus_error.message);
if (dbus_error_is_set(&dbus_error)) dbus_error_free(&dbus_error);
@@ -721,7 +730,7 @@ int sbus_conn_send(struct sbus_connection *conn,
* Critical Failure
* Insufficient memory to send message
*/
- DEBUG(0, "D-BUS send failed.\n");
+ DEBUG(SSSDBG_FATAL_FAILURE, "D-BUS send failed.\n");
return ENOMEM;
}
@@ -734,7 +743,7 @@ int sbus_conn_send(struct sbus_connection *conn,
* Critical Failure
* Insufficient memory to create pending call notify
*/
- DEBUG(0, "D-BUS send failed.\n");
+ DEBUG(SSSDBG_FATAL_FAILURE, "D-BUS send failed.\n");
dbus_pending_call_cancel(pending_reply);
dbus_pending_call_unref(pending_reply);
return ENOMEM;
diff --git a/src/sbus/sssd_dbus_server.c b/src/sbus/sssd_dbus_server.c
index a7efd1f3c..8281158f1 100644
--- a/src/sbus/sssd_dbus_server.c
+++ b/src/sbus/sssd_dbus_server.c
@@ -45,25 +45,25 @@ static void sbus_server_init_new_connection(DBusServer *dbus_server,
struct sbus_connection *conn;
int ret;
- DEBUG(5,"Entering.\n");
+ DEBUG(SSSDBG_FUNC_DATA,"Entering.\n");
server = talloc_get_type(data, struct sbus_connection);
if (!server) {
return;
}
- DEBUG(5,"Adding connection %p.\n", dbus_conn);
+ DEBUG(SSSDBG_FUNC_DATA,"Adding connection %p.\n", dbus_conn);
ret = sbus_init_connection(server, server->ev,
dbus_conn, server->server_intf,
SBUS_CONN_TYPE_PRIVATE, &conn);
if (ret != 0) {
dbus_connection_close(dbus_conn);
- DEBUG(5,"Closing connection (failed setup)");
+ DEBUG(SSSDBG_FUNC_DATA,"Closing connection (failed setup)");
return;
}
dbus_connection_ref(dbus_conn);
- DEBUG(5,"Got a connection\n");
+ DEBUG(SSSDBG_FUNC_DATA,"Got a connection\n");
/*
* Initialize connection-specific features
@@ -75,7 +75,7 @@ static void sbus_server_init_new_connection(DBusServer *dbus_server,
*/
ret = server->srv_init_fn(conn, server->srv_init_data);
if (ret != EOK) {
- DEBUG(1,"Initialization failed!\n");
+ DEBUG(SSSDBG_CRIT_FAILURE,"Initialization failed!\n");
dbus_connection_close(dbus_conn);
talloc_zfree(conn);
}
@@ -97,7 +97,7 @@ create_socket_symlink(const char *filename, const char *symlink_filename)
{
errno_t ret;
- DEBUG(7, "Symlinking the dbus path %s to a link %s\n",
+ DEBUG(SSSDBG_TRACE_LIBS, "Symlinking the dbus path %s to a link %s\n",
filename, symlink_filename);
errno = 0;
ret = symlink(filename, symlink_filename);
@@ -107,7 +107,7 @@ create_socket_symlink(const char *filename, const char *symlink_filename)
ret = unlink(symlink_filename);
if (ret != 0) {
ret = errno;
- DEBUG(1, "Cannot remove old symlink: [%d][%s].\n",
+ DEBUG(SSSDBG_CRIT_FAILURE, "Cannot remove old symlink: [%d][%s].\n",
ret, strerror(ret));
return EIO;
}
@@ -117,7 +117,7 @@ create_socket_symlink(const char *filename, const char *symlink_filename)
if (ret != 0) {
ret = errno;
- DEBUG(1, "symlink() failed on file '%s': [%d][%s].\n",
+ DEBUG(SSSDBG_CRIT_FAILURE, "symlink() failed on file '%s': [%d][%s].\n",
filename, ret, strerror(ret));
return EIO;
}
@@ -137,27 +137,29 @@ remove_socket_symlink(const char *symlink_name)
numread = readlink(symlink_name, target, PATH_MAX-1);
if (numread < 0) {
ret = errno;
- DEBUG(2, "readlink failed [%d]: %s\n", ret, strerror(ret));
+ DEBUG(SSSDBG_OP_FAILURE,
+ "readlink failed [%d]: %s\n", ret, strerror(ret));
return ret;
}
target[numread] = '\0';
- DEBUG(9, "The symlink points to [%s]\n", target);
+ DEBUG(SSSDBG_TRACE_ALL, "The symlink points to [%s]\n", target);
/* We can only remove the symlink if it points to a socket with
* the same PID */
ret = snprintf(pidpath, PATH_MAX, "%s.%lu",
symlink_name, (unsigned long) getpid());
if (ret < 0) {
- DEBUG(2, "snprintf failed");
+ DEBUG(SSSDBG_OP_FAILURE, "snprintf failed");
return EIO;
} else if (ret >= PATH_MAX) {
- DEBUG(2, "path too long?!?!\n");
+ DEBUG(SSSDBG_OP_FAILURE, "path too long?!?!\n");
return EIO;
}
- DEBUG(9, "The path including our pid is [%s]\n", pidpath);
+ DEBUG(SSSDBG_TRACE_ALL, "The path including our pid is [%s]\n", pidpath);
if (strcmp(pidpath, target) != 0) {
- DEBUG(4, "Will not remove symlink, seems to be owned by "
+ DEBUG(SSSDBG_CONF_SETTINGS,
+ "Will not remove symlink, seems to be owned by "
"another process\n");
return EOK;
}
@@ -171,7 +173,7 @@ remove_socket_symlink(const char *symlink_name)
return ret;
}
- DEBUG(9, "Removed the symlink\n");
+ DEBUG(SSSDBG_TRACE_ALL, "Removed the symlink\n");
return EOK;
}
@@ -216,7 +218,8 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
dbus_error_init(&dbus_error);
dbus_server = dbus_server_listen(socket_address, &dbus_error);
if (!dbus_server) {
- DEBUG(1,"dbus_server_listen failed! (name=%s, message=%s)\n",
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ "dbus_server_listen failed! (name=%s, message=%s)\n",
dbus_error.name, dbus_error.message);
if (dbus_error_is_set(&dbus_error)) dbus_error_free(&dbus_error);
ret = EIO;
@@ -225,7 +228,8 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
filename = strchr(socket_address, '/');
if (filename == NULL) {
- DEBUG(1, "Unexpected dbus address [%s].\n", socket_address);
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ "Unexpected dbus address [%s].\n", socket_address);
ret = EIO;
goto done;
}
@@ -233,14 +237,15 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
if (use_symlink) {
symlink_filename = strchr(address, '/');
if (symlink_filename == NULL) {
- DEBUG(1, "Unexpected dbus address [%s].\n", address);
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ "Unexpected dbus address [%s].\n", address);
ret = EIO;
goto done;
}
ret = create_socket_symlink(filename, symlink_filename);
if (ret != EOK) {
- DEBUG(1, "Could not create symlink [%d]: %s\n",
+ DEBUG(SSSDBG_CRIT_FAILURE, "Could not create symlink [%d]: %s\n",
ret, strerror(ret));
ret = EIO;
goto done;
@@ -251,7 +256,7 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
* the socket */
ret = check_file(filename, 0, 0, -1, CHECK_SOCK, &stat_buf, true);
if (ret != EOK) {
- DEBUG(1, "check_file failed for [%s].\n", filename);
+ DEBUG(SSSDBG_CRIT_FAILURE, "check_file failed for [%s].\n", filename);
ret = EIO;
goto done;
}
@@ -259,7 +264,8 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
if ((stat_buf.st_mode & ~S_IFMT) != 0600) {
ret = chmod(filename, 0600);
if (ret != EOK) {
- DEBUG(1, "chmod failed for [%s]: [%d][%s].\n", filename, errno,
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ "chmod failed for [%s]: [%d][%s].\n", filename, errno,
strerror(errno));
ret = EIO;
goto done;
@@ -305,7 +311,8 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
sbus_toggle_watch,
server, NULL);
if (!dbret) {
- DEBUG(4, "Error setting up D-BUS server watch functions\n");
+ DEBUG(SSSDBG_CONF_SETTINGS,
+ "Error setting up D-BUS server watch functions\n");
ret = EIO;
goto done;
}
@@ -317,7 +324,8 @@ int sbus_new_server(TALLOC_CTX *mem_ctx,
sbus_toggle_timeout,
server, NULL);
if (!dbret) {
- DEBUG(4,"Error setting up D-BUS server timeout functions\n");
+ DEBUG(SSSDBG_CONF_SETTINGS,
+ "Error setting up D-BUS server timeout functions\n");
dbus_server_set_watch_functions(server->dbus.server,
NULL, NULL, NULL, NULL, NULL);
ret = EIO;
@@ -345,7 +353,8 @@ static int sbus_server_destructor(void *ctx)
if (server->symlink) {
ret = remove_socket_symlink(server->symlink);
if (ret != EOK) {
- DEBUG(3, "Could not remove the server symlink\n");
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "Could not remove the server symlink\n");
}
}