Module Name: src Committed By: lukem Date: Fri May 5 15:46:06 UTC 2023
Modified Files: src/usr.bin/ftp: ftp.c ssl.c util.c version.h Log Message: add timeout for ssl connect Implement a timeout for SSL connection setup, using -q QUITTIME, defaulting to 60 seconds. SSL_connect(3) (unlike connect(2)) doesn't timeout by default. Adapt ssl error messages destination: if unexpected error from local API, use warn()/warnx() to stderr; if expected error from a network operation (e.g., timeouts), use fprintf to ttyout (which might be stdout). Consistently use ftp_poll() instead of select(); ssl.c (using select()) was added 7 years after the previous uses of select() were converted to poll(). Check EAGAIN as well as existing EINTR error from ftp_poll(), for portability. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/usr.bin/ftp/ftp.c cvs rdiff -u -r1.14 -r1.15 src/usr.bin/ftp/ssl.c cvs rdiff -u -r1.166 -r1.167 src/usr.bin/ftp/util.c cvs rdiff -u -r1.96 -r1.97 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.