From 22ae70e2098b8c819075f9d988613d70c7fc8ac9 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Tue, 1 Oct 2013 10:13:19 -0400 Subject: Up the log severity on portmap errors Log errors encountered while talking to portmap/rpcbind at level SLAPI_LOG_FATAL rather than at the previous SLAPI_LOG_PLUGIN, so that they show up even when we're not actively debugging. --- src/portmap.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/portmap.c b/src/portmap.c index 2aa4058..1b0a30d 100644 --- a/src/portmap.c +++ b/src/portmap.c @@ -198,7 +198,7 @@ portmap_register_work(const char *module, int client_sock, } else { /* Point the datagram socket at the remote. */ if (connect(client_sock, dgram_address, addrlen) != 0) { - slapi_log_error(SLAPI_LOG_PLUGIN, log_id, + slapi_log_error(SLAPI_LOG_FATAL, log_id, "error targeting portmap: %s\n", strerror(errno)); return FALSE; @@ -212,7 +212,7 @@ portmap_register_work(const char *module, int client_sock, * immediately retry. */ if (send(client_sock, &portmap_buf, portmap_length, 0) != portmap_length) { - slapi_log_error(SLAPI_LOG_PLUGIN, log_id, + slapi_log_error(SLAPI_LOG_FATAL, log_id, "error sending request to portmap or " "rpcbind on %d: %s\n", client_sock, strerror(errno)); @@ -283,7 +283,7 @@ portmap_register_work(const char *module, int client_sock, connect(client_sock, &addr, sizeof(addr)); /* Check for a timeout. */ if (i == 32) { - slapi_log_error(SLAPI_LOG_PLUGIN, log_id, + slapi_log_error(SLAPI_LOG_FATAL, log_id, "timeout registering with portmap " "service\n"); return FALSE; @@ -293,7 +293,7 @@ portmap_register_work(const char *module, int client_sock, /* Check that the portmapper didn't just reject the request out of * hand. */ if (msg.rm_reply.rp_stat != MSG_ACCEPTED) { - slapi_log_error(SLAPI_LOG_PLUGIN, log_id, + slapi_log_error(SLAPI_LOG_FATAL, log_id, "portmap request not accepted\n"); switch (msg.rm_reply.rp_rjct.rj_stat) { const char *auth_status; @@ -325,13 +325,13 @@ portmap_register_work(const char *module, int client_sock, auth_status = "unknown error"; break; } - slapi_log_error(SLAPI_LOG_PLUGIN, log_id, + slapi_log_error(SLAPI_LOG_FATAL, log_id, "portmap request rejected: " "authentication failed: %s\n", auth_status); break; case RPC_MISMATCH: - slapi_log_error(SLAPI_LOG_PLUGIN, log_id, + slapi_log_error(SLAPI_LOG_FATAL, log_id, "portmap request rejected: " "RPC mismatch\n"); break; @@ -346,14 +346,14 @@ portmap_register_work(const char *module, int client_sock, slapi_log_error(SLAPI_LOG_PLUGIN, log_id, "portmap reply authenticated\n"); } else { - slapi_log_error(SLAPI_LOG_PLUGIN, log_id, + slapi_log_error(SLAPI_LOG_FATAL, log_id, "portmap reply failed authentication\n"); } auth_destroy(auth); /* Check if we the portmapper gave us a reply argument. */ if (msg.rm_reply.rp_acpt.ar_stat != SUCCESS) { - slapi_log_error(SLAPI_LOG_PLUGIN, log_id, + slapi_log_error(SLAPI_LOG_FATAL, log_id, "portmap request not processed\n"); xdr_destroy(&portmap_xdrs); return FALSE; @@ -364,7 +364,7 @@ portmap_register_work(const char *module, int client_sock, slapi_log_error(SLAPI_LOG_PLUGIN, log_id, "portmap request succeeded\n"); } else { - slapi_log_error(SLAPI_LOG_PLUGIN, log_id, + slapi_log_error(SLAPI_LOG_FATAL, log_id, "portmap request failed\n"); } -- cgit