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

(-)readconf.c (-1 / +17 lines)
Lines 987-993 parse_int: Link Here
987
987
988
	case oVisualHostKey:
988
	case oVisualHostKey:
989
		intptr = &options->visual_host_key;
989
		intptr = &options->visual_host_key;
990
		goto parse_flag;
990
		arg = strdelim(&s);
991
		if (!arg || *arg == '\0')
992
			fatal("%s line %d: Missing yes/no/always argument.",
993
			    filename, linenum);
994
		value = 0;	/* silence compiler */
995
		if (strcasecmp(arg, "always") == 0)
996
			value = VISUAL_HOST_ALWAYS;
997
		else if (strcasecmp(arg, "yes") == 0)
998
			value = VISUAL_HOST_YES;
999
		else if (strcasecmp(arg, "no") == 0)
1000
			value = VISUAL_HOST_NO;
1001
		else
1002
			fatal("%s line %d: Missing yes/no/always argument: %s",
1003
			    filename, linenum, arg);
1004
		if (*activep)
1005
			*intptr = value;
1006
		break;
991
1007
992
	case oIPQoS:
1008
	case oIPQoS:
993
		arg = strdelim(&s);
1009
		arg = strdelim(&s);
(-)readconf.h (+4 lines)
Lines 146-151 typedef struct { Link Here
146
#define REQUEST_TTY_YES		2
146
#define REQUEST_TTY_YES		2
147
#define REQUEST_TTY_FORCE	3
147
#define REQUEST_TTY_FORCE	3
148
148
149
#define VISUAL_HOST_NO		0
150
#define VISUAL_HOST_YES		1
151
#define VISUAL_HOST_ALWAYS	2
152
149
void     initialize_options(Options *);
153
void     initialize_options(Options *);
150
void     fill_default_options(Options *);
154
void     fill_default_options(Options *);
151
int	 read_config_file(const char *, const char *, Options *, int);
155
int	 read_config_file(const char *, const char *, Options *, int);
(-)sshconnect.c (-1 / +4 lines)
Lines 64-69 extern Options options; Link Here
64
extern char *__progname;
64
extern char *__progname;
65
extern uid_t original_real_uid;
65
extern uid_t original_real_uid;
66
extern uid_t original_effective_uid;
66
extern uid_t original_effective_uid;
67
extern int tty_flag;
67
68
68
static int show_other_keys(struct hostkeys *, Key *);
69
static int show_other_keys(struct hostkeys *, Key *);
69
static void warn_changed_key(Key *);
70
static void warn_changed_key(Key *);
Lines 771-777 check_host_key(char *hostname, struct so Link Here
771
				logit("Warning: Permanently added the %s host "
772
				logit("Warning: Permanently added the %s host "
772
				    "key for IP address '%.128s' to the list "
773
				    "key for IP address '%.128s' to the list "
773
				    "of known hosts.", type, ip);
774
				    "of known hosts.", type, ip);
774
		} else if (options.visual_host_key) {
775
		} else if (options.visual_host_key == VISUAL_HOST_ALWAYS ||
776
		    ((tty_flag || isatty(STDERR_FILENO)) &&
777
		    options.visual_host_key == VISUAL_HOST_YES)) {
775
			fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX);
778
			fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX);
776
			ra = key_fingerprint(host_key, SSH_FP_MD5,
779
			ra = key_fingerprint(host_key, SSH_FP_MD5,
777
			    SSH_FP_RANDOMART);
780
			    SSH_FP_RANDOMART);

Return to bug 1870