diff options
Diffstat (limited to 'server/responder/common')
-rw-r--r-- | server/responder/common/responder_common.c | 52 | ||||
-rw-r--r-- | server/responder/common/responder_dp.c | 24 |
2 files changed, 38 insertions, 38 deletions
diff --git a/server/responder/common/responder_common.c b/server/responder/common/responder_common.c index 119a1dd4..57c8678b 100644 --- a/server/responder/common/responder_common.c +++ b/server/responder/common/responder_common.c @@ -72,7 +72,7 @@ static void client_send(struct tevent_context *ev, struct cli_ctx *cctx) return; } if (ret != EOK) { - SYSLOG_ERROR("Failed to read request, aborting client!\n"); + DEBUG(0, ("Failed to read request, aborting client!\n")); talloc_free(cctx); return; } @@ -92,7 +92,7 @@ static void client_recv(struct tevent_context *ev, struct cli_ctx *cctx) if (!cctx->creq) { cctx->creq = talloc_zero(cctx, struct cli_request); if (!cctx->creq) { - SYSLOG_ERROR("Failed to alloc request, aborting client!\n"); + DEBUG(0, ("Failed to alloc request, aborting client!\n")); talloc_free(cctx); return; } @@ -102,7 +102,7 @@ static void client_recv(struct tevent_context *ev, struct cli_ctx *cctx) ret = sss_packet_new(cctx->creq, SSS_PACKET_MAX_RECV_SIZE, 0, &cctx->creq->in); if (ret != EOK) { - SYSLOG_ERROR("Failed to alloc request, aborting client!\n"); + DEBUG(0, ("Failed to alloc request, aborting client!\n")); talloc_free(cctx); return; } @@ -116,7 +116,7 @@ static void client_recv(struct tevent_context *ev, struct cli_ctx *cctx) /* execute command */ ret = sss_cmd_execute(cctx, cctx->rctx->sss_cmds); if (ret != EOK) { - SYSLOG_ERROR("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 @@ -193,7 +193,7 @@ static void accept_priv_fd_handler(struct tevent_context *ev, if (!cctx) { struct sockaddr_un addr; int fd; - SYSLOG_ERROR("Out of memory trying to setup client context on privileged pipe!\n"); + DEBUG(0, ("Out of memory trying to setup client context on privileged pipe!\n")); /* accept and close to signal the client we have a problem */ memset(&addr, 0, sizeof(addr)); len = sizeof(addr); @@ -246,7 +246,7 @@ static void accept_fd_handler(struct tevent_context *ev, if (!cctx) { struct sockaddr_un addr; int fd; - SYSLOG_ERROR("Out of memory trying to setup client context!\n"); + DEBUG(0, ("Out of memory trying to setup client context!\n")); /* accept and close to signal the client we have a problem */ memset(&addr, 0, sizeof(addr)); len = sizeof(addr); @@ -295,7 +295,7 @@ static int sss_monitor_init(struct resp_ctx *rctx, /* Set up SBUS connection to the monitor */ ret = monitor_get_sbus_address(rctx, rctx->cdb, &sbus_address); if (ret != EOK) { - SYSLOG_ERROR("Could not locate monitor address.\n"); + DEBUG(0, ("Could not locate monitor address.\n")); return ret; } @@ -303,14 +303,14 @@ static int sss_monitor_init(struct resp_ctx *rctx, intf, &rctx->mon_conn, NULL, NULL); if (ret != EOK) { - SYSLOG_ERROR("Failed to connect to monitor services.\n"); + DEBUG(0, ("Failed to connect to monitor services.\n")); return ret; } /* Identify ourselves to the monitor */ ret = monitor_common_send_id(rctx->mon_conn, svc_name, svc_version); if (ret != EOK) { - SYSLOG_ERROR("Failed to identify to the monitor!\n"); + DEBUG(0, ("Failed to identify to the monitor!\n")); return ret; } @@ -328,7 +328,7 @@ static int sss_dp_init(struct resp_ctx *rctx, /* Set up SBUS connection to the monitor */ ret = dp_get_sbus_address(rctx, rctx->cdb, &sbus_address); if (ret != EOK) { - SYSLOG_ERROR("Could not locate DP address.\n"); + DEBUG(0, ("Could not locate DP address.\n")); return ret; } @@ -336,7 +336,7 @@ static int sss_dp_init(struct resp_ctx *rctx, intf, &rctx->dp_conn, NULL, NULL); if (ret != EOK) { - SYSLOG_ERROR("Failed to connect to monitor services.\n"); + DEBUG(0, ("Failed to connect to monitor services.\n")); return ret; } @@ -345,7 +345,7 @@ static int sss_dp_init(struct resp_ctx *rctx, cli_type, cli_version, cli_name, cli_domain); if (ret != EOK) { - SYSLOG_ERROR("Failed to identify to the DP!\n"); + DEBUG(0, ("Failed to identify to the DP!\n")); return ret; } @@ -414,18 +414,18 @@ static int set_unix_socket(struct resp_ctx *rctx) unlink(rctx->sock_name); if (bind(rctx->lfd, (struct sockaddr *)&addr, sizeof(addr)) == -1) { - SYSLOG_ERROR("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) { - SYSLOG_ERROR("Unable to listen on socket '%s'\n", rctx->sock_name); + DEBUG(0,("Unable to listen on socket '%s'\n", rctx->sock_name)); goto failed; } rctx->lfde = tevent_add_fd(rctx->ev, rctx, rctx->lfd, TEVENT_FD_READ, accept_fd_handler, rctx); if (!rctx->lfde) { - SYSLOG_ERROR("Failed to queue handler on pipe\n"); + DEBUG(0, ("Failed to queue handler on pipe\n")); goto failed; } } @@ -450,18 +450,18 @@ 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) { - SYSLOG_ERROR("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) { - SYSLOG_ERROR("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; } rctx->priv_lfde = tevent_add_fd(rctx->ev, rctx, rctx->priv_lfd, TEVENT_FD_READ, accept_priv_fd_handler, rctx); if (!rctx->priv_lfde) { - SYSLOG_ERROR("Failed to queue handler on privileged pipe\n"); + DEBUG(0, ("Failed to queue handler on privileged pipe\n")); goto failed; } } @@ -500,7 +500,7 @@ int sss_process_init(TALLOC_CTX *mem_ctx, rctx = talloc_zero(mem_ctx, struct resp_ctx); if (!rctx) { - SYSLOG_ERROR("fatal error initializing resp_ctx\n"); + DEBUG(0, ("fatal error initializing resp_ctx\n")); return ENOMEM; } rctx->ev = ev; @@ -512,13 +512,13 @@ int sss_process_init(TALLOC_CTX *mem_ctx, ret = confdb_get_domains(rctx->cdb, &rctx->domains); if (ret != EOK) { - SYSLOG_ERROR("fatal error setting up domain map\n"); + DEBUG(0, ("fatal error setting up domain map\n")); return ret; } ret = sss_monitor_init(rctx, monitor_intf, svc_name, svc_version); if (ret != EOK) { - SYSLOG_ERROR("fatal error setting up message bus\n"); + DEBUG(0, ("fatal error setting up message bus\n")); return ret; } @@ -526,30 +526,30 @@ int sss_process_init(TALLOC_CTX *mem_ctx, cli_type, cli_version, cli_name, cli_domain); if (ret != EOK) { - SYSLOG_ERROR("fatal error setting up backend connector\n"); + DEBUG(0, ("fatal error setting up backend connector\n")); return ret; } else if (!rctx->dp_conn) { - SYSLOG_ERROR("Data Provider is not yet available. Retrying.\n"); + DEBUG(0, ("Data Provider is not yet available. Retrying.\n")); return EIO; } ret = sysdb_init(rctx, ev, cdb, NULL, false, &rctx->db_list); if (ret != EOK) { - SYSLOG_ERROR("fatal error initializing resp_ctx\n"); + DEBUG(0, ("fatal error initializing resp_ctx\n")); return ret; } ret = sss_names_init(rctx, rctx->cdb, &rctx->names); if (ret != EOK) { - SYSLOG_ERROR("fatal error initializing regex data\n"); + DEBUG(0, ("fatal error initializing regex data\n")); return ret; } /* after all initializations we are ready to listen on our socket */ ret = set_unix_socket(rctx); if (ret != EOK) { - SYSLOG_ERROR("fatal error initializing socket\n"); + DEBUG(0, ("fatal error initializing socket\n")); return ret; } diff --git a/server/responder/common/responder_dp.c b/server/responder/common/responder_dp.c index a51fc5e4..a6365186 100644 --- a/server/responder/common/responder_dp.c +++ b/server/responder/common/responder_dp.c @@ -70,7 +70,7 @@ static int sss_dp_req_destructor(void *ptr) key.str = sdp_req->key; int hret = hash_delete(dp_requests, &key); if (hret != HASH_SUCCESS) { - SYSLOG_ERROR("Could not clear entry from request queue\n"); + DEBUG(0, ("Could not clear entry from request queue\n")); /* This should never happen */ return EIO; } @@ -269,7 +269,7 @@ int sss_dp_send_acct_req(struct resp_ctx *rctx, TALLOC_CTX *memctx, /* We have a new request asking for a callback */ sdp_req = talloc_get_type(value.ptr, struct sss_dp_req); if (!sdp_req) { - SYSLOG_ERROR("Could not retrieve DP request context\n"); + DEBUG(0, ("Could not retrieve DP request context\n")); ret = EIO; goto done; } @@ -303,8 +303,8 @@ int sss_dp_send_acct_req(struct resp_ctx *rctx, TALLOC_CTX *memctx, value.ptr = sdp_req; hret = hash_enter(dp_requests, &key, &value); if (hret != HASH_SUCCESS) { - SYSLOG_ERROR("Could not store request query (%s)", - hash_error_string(hret)); + DEBUG(0, ("Could not store request query (%s)", + hash_error_string(hret))); ret = EIO; goto done; } @@ -315,8 +315,8 @@ int sss_dp_send_acct_req(struct resp_ctx *rctx, TALLOC_CTX *memctx, break; default: - SYSLOG_ERROR("Could not query request list (%s)\n", - hash_error_string(hret)); + DEBUG(0,("Could not query request list (%s)\n", + hash_error_string(hret))); ret = EIO; goto done; } @@ -364,7 +364,7 @@ static int sss_dp_send_acct_req_create(struct resp_ctx *rctx, DP_CLI_INTERFACE, DP_SRV_METHOD_GETACCTINFO); if (msg == NULL) { - SYSLOG_ERROR("Out of memory?!\n"); + DEBUG(0,("Out of memory?!\n")); return ENOMEM; } @@ -390,7 +390,7 @@ static int sss_dp_send_acct_req_create(struct resp_ctx *rctx, * We can't communicate on this connection * We'll drop it using the default destructor. */ - SYSLOG_ERROR("D-BUS send failed.\n"); + DEBUG(0, ("D-BUS send failed.\n")); dbus_message_unref(msg); return EIO; } @@ -423,7 +423,7 @@ static int sss_dp_send_acct_req_create(struct resp_ctx *rctx, sss_dp_send_acct_callback, sdp_req, NULL); if (!dbret) { - SYSLOG_ERROR("Could not queue up pending request!"); + DEBUG(0, ("Could not queue up pending request!")); talloc_zfree(sdp_req); dbus_pending_call_cancel(pending_reply); dbus_message_unref(msg); @@ -456,7 +456,7 @@ static int sss_dp_get_reply(DBusPendingCall *pending, * until reply is valid or timeout has occurred. If reply is NULL * here, something is seriously wrong and we should bail out. */ - SYSLOG_ERROR("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")); /* FIXME: Destroy this connection ? */ err = EIO; @@ -490,8 +490,8 @@ static int sss_dp_get_reply(DBusPendingCall *pending, err = ETIME; goto done; } - SYSLOG_ERROR("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: /* |