in sudoreplay.
# Note: gram.o must come first here
COMMON_OBJS = alias.o alloc.o defaults.o error.o getline.o gram.o \
list.o match.o pwutil.o timestr.o toke.o redblack.o \
- zero_bytes.o @NONUNIX_GROUPS_IMPL@
+ term.o zero_bytes.o @NONUNIX_GROUPS_IMPL@
SUDO_OBJS = $(AUTH_OBJS) @SUDO_OBJS@ audit.o check.o \
env.o getspwuid.o gettime.o goodpath.o fileops.o find_path.o \
interfaces.o lbuf.o logging.o parse.o set_perms.o sudo.o \
- sudo_edit.o sudo_nss.o term.o tgetpass.o
+ sudo_edit.o sudo_nss.o tgetpass.o
VISUDO_OBJS = visudo.o fileops.o gettime.o goodpath.o find_path.o
free(cp);
fclose(lfile);
+ /* Set stdout to raw mode if it is a tty */
+ /* XXX - reset terminal on signal */
+ fflush(stdout);
+ term_raw(STDOUT_FILENO);
+
/*
* Timing file consists of line of the format: "%f %d\n"
*/
- fflush(stdout);
while (fgets(buf, sizeof(buf), tfile) != NULL) {
errno = 0;
seconds = strtod(buf, &ep);
} while (nread);
}
}
+ term_restore(STDOUT_FILENO);
exit(0);
}
if (tcgetattr(src, &tt) != 0)
return(0);
- /* Do not convert line endings from NL to NLCR. */
- CRL(tt.c_oflag, ONLCR);
if (tcsetattr(dst, TCSAFLUSH, &tt) != 0)
return(0);
return(1);
ioctl(src, TIOCLGET, &lb)) {
return(0);
}
- /* Do not convert line endings from NL to NLCR. */
- CLR(b.sg_flags, CRMOD);
if (ioctl(dst, TIOCSETP, &b) != 0 || ioctl(dst, TIOCSETC, &tc) != 0 ||
ioctl(dst, TIOCSLTC, &lc) != 0 || ioctl(dst, TIOCLSET, &lb) != 0 ||
ioctl(dst, TIOCSETD, &l) != 0) {