--- sudo-1.6.8p5.orig/sudo.c
+++ sudo-1.6.8p5/sudo.c
@@ -820,6 +820,9 @@
 	    case 'S':
 		SET(tgetpass_flags, TGP_STDIN);
 		break;
+	    case 'f':
+		SET(tgetpass_flags, TGP_FD3IN);
+		break;
 	    case '-':
 		NewArgc--;
 		NewArgv++;
@@ -1117,6 +1120,7 @@
 	" [-c class|-]",
 #endif
 	" [-p prompt]",
+	" [-f ]",
 	" [-u username|#uid]",
 	" { -e file [...] | -i | -s | <command> }",
 	NULL
only in patch2:
unchanged:
--- sudo-1.6.8p5.orig/tgetpass.c
+++ sudo-1.6.8p5/tgetpass.c
@@ -141,6 +141,10 @@
 	input = STDIN_FILENO;
 	output = STDERR_FILENO;
     }
+    
+    if (ISSET(flags, TGP_FD3IN)) {
+	input = 3;
+    }
 
     /*
      * Catch signals that would otherwise cause the user to end
only in patch2:
unchanged:
--- sudo-1.6.8p5.orig/sudo.h
+++ sudo-1.6.8p5/sudo.h
@@ -160,6 +161,7 @@
  */
 #define TGP_ECHO	0x01		/* leave echo on when reading passwd */
 #define TGP_STDIN	0x02		/* read from stdin, not /dev/tty */
+#define TGP_FD3IN	0x03		/* read from fd 3, not /dev/tty */
 
 struct passwd;
 struct timespec;
