86c7e6867b
- fixed CVE-2012-2337 - temporarily disabled SSSD support
30 lines
749 B
Diff
30 lines
749 B
Diff
diff -up sudo-1.8.5rc5/common/ttysize.c.pipelist sudo-1.8.5rc5/common/ttysize.c
|
|
--- sudo-1.8.5rc5/common/ttysize.c.pipelist 2012-04-06 21:43:19.000000000 +0200
|
|
+++ sudo-1.8.5rc5/common/ttysize.c 2012-05-16 13:03:17.184034854 +0200
|
|
@@ -20,6 +20,7 @@
|
|
|
|
#include <sys/types.h>
|
|
#include <sys/ioctl.h>
|
|
+#include <sys/stat.h>
|
|
#include <stdio.h>
|
|
#ifdef STDC_HEADERS
|
|
# include <stdlib.h>
|
|
@@ -71,8 +72,17 @@ get_ttysize_ioctl(int *rowp, int *colp)
|
|
void
|
|
get_ttysize(int *rowp, int *colp)
|
|
{
|
|
+ struct stat st;
|
|
debug_decl(fork_cmnd, SUDO_DEBUG_EXEC)
|
|
|
|
+ if (fstat(STDOUT_FILENO, &st) == 0) {
|
|
+ if (S_ISFIFO(st.st_mode)) {
|
|
+ *rowp = 0;
|
|
+ *colp = 0;
|
|
+ return;
|
|
+ }
|
|
+ }
|
|
+
|
|
if (get_ttysize_ioctl(rowp, colp) == -1) {
|
|
char *p;
|
|
|