]> granicus.if.org Git - sudo/commitdiff
Do not write directly to stdout/stderr, use sudo_printf which calls
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 15 May 2016 01:34:13 +0000 (19:34 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 15 May 2016 01:34:13 +0000 (19:34 -0600)
the conversation function.

plugins/sudoers/ldap.c
plugins/sudoers/sssd.c

index bcc0ebd803ad72a20d00e5617a76567f11d93f1e..17cb8eaa7e000cbfd55a7c4ac0b9658cfa482c5c 100644 (file)
@@ -2534,7 +2534,8 @@ sudo_ldap_display_cmnd(struct sudo_nss *nss, struct passwd *pw)
 
 done:
     if (found)
-       printf("%s%s%s\n", safe_cmnd ? safe_cmnd : user_cmnd,
+       sudo_printf(SUDO_CONV_INFO_MSG, "%s%s%s\n",
+           safe_cmnd ? safe_cmnd : user_cmnd,
            user_args ? " " : "", user_args ? user_args : "");
    debug_return_int(!found);
 }
index c9525e4d9b504942c4beba01aa95af8e2e9e5d0c..c3e4894b7e3f4eb0fbed1e844cce87071f57b97d 100644 (file)
@@ -1260,7 +1260,8 @@ sudo_sss_display_cmnd(struct sudo_nss *nss, struct passwd *pw)
 
 done:
     if (found)
-       printf("%s%s%s\n", safe_cmnd ? safe_cmnd : user_cmnd,
+       sudo_printf(SUDO_CONV_INFO_MSG, "%s%s%s\n",
+           safe_cmnd ? safe_cmnd : user_cmnd,
            user_args ? " " : "", user_args ? user_args : "");
 
     handle->fn_free_result(sss_result);