summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* pass correct argv[0] to openlog(); ok djm@markus2009-03-171-4/+5
|
* support remote port forwarding with a zero listen port (-R0:...) todjm2009-02-121-4/+11
| | | | | dyamically allocate a listen port at runtime (this is actually specified in rfc4254); bz#1003 ok markus@
* make a2port() return -1 when it encounters an invalid port numberdjm2009-01-221-2/+2
| | | | | | | | | | | rather than 0, which it will now treat as valid (needed for future work) adjust current consumers of a2port() to check its return value is <= 0, which in turn required some things to be converted from u_short => int make use of int vs. u_short consistent in some other places too feedback & ok markus@
* merge dynamic forward parsing into parse_forward(); 'i think this is OK' djm@stevesk2008-11-011-24/+8
|
* add -y to usage();jmc2008-10-091-2/+2
|
* Add -y option to force logging via syslog rather than stderr.djm2008-10-081-5/+9
| | | | | Useful for daemonised ssh connection (ssh -f). Patch originally from and ok'd by markus@
* only send eow and no-more-sessions requests to openssh 5 and newer;markus2008-09-111-2/+3
| | | | fixes interop problems with broken ssh v2 implementations; ok djm@
* When forking after authentication ("ssh -f") with ExitOnForwardFailuredjm2008-07-021-6/+21
| | | | | | enabled, delay the fork until after replies for any -R forwards have been seen. Allows for robust detection of -R forward failure when using -f (similar to bz#92); ok dtucker@
* keyword expansion for localcommand. ok djm@dtucker2008-06-121-7/+23
|
* thal shalt not code past the eightieth columndjm2008-06-121-26/+47
|
* maintain an ordered queue of outstanding global requests that wedjm2008-06-121-27/+26
| | | | | | | | | expect replies to, similar to the per-channel confirmation queue. Use this queue to verify success or failure for remote forward establishment in a race free way. ok dtucker@
* Add a no-more-sessions@openssh.com global request extension that thedjm2008-06-101-1/+10
| | | | | | | | | | | | client sends when it knows that it will never request another session (i.e. when session multiplexing is disabled). This allows a server to disallow further session requests and terminate the session. Why would a non-multiplexing client ever issue additional session requests? It could have been attacked with something like SSH'jack: http://www.storm.net.nz/projects/7 feedback & ok markus
* dingo stole my diff hunkdjm2008-05-091-1/+6
|
* tidy up session multiplexing code, moving it into its own file anddjm2008-05-091-298/+15
| | | | | | | making the function names more consistent - making ssh.c and clientloop.c a fair bit more readable. ok markus@
* Use new channel status confirmation callback system to properly dealdjm2008-05-081-17/+2
| | | | | | | | | | | | | | with "important" channel requests that fail, in particular command exec, shell and subsystem requests. Previously we would optimistically assume that the requests would always succeed, which could cause hangs if they did not (e.g. when the server runs out of fds) or were unimplemented by the server (bz #1384) Also, properly report failing multiplex channel requests via the mux client stderr (subject to LogLevel in the mux master) - better than silently failing. most bits ok markus@ (as part of a larger diff)
* Implement a channel success/failure status confirmation callbackdjm2008-05-081-2/+4
| | | | | | | | | | | | | mechanism. Each channel maintains a queue of callbacks, which will be drained in order (RFC4253 guarantees confirm messages are not reordered within an channel). Also includes a abandonment callback to clean up if a channel is closed without sending confirmation messages. This probably shouldn't happen in compliant implementations, but it could be abused to leak memory. ok markus@ (as part of a larger diff)
* ignore SIGPIPE in multiplex client mode - we can receive this if thedjm2008-01-191-1/+3
| | | | | server runs out of fds on us midway. Report and patch from gregory_shively AT fanniemae.com
* avoid errno trashing in signal handler; ok dtuckerderaadt2007-11-031-1/+5
|
* Use xstrdup/xfree when saving pwname and pwdir; ok deraadt@dtucker2007-11-031-5/+5
|
* bz #1377: getpwuid results were being clobbered by another getpw* callderaadt2007-11-031-3/+10
| | | | | inside tilde_expand_filename(); save the data we need carefully ok djm
* Make LocalCommand work for Protocol 1 too; ok djm@dtucker2007-10-291-1/+6
|
* Plug tiny mem leaks in ControlPath and ProxyCommand option processing; ok djm@dtucker2007-10-291-3/+8
|
* make ssh(1)'s ConnectTimeout option apply to both the TCP connection anddjm2007-09-041-4/+11
| | | | | | | | SSH banner exchange (previously it just covered the TCP connection). This allows callers of ssh(1) to better detect and deal with stuck servers that accept a TCP connection but don't progress the protocol, and also makes ConnectTimeout useful for connections via a ProxyCommand; feedback and "looks ok" markus@
* make file descriptor passing code return an error rather than call fatal()djm2007-09-041-4/+5
| | | | | when it encounters problems, and use this to make session multiplexing masters survive slaves failing to pass all stdio FDs; ok markus@
* bz#1232: ensure that any specified LocalCommand is executed after thedjm2007-08-071-24/+15
| | | | | | tunnel device is opened. Also, make failures to open a tunnel device fatal when ExitOnForwardFailure is active. Reported by h.goebel AT goebel-consult.de; ok dtucker markus reyk deraadt
* when waiting for the multiplex exit status, read until the master enddjm2007-06-141-13/+21
| | | | | writes an entire int of data *and* closes the client_fd; fixes mux regression spotted by dtucker, ok dtucker@
* handle EINTR when waiting for mux exit status properlydjm2007-06-141-2/+5
|
* improved exit message from multiplex slave sessions; bz #1262djm2007-06-121-2/+3
| | | | reported by alexandre.nunes AT gmail.com; ok dtucker@
* Add "-K" flag for ssh to set GSSAPIAuthentication=yes anddjm2007-06-121-3/+7
| | | | | | GSSAPIDelegateCredentials=yes. This is symmetric with -k (disable GSSAPI) and is useful for hosts with /home on Kerberised NFS; bz #1312 patch from Markus.Kuhn AT cl.cam.ac.uk; ok dtucker@ markus@
* fix slave exit value when a control master goes away without passing thedjm2007-06-121-10/+13
| | | | | full exit status by ensuring that the slave reads a full int. bz#1261 reported by frekko AT gmail.com; ok markus@ dtucker@
* spacesstevesk2007-01-031-2/+2
|
* sys/resource.h needs sys/time.h; prompted by brad@djm2006-10-061-1/+2
|
* almost entirely get rid of the culture of ".h files that include .h files"deraadt2006-08-031-6/+4
| | | | | ok djm, sort of ok stevesk makes the pain stop in one easy step
* clean extra spacesstevesk2006-08-011-2/+2
|
* move #include <stdio.h> out of includes.hstevesk2006-08-011-1/+2
|
* move #include <stdlib.h> out of includes.hstevesk2006-07-261-1/+2
|
* move #include <string.h> out of includes.hstevesk2006-07-221-1/+2
|
* move #include <unistd.h> out of includes.hstevesk2006-07-171-1/+2
|
* move #include <stddef.h> out of includes.hstevesk2006-07-121-1/+2
|
* move #include <netdb.h> out of includes.h; ok djm@stevesk2006-07-121-1/+2
|
* need <errno.h> here also (it's also included in <openssl/err.h>)stevesk2006-07-111-1/+2
|
* cast asterisk field precision argument to int to remove warning;stevesk2006-07-111-2/+2
| | | | ok markus@
* add ExitOnForwardFailure: terminate the connection if ssh(1)markus2006-07-111-6/+21
| | | | | cannot set up all requested dynamic, local, and remote port forwardings. ok djm, dtucker, stevesk, jmc
* Only copy the part of environment variable that we actually use. Preventsdtucker2006-07-111-7/+6
| | | | | ssh bailing when SendEnv is used and an environment variable with a really long value exists. ok djm@
* move #include <fcntl.h> out of includes.hstevesk2006-07-091-1/+2
|
* move #include <sys/socket.h> out of includes.hstevesk2006-07-081-1/+2
|
* move #include <pwd.h> out of includes.h; ok markus@stevesk2006-07-061-1/+2
|
* move #include "version.h" out of includes.h; ok markus@stevesk2006-07-031-1/+2
|
* more details and clarity for tun(4) device forwarding; ok and helpstevesk2006-07-021-2/+2
| | | | jmc@
* Prevent ssh from trying to open private keys with bad permissions more thandtucker2006-04-251-4/+4
| | | | | once or prompting for their passphrases (which it subsequently ignores anyway), similar to a previous change in ssh-add. bz #1186, ok djm@