summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ssh.c12
2 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index a6d3db544..b733b4601 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,9 @@
32 - markus@cvs.openbsd.org 2001/06/22 22:21:20 32 - markus@cvs.openbsd.org 2001/06/22 22:21:20
33 [sftp-server.c] 33 [sftp-server.c]
34 allow long usernames/groups in readdir 34 allow long usernames/groups in readdir
35 - markus@cvs.openbsd.org 2001/06/22 23:35:21
36 [ssh.c]
37 don't overwrite argv (fixes ssh user@host in 'ps'), report by ericj@
35 38
3620010622 3920010622
37 - (stevesk) handle systems without pw_expire and pw_change. 40 - (stevesk) handle systems without pw_expire and pw_change.
@@ -5716,4 +5719,4 @@
5716 - Wrote replacements for strlcpy and mkdtemp 5719 - Wrote replacements for strlcpy and mkdtemp
5717 - Released 1.0pre1 5720 - Released 1.0pre1
5718 5721
5719$Id: ChangeLog,v 1.1304 2001/06/25 04:24:49 mouring Exp $ 5722$Id: ChangeLog,v 1.1305 2001/06/25 04:26:55 mouring Exp $
diff --git a/ssh.c b/ssh.c
index 4859c5bed..e0e141fe1 100644
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: ssh.c,v 1.124 2001/06/07 20:23:05 markus Exp $"); 42RCSID("$OpenBSD: ssh.c,v 1.125 2001/06/22 23:35:21 markus Exp $");
43 43
44#include <openssl/evp.h> 44#include <openssl/evp.h>
45#include <openssl/err.h> 45#include <openssl/err.h>
@@ -244,7 +244,7 @@ main(int ac, char **av)
244{ 244{
245 int i, opt, optind, exit_status, ok; 245 int i, opt, optind, exit_status, ok;
246 u_short fwd_port, fwd_host_port; 246 u_short fwd_port, fwd_host_port;
247 char *optarg, *cp, buf[256]; 247 char *optarg, *p, *cp, buf[256];
248 struct stat st; 248 struct stat st;
249 struct passwd *pw; 249 struct passwd *pw;
250 int dummy; 250 int dummy;
@@ -305,10 +305,12 @@ main(int ac, char **av)
305 if (av[optind][0] != '-') { 305 if (av[optind][0] != '-') {
306 if (host) 306 if (host)
307 break; 307 break;
308 if ((cp = strchr(av[optind], '@'))) { 308 if (strchr(av[optind], '@')) {
309 if(cp == av[optind]) 309 p = xstrdup(av[optind]);
310 cp = strchr(p, '@');
311 if(cp == NULL || cp == p)
310 usage(); 312 usage();
311 options.user = av[optind]; 313 options.user = p;
312 *cp = '\0'; 314 *cp = '\0';
313 host = ++cp; 315 host = ++cp;
314 } else 316 } else