From: Todd C. Miller Date: Fri, 25 Jun 2010 13:58:59 +0000 (-0400) Subject: Use warningx() instead of log_error() since the latter is not available X-Git-Tag: SUDO_1_7_3~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d209adf31e0630319d805c607a3fee876a2bda39;p=sudo Use warningx() instead of log_error() since the latter is not available to visudo or testsudoers. This does mean that they don't end up in syslog. --HG-- branch : 1.7 --- diff --git a/vasgroups.c b/vasgroups.c index 906a66904..a7c6c34fb 100644 --- a/vasgroups.c +++ b/vasgroups.c @@ -111,7 +111,7 @@ sudo_nonunix_groupcheck( const char* group, const char* user, const struct passw if (!sudo_vas_available) { if (error_cause_shown == FALSE) { /* Produce the saved error reason */ - log_error(NO_MAIL|NO_EXIT, "Non-unix group checking unavailable: %s", + warningx("Non-unix group checking unavailable: %s", err_msg ? err_msg : "(unknown cause)"); error_cause_shown = TRUE; @@ -154,9 +154,7 @@ sudo_nonunix_groupcheck( const char* group, const char* user, const struct passw FINISHED: /* cleanups */ if (vaserr != VAS_ERR_SUCCESS && vaserr != VAS_ERR_NOT_FOUND ) { - int error_flags = NO_MAIL | MSG_ONLY | NO_EXIT; - - log_error(error_flags, "Error while checking group membership " + warningx("Error while checking group membership " "for user \"%s\", group \"%s\", error: %s%s.", user, group, v_err_get_string(sudo_vas_ctx, 1), /* A helpful hint if there seems to be a non-FQDN as the domain */ @@ -281,7 +279,7 @@ sudo_nonunix_groupcheck_cleanup() if (libvas_handle) { if (dlclose(libvas_handle) != 0) - log_error(NO_MAIL|NO_EXIT, "dlclose() failed: %s", dlerror()); + warningx("dlclose() failed: %s", dlerror()); libvas_handle = NULL; } }