summaryrefslogtreecommitdiffstats
path: root/usr.bin/cu/cu.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add -E to change the escape character, from Artturi Alm.nicm2019-03-221-9/+19
| | | | no objections from deraadt, ok millert
* -r restricted mode blocks certain operations as ~ operations.deraadt2017-12-101-3/+11
| | | | | from Jan Klemkow ok nicm
* Call isatty(3) prior to ioctl(TIOCEXCL) to check if cu(1) was invoked on amestre2017-08-221-1/+3
| | | | | | | | non-TTY and if that's the case then close the application. Otherwise without this verification if it's really a non-TTY then cu(1) will be aborted by pledge(2). feedback and OK by deraadt@
* doug and I think the kernel has enough features to supportderaadt2015-10-161-1/+5
| | | | | | pledge "stdio rpath wpath cpath getpw proc exec tty" now. It will be hard to drop many of those features unless cu becomes privsep for the "upload" commands.
* Set the line file descriptor nonblocking and make it blocking again fornicm2015-10-051-2/+18
| | | | | xmodem and child processes, makes xmodem work with -d. Reported by Kim Zeitler via guenther@, tested by Jiri B. ok (and a small change) guenther
* Add -d flag and dc capability to open devices non-blocking, used for thenicm2015-05-181-6/+18
| | | | | | few drivers that do not support cua* so tty* must be used. ok miod millert
* Separate the two usages for cu so you can either give it -l and -s (likenicm2015-02-081-15/+20
| | | | | | | | | | | | | | | cu) or you can give it a host to look up in /etc/remote (like tip). Mixing the two was unclear and caused mixups with -l and the HOST environment variable. So usage is now: usage: cu [-l line] [-s speed | -speed] cu [host] And HOST and REMOTE are ignored for the first form. ok deraadt claudio
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-3/+3
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* -l should override HOST, pointed out by claudio@nicm2014-04-121-4/+5
|
* If HOST or the host argument starts with a /, treat it as a device namenicm2014-03-311-6/+10
| | | | (so, for example, "cu /dev/cuaU0" will work).
* Fix REMOTE to work like tip(1) - it can be either a path to a remote(5)nicm2014-03-311-10/+15
| | | | | | | database or a description (for example "foo:dv=/dev/bar"). Add support for HOST which works as I thought REMOTE did. Manpage help from jmc@.
* Add support for retrieving the line and speed from the /etc/remote dvnicm2014-03-261-20/+71
| | | | | | | | | and br capabilities like tip(1). No other capabilities are supported. Also handle REMOTE in the environment as either a separate remote(5) file or a host. Discussed with and approval from several, man page help from schwarze@.
* unsigned char casts with ctype macros are pretty obvious when dealingderaadt2013-11-201-2/+2
| | | | | with argv or optarg ok ratchov
* simplify tilde expand as seen in ssh. ok nicmtedu2013-04-241-13/+14
|
* Fix a couple of spacing/style nits.nicm2013-01-171-2/+2
|
* Instead of creating line termios from scratch, call tcgetattr() andnicm2013-01-171-7/+10
| | | | adjust it (per POSIX), reported by kettenis.
* kill unused variablehalex2012-07-131-3/+3
| | | | | | ok dlg@ nicm@ while at it, kill one more and add #include <ctype.h> per nicm's request
* make the compat for -XXX to -s XXX simpler. sometimes you dont need to usedlg2012-07-131-21/+8
| | | | | | goto. ok nicm@
* Set CLOCAL in remove c_cflag or line noise is likely to make cu exit asnicm2012-07-121-2/+2
| | | | discovered by naddy.
* Add handler for SIGHUP.nicm2012-07-121-1/+4
|
* Fix usage.nicm2012-07-101-2/+3
|
* Add ~R command to start recording output to a file.nicm2012-07-101-1/+4
|
* Use function to restore termios and add ~X to help.nicm2012-07-101-5/+3
|
* Once we've set up termios, lines need to be \r\n terminated, and we neednicm2012-07-101-14/+9
| | | | | to reset termios before exiting. So add custom versions of err(), errx(), warn(), warnx() to handle this.
* Restore termios and signal handlers before ~$ so ^C will kill child.nicm2012-07-101-1/+6
|
* Add a ~S escape to change the speed interactively (not using ~s sincenicm2012-07-101-12/+23
| | | | may want to use it for variables later).
* Add first cut of replacement for tip/cu. Not linked to the build.nicm2012-07-101-0/+338
Currently supports only -l and -s (no parity), no variables and ~., ~>, ~$, ~#, ~^Z, ~?. More to come. Tested by naddy, otto. ok miod deraadt