]> granicus.if.org Git - sudo/commitdiff
Use warningx() instead of log_error() since the latter is not available
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 25 Jun 2010 14:06:08 +0000 (10:06 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 25 Jun 2010 14:06:08 +0000 (10:06 -0400)
to visudo or testsudoers.  This does mean that they don't end up in syslog.

plugins/sudoers/vasgroups.c

index aac7baa2bbf66cdc5f248934495621e27d4f182d..ed614de0db15c94b3c8ed357645240c6d6396b7b 100644 (file)
@@ -109,7 +109,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;
@@ -152,9 +152,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 */
@@ -279,7 +277,7 @@ sudo_nonunix_groupcheck_cleanup(void)
 
     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;
     }
 }