summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-12-20 16:15:51 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-12-20 16:15:51 +1100
commite9a9b71c6b7927ea0f875cde42dffc1f4b195011 (patch)
treeaa5bfa42d1c5896cf8115bbb62f7a5009c98aa6f
parent7eba820ca7e989ab723d87af630677ac892084ca (diff)
- dtucker@cvs.openbsd.org 2005/12/20 04:41:07
[ssh.c] exit(255) on error to match description in ssh(1); bz #1137; ok deraadt@
-rw-r--r--ChangeLog5
-rw-r--r--ssh.c28
2 files changed, 18 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index df1e00318..981ef5691 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,9 @@
22 - stevesk@cvs.openbsd.org 2005/12/17 21:36:42 22 - stevesk@cvs.openbsd.org 2005/12/17 21:36:42
23 [ssh_config.5] 23 [ssh_config.5]
24 spelling: intented -> intended 24 spelling: intented -> intended
25 - dtucker@cvs.openbsd.org 2005/12/20 04:41:07
26 [ssh.c]
27 exit(255) on error to match description in ssh(1); bz #1137; ok deraadt@
25 28
2620051219 2920051219
27 - (dtucker) [cipher-aes.c cipher-ctr.c cipher.c configure.ac 30 - (dtucker) [cipher-aes.c cipher-ctr.c cipher.c configure.ac
@@ -3496,4 +3499,4 @@
3496 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 3499 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
3497 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 3500 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
3498 3501
3499$Id: ChangeLog,v 1.4038 2005/12/20 05:15:14 dtucker Exp $ 3502$Id: ChangeLog,v 1.4039 2005/12/20 05:15:51 dtucker Exp $
diff --git a/ssh.c b/ssh.c
index dd627ce2e..cdfc91633 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: ssh.c,v 1.256 2005/12/08 18:34:11 reyk Exp $"); 43RCSID("$OpenBSD: ssh.c,v 1.257 2005/12/20 04:41:07 dtucker Exp $");
44 44
45#include <openssl/evp.h> 45#include <openssl/evp.h>
46#include <openssl/err.h> 46#include <openssl/err.h>
@@ -164,7 +164,7 @@ usage(void)
164" [-R [bind_address:]port:host:hostport] [-S ctl_path]\n" 164" [-R [bind_address:]port:host:hostport] [-S ctl_path]\n"
165" [-w tunnel:tunnel] [user@]hostname [command]\n" 165" [-w tunnel:tunnel] [user@]hostname [command]\n"
166 ); 166 );
167 exit(1); 167 exit(255);
168} 168}
169 169
170static int ssh_session(void); 170static int ssh_session(void);
@@ -223,7 +223,7 @@ main(int ac, char **av)
223 pw = getpwuid(original_real_uid); 223 pw = getpwuid(original_real_uid);
224 if (!pw) { 224 if (!pw) {
225 logit("You don't exist, go away!"); 225 logit("You don't exist, go away!");
226 exit(1); 226 exit(255);
227 } 227 }
228 /* Take a copy of the returned structure. */ 228 /* Take a copy of the returned structure. */
229 pw = pwcopy(pw); 229 pw = pwcopy(pw);
@@ -346,7 +346,7 @@ again:
346 options.tun_local = a2tun(optarg, &options.tun_remote); 346 options.tun_local = a2tun(optarg, &options.tun_remote);
347 if (options.tun_local == SSH_TUNID_ERR) { 347 if (options.tun_local == SSH_TUNID_ERR) {
348 fprintf(stderr, "Bad tun device '%s'\n", optarg); 348 fprintf(stderr, "Bad tun device '%s'\n", optarg);
349 exit(1); 349 exit(255);
350 } 350 }
351 break; 351 break;
352 case 'q': 352 case 'q':
@@ -364,7 +364,7 @@ again:
364 else { 364 else {
365 fprintf(stderr, "Bad escape character '%s'.\n", 365 fprintf(stderr, "Bad escape character '%s'.\n",
366 optarg); 366 optarg);
367 exit(1); 367 exit(255);
368 } 368 }
369 break; 369 break;
370 case 'c': 370 case 'c':
@@ -379,7 +379,7 @@ again:
379 fprintf(stderr, 379 fprintf(stderr,
380 "Unknown cipher type '%s'\n", 380 "Unknown cipher type '%s'\n",
381 optarg); 381 optarg);
382 exit(1); 382 exit(255);
383 } 383 }
384 if (options.cipher == SSH_CIPHER_3DES) 384 if (options.cipher == SSH_CIPHER_3DES)
385 options.ciphers = "3des-cbc"; 385 options.ciphers = "3des-cbc";
@@ -395,7 +395,7 @@ again:
395 else { 395 else {
396 fprintf(stderr, "Unknown mac type '%s'\n", 396 fprintf(stderr, "Unknown mac type '%s'\n",
397 optarg); 397 optarg);
398 exit(1); 398 exit(255);
399 } 399 }
400 break; 400 break;
401 case 'M': 401 case 'M':
@@ -408,7 +408,7 @@ again:
408 options.port = a2port(optarg); 408 options.port = a2port(optarg);
409 if (options.port == 0) { 409 if (options.port == 0) {
410 fprintf(stderr, "Bad port '%s'\n", optarg); 410 fprintf(stderr, "Bad port '%s'\n", optarg);
411 exit(1); 411 exit(255);
412 } 412 }
413 break; 413 break;
414 case 'l': 414 case 'l':
@@ -422,7 +422,7 @@ again:
422 fprintf(stderr, 422 fprintf(stderr,
423 "Bad local forwarding specification '%s'\n", 423 "Bad local forwarding specification '%s'\n",
424 optarg); 424 optarg);
425 exit(1); 425 exit(255);
426 } 426 }
427 break; 427 break;
428 428
@@ -433,7 +433,7 @@ again:
433 fprintf(stderr, 433 fprintf(stderr,
434 "Bad remote forwarding specification " 434 "Bad remote forwarding specification "
435 "'%s'\n", optarg); 435 "'%s'\n", optarg);
436 exit(1); 436 exit(255);
437 } 437 }
438 break; 438 break;
439 439
@@ -444,7 +444,7 @@ again:
444 if ((fwd.listen_host = hpdelim(&cp)) == NULL) { 444 if ((fwd.listen_host = hpdelim(&cp)) == NULL) {
445 fprintf(stderr, "Bad dynamic forwarding " 445 fprintf(stderr, "Bad dynamic forwarding "
446 "specification '%.100s'\n", optarg); 446 "specification '%.100s'\n", optarg);
447 exit(1); 447 exit(255);
448 } 448 }
449 if (cp != NULL) { 449 if (cp != NULL) {
450 fwd.listen_port = a2port(cp); 450 fwd.listen_port = a2port(cp);
@@ -457,7 +457,7 @@ again:
457 if (fwd.listen_port == 0) { 457 if (fwd.listen_port == 0) {
458 fprintf(stderr, "Bad dynamic port '%s'\n", 458 fprintf(stderr, "Bad dynamic port '%s'\n",
459 optarg); 459 optarg);
460 exit(1); 460 exit(255);
461 } 461 }
462 add_local_forward(&options, &fwd); 462 add_local_forward(&options, &fwd);
463 xfree(p); 463 xfree(p);
@@ -478,7 +478,7 @@ again:
478 line = xstrdup(optarg); 478 line = xstrdup(optarg);
479 if (process_config_line(&options, host ? host : "", 479 if (process_config_line(&options, host ? host : "",
480 line, "command-line", 0, &dummy) != 0) 480 line, "command-line", 0, &dummy) != 0)
481 exit(1); 481 exit(255);
482 xfree(line); 482 xfree(line);
483 break; 483 break;
484 case 's': 484 case 's':
@@ -654,7 +654,7 @@ again:
654 original_effective_uid == 0 && options.use_privileged_port, 654 original_effective_uid == 0 && options.use_privileged_port,
655#endif 655#endif
656 options.proxy_command) != 0) 656 options.proxy_command) != 0)
657 exit(1); 657 exit(255);
658 658
659 /* 659 /*
660 * If we successfully made the connection, load the host private key 660 * If we successfully made the connection, load the host private key