]> granicus.if.org Git - sudo/commitdiff
Allow stdin and ttyin to be displayed too. The only one that is
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 30 Nov 2016 20:38:01 +0000 (13:38 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 30 Nov 2016 20:38:01 +0000 (13:38 -0700)
really useful in sudoreplay is stdin when input is from a pipe.

doc/sudoreplay.cat
doc/sudoreplay.man.in
doc/sudoreplay.mdoc.in
plugins/sudoers/sudoreplay.c

index 43dbacf8412c4e237bc2a8d6178a9c68933ed4ec..61c9998e53ffc721255145868c0065a46ae13256 100644 (file)
@@ -44,8 +44,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                  Select which I/O type(s) to display.  By default, s\bsu\bud\bdo\bor\bre\bep\bpl\bla\bay\by
                  will display the command's standard output, standard error
                  and tty output.  The _\bf_\bi_\bl_\bt_\be_\br argument is a comma-separated
-                 list, consisting of one or more of following: _\bs_\bt_\bd_\bo_\bu_\bt, _\bs_\bt_\bd_\be_\br_\br,
-                 and _\bt_\bt_\by_\bo_\bu_\bt.
+                 list, consisting of one or more of following: _\bs_\bt_\bd_\bi_\bn, _\bs_\bt_\bd_\bo_\bu_\bt,
+                 _\bs_\bt_\bd_\be_\br_\br, _\bt_\bt_\by_\bi_\bn, and _\bt_\bt_\by_\bo_\bu_\bt.
 
      -\b-h\bh, -\b--\b-h\bhe\bel\blp\bp  Display a short help message to the standard output and exit.
 
@@ -276,4 +276,4 @@ D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
      file distributed with s\bsu\bud\bdo\bo or https://www.sudo.ws/license.html for
      complete details.
 
-Sudo 1.8.19                       May 4, 2016                      Sudo 1.8.19
+Sudo 1.8.19                    November 30, 2016                   Sudo 1.8.19
index 3044ef7c4163e42e513b19ba112bf7fbff6e96e3..cdd6b69db0369d7134d677c04ff83c3a7e321fa3 100644 (file)
@@ -16,7 +16,7 @@
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.TH "SUDOREPLAY" "8" "May 4, 2016" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
+.TH "SUDOREPLAY" "8" "November 30, 2016" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
 .nh
 .if n .ad l
 .SH "NAME"
@@ -110,8 +110,10 @@ will display the command's standard output, standard error and tty output.
 The
 \fIfilter\fR
 argument is a comma-separated list, consisting of one or more of following:
+\fIstdin\fR,
 \fIstdout\fR,
 \fIstderr\fR,
+\fIttyin\fR,
 and
 \fIttyout\fR.
 .TP 12n
index c49fb51f93a965022f181c3170934b1113632497..d9efa414b4a29e2b25b1099fcb96bee74b44ab49 100644 (file)
@@ -14,7 +14,7 @@
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 4, 2016
+.Dd November 30, 2016
 .Dt SUDOREPLAY @mansectsu@
 .Os Sudo @PACKAGE_VERSION@
 .Sh NAME
@@ -104,8 +104,10 @@ will display the command's standard output, standard error and tty output.
 The
 .Ar filter
 argument is a comma-separated list, consisting of one or more of following:
+.Em stdin ,
 .Em stdout ,
 .Em stderr ,
+.Em ttyin ,
 and
 .Em ttyout .
 .It Fl h , -help
index d82f0f91ebb01dbb35ed792c9a1ecf68841a13ee..84ae0aab6ac71534e16bbbb767f6273f69fa7bcd 100644 (file)
@@ -222,10 +222,14 @@ main(int argc, char *argv[])
            /* Set the replay filter. */
            def_filter = false;
            for (cp = strtok_r(optarg, ",", &ep); cp; cp = strtok_r(NULL, ",", &ep)) {
-               if (strcmp(cp, "stdout") == 0)
+               if (strcmp(cp, "stdin") == 0)
+                   io_log_files[IOFD_STDIN].enabled = true;
+               else if (strcmp(cp, "stdout") == 0)
                    io_log_files[IOFD_STDOUT].enabled = true;
                else if (strcmp(cp, "stderr") == 0)
                    io_log_files[IOFD_STDERR].enabled = true;
+               else if (strcmp(cp, "ttyin") == 0)
+                   io_log_files[IOFD_TTYIN].enabled = true;
                else if (strcmp(cp, "ttyout") == 0)
                    io_log_files[IOFD_TTYOUT].enabled = true;
                else