View | Details | Raw Unified | Return to bug 1137
Collapse All | Expand All

(-)ssh.c (-13 / +13 lines)
Lines 164-170 usage(void) Link Here
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
170
static int ssh_session(void);
170
static int ssh_session(void);
Lines 223-229 main(int ac, char **av) Link Here
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);
Lines 346-352 again: Link Here
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':
Lines 364-370 again: Link Here
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':
Lines 379-385 again: Link Here
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";
Lines 395-401 again: Link Here
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':
Lines 408-414 again: Link Here
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':
Lines 422-428 again: Link Here
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
Lines 433-439 again: Link Here
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
Lines 444-450 again: Link Here
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);
Lines 457-463 again: Link Here
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);
Lines 478-484 again: Link Here
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':
Lines 654-660 again: Link Here
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

Return to bug 1137