OpenCoverage

readconf.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssh/src/readconf.c
Source codeSwitch to Preprocessed file
LineSourceCount
1/* $OpenBSD: readconf.c,v 1.298 2018/09/20 03:30:44 djm Exp $ */-
2/*-
3 * Author: Tatu Ylonen <ylo@cs.hut.fi>-
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland-
5 * All rights reserved-
6 * Functions for reading the configuration files.-
7 *-
8 * As far as I am concerned, the code I have written for this software-
9 * can be used freely for any purpose. Any derived versions of this-
10 * software must be clearly marked as such, and if the derived work is-
11 * incompatible with the protocol description in the RFC file, it must be-
12 * called by a name other than "ssh" or "Secure Shell".-
13 */-
14-
15#include "includes.h"-
16-
17#include <sys/types.h>-
18#include <sys/stat.h>-
19#include <sys/socket.h>-
20#include <sys/wait.h>-
21#include <sys/un.h>-
22-
23#include <netinet/in.h>-
24#include <netinet/in_systm.h>-
25#include <netinet/ip.h>-
26#include <arpa/inet.h>-
27-
28#include <ctype.h>-
29#include <errno.h>-
30#include <fcntl.h>-
31#include <limits.h>-
32#include <netdb.h>-
33#ifdef HAVE_PATHS_H-
34# include <paths.h>-
35#endif-
36#include <pwd.h>-
37#include <signal.h>-
38#include <stdarg.h>-
39#include <stdio.h>-
40#include <string.h>-
41#include <unistd.h>-
42#ifdef USE_SYSTEM_GLOB-
43# include <glob.h>-
44#else-
45# include "openbsd-compat/glob.h"-
46#endif-
47#ifdef HAVE_UTIL_H-
48#include <util.h>-
49#endif-
50#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS)-
51# include <vis.h>-
52#endif-
53-
54#include "xmalloc.h"-
55#include "ssh.h"-
56#include "ssherr.h"-
57#include "compat.h"-
58#include "cipher.h"-
59#include "pathnames.h"-
60#include "log.h"-
61#include "sshkey.h"-
62#include "misc.h"-
63#include "readconf.h"-
64#include "match.h"-
65#include "kex.h"-
66#include "mac.h"-
67#include "uidswap.h"-
68#include "myproposal.h"-
69#include "digest.h"-
70-
71/* Format of the configuration file:-
72-
73 # Configuration data is parsed as follows:-
74 # 1. command line options-
75 # 2. user-specific file-
76 # 3. system-wide file-
77 # Any configuration value is only changed the first time it is set.-
78 # Thus, host-specific definitions should be at the beginning of the-
79 # configuration file, and defaults at the end.-
80-
81 # Host-specific declarations. These may override anything above. A single-
82 # host may match multiple declarations; these are processed in the order-
83 # that they are given in.-
84-
85 Host *.ngs.fi ngs.fi-
86 User foo-
87-
88 Host fake.com-
89 HostName another.host.name.real.org-
90 User blaah-
91 Port 34289-
92 ForwardX11 no-
93 ForwardAgent no-
94-
95 Host books.com-
96 RemoteForward 9999 shadows.cs.hut.fi:9999-
97 Ciphers 3des-cbc-
98-
99 Host fascist.blob.com-
100 Port 23123-
101 User tylonen-
102 PasswordAuthentication no-
103-
104 Host puukko.hut.fi-
105 User t35124p-
106 ProxyCommand ssh-proxy %h %p-
107-
108 Host *.fr-
109 PublicKeyAuthentication no-
110-
111 Host *.su-
112 Ciphers aes128-ctr-
113 PasswordAuthentication no-
114-
115 Host vpn.fake.com-
116 Tunnel yes-
117 TunnelDevice 3-
118-
119 # Defaults for various options-
120 Host *-
121 ForwardAgent no-
122 ForwardX11 no-
123 PasswordAuthentication yes-
124 RSAAuthentication yes-
125 RhostsRSAAuthentication yes-
126 StrictHostKeyChecking yes-
127 TcpKeepAlive no-
128 IdentityFile ~/.ssh/identity-
129 Port 22-
130 EscapeChar ~-
131-
132*/-
133-
134static int read_config_file_depth(const char *filename, struct passwd *pw,-
135 const char *host, const char *original_host, Options *options,-
136 int flags, int *activep, int depth);-
137static int process_config_line_depth(Options *options, struct passwd *pw,-
138 const char *host, const char *original_host, char *line,-
139 const char *filename, int linenum, int *activep, int flags, int depth);-
140-
141/* Keyword tokens. */-
142-
143typedef enum {-
144 oBadOption,-
145 oHost, oMatch, oInclude,-
146 oForwardAgent, oForwardX11, oForwardX11Trusted, oForwardX11Timeout,-
147 oGatewayPorts, oExitOnForwardFailure,-
148 oPasswordAuthentication, oRSAAuthentication,-
149 oChallengeResponseAuthentication, oXAuthLocation,-
150 oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward,-
151 oCertificateFile, oAddKeysToAgent, oIdentityAgent,-
152 oUser, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand,-
153 oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,-
154 oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression,-
155 oCompressionLevel, oTCPKeepAlive, oNumberOfPasswordPrompts,-
156 oUsePrivilegedPort, oLogFacility, oLogLevel, oCiphers, oMacs,-
157 oPubkeyAuthentication,-
158 oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,-
159 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,-
160 oHostKeyAlgorithms, oBindAddress, oBindInterface, oPKCS11Provider,-
161 oClearAllForwardings, oNoHostAuthenticationForLocalhost,-
162 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,-
163 oAddressFamily, oGssAuthentication, oGssDelegateCreds,-
164 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,-
165 oSendEnv, oSetEnv, oControlPath, oControlMaster, oControlPersist,-
166 oHashKnownHosts,-
167 oTunnel, oTunnelDevice,-
168 oLocalCommand, oPermitLocalCommand, oRemoteCommand,-
169 oVisualHostKey,-
170 oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass,-
171 oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots,-
172 oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs,-
173 oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys,-
174 oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes,-
175 oPubkeyAcceptedKeyTypes, oCASignatureAlgorithms, oProxyJump,-
176 oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported-
177} OpCodes;-
178-
179/* Textual representations of the tokens. */-
180-
181static struct {-
182 const char *name;-
183 OpCodes opcode;-
184} keywords[] = {-
185 /* Deprecated options */-
186 { "protocol", oIgnore }, /* NB. silently ignored */-
187 { "cipher", oDeprecated },-
188 { "fallbacktorsh", oDeprecated },-
189 { "globalknownhostsfile2", oDeprecated },-
190 { "rhostsauthentication", oDeprecated },-
191 { "userknownhostsfile2", oDeprecated },-
192 { "useroaming", oDeprecated },-
193 { "usersh", oDeprecated },-
194 { "useprivilegedport", oDeprecated },-
195-
196 /* Unsupported options */-
197 { "afstokenpassing", oUnsupported },-
198 { "kerberosauthentication", oUnsupported },-
199 { "kerberostgtpassing", oUnsupported },-
200-
201 /* Sometimes-unsupported options */-
202#if defined(GSSAPI)-
203 { "gssapiauthentication", oGssAuthentication },-
204 { "gssapidelegatecredentials", oGssDelegateCreds },-
205# else-
206 { "gssapiauthentication", oUnsupported },-
207 { "gssapidelegatecredentials", oUnsupported },-
208#endif-
209#ifdef ENABLE_PKCS11-
210 { "smartcarddevice", oPKCS11Provider },-
211 { "pkcs11provider", oPKCS11Provider },-
212# else-
213 { "smartcarddevice", oUnsupported },-
214 { "pkcs11provider", oUnsupported },-
215#endif-
216 { "rsaauthentication", oUnsupported },-
217 { "rhostsrsaauthentication", oUnsupported },-
218 { "compressionlevel", oUnsupported },-
219-
220 { "forwardagent", oForwardAgent },-
221 { "forwardx11", oForwardX11 },-
222 { "forwardx11trusted", oForwardX11Trusted },-
223 { "forwardx11timeout", oForwardX11Timeout },-
224 { "exitonforwardfailure", oExitOnForwardFailure },-
225 { "xauthlocation", oXAuthLocation },-
226 { "gatewayports", oGatewayPorts },-
227 { "passwordauthentication", oPasswordAuthentication },-
228 { "kbdinteractiveauthentication", oKbdInteractiveAuthentication },-
229 { "kbdinteractivedevices", oKbdInteractiveDevices },-
230 { "pubkeyauthentication", oPubkeyAuthentication },-
231 { "dsaauthentication", oPubkeyAuthentication }, /* alias */-
232 { "hostbasedauthentication", oHostbasedAuthentication },-
233 { "challengeresponseauthentication", oChallengeResponseAuthentication },-
234 { "skeyauthentication", oUnsupported },-
235 { "tisauthentication", oChallengeResponseAuthentication }, /* alias */-
236 { "identityfile", oIdentityFile },-
237 { "identityfile2", oIdentityFile }, /* obsolete */-
238 { "identitiesonly", oIdentitiesOnly },-
239 { "certificatefile", oCertificateFile },-
240 { "addkeystoagent", oAddKeysToAgent },-
241 { "identityagent", oIdentityAgent },-
242 { "hostname", oHostName },-
243 { "hostkeyalias", oHostKeyAlias },-
244 { "proxycommand", oProxyCommand },-
245 { "port", oPort },-
246 { "ciphers", oCiphers },-
247 { "macs", oMacs },-
248 { "remoteforward", oRemoteForward },-
249 { "localforward", oLocalForward },-
250 { "user", oUser },-
251 { "host", oHost },-
252 { "match", oMatch },-
253 { "escapechar", oEscapeChar },-
254 { "globalknownhostsfile", oGlobalKnownHostsFile },-
255 { "userknownhostsfile", oUserKnownHostsFile },-
256 { "connectionattempts", oConnectionAttempts },-
257 { "batchmode", oBatchMode },-
258 { "checkhostip", oCheckHostIP },-
259 { "stricthostkeychecking", oStrictHostKeyChecking },-
260 { "compression", oCompression },-
261 { "tcpkeepalive", oTCPKeepAlive },-
262 { "keepalive", oTCPKeepAlive }, /* obsolete */-
263 { "numberofpasswordprompts", oNumberOfPasswordPrompts },-
264 { "syslogfacility", oLogFacility },-
265 { "loglevel", oLogLevel },-
266 { "dynamicforward", oDynamicForward },-
267 { "preferredauthentications", oPreferredAuthentications },-
268 { "hostkeyalgorithms", oHostKeyAlgorithms },-
269 { "casignaturealgorithms", oCASignatureAlgorithms },-
270 { "bindaddress", oBindAddress },-
271 { "bindinterface", oBindInterface },-
272 { "clearallforwardings", oClearAllForwardings },-
273 { "enablesshkeysign", oEnableSSHKeysign },-
274 { "verifyhostkeydns", oVerifyHostKeyDNS },-
275 { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost },-
276 { "rekeylimit", oRekeyLimit },-
277 { "connecttimeout", oConnectTimeout },-
278 { "addressfamily", oAddressFamily },-
279 { "serveraliveinterval", oServerAliveInterval },-
280 { "serveralivecountmax", oServerAliveCountMax },-
281 { "sendenv", oSendEnv },-
282 { "setenv", oSetEnv },-
283 { "controlpath", oControlPath },-
284 { "controlmaster", oControlMaster },-
285 { "controlpersist", oControlPersist },-
286 { "hashknownhosts", oHashKnownHosts },-
287 { "include", oInclude },-
288 { "tunnel", oTunnel },-
289 { "tunneldevice", oTunnelDevice },-
290 { "localcommand", oLocalCommand },-
291 { "permitlocalcommand", oPermitLocalCommand },-
292 { "remotecommand", oRemoteCommand },-
293 { "visualhostkey", oVisualHostKey },-
294 { "kexalgorithms", oKexAlgorithms },-
295 { "ipqos", oIPQoS },-
296 { "requesttty", oRequestTTY },-
297 { "proxyusefdpass", oProxyUseFdpass },-
298 { "canonicaldomains", oCanonicalDomains },-
299 { "canonicalizefallbacklocal", oCanonicalizeFallbackLocal },-
300 { "canonicalizehostname", oCanonicalizeHostname },-
301 { "canonicalizemaxdots", oCanonicalizeMaxDots },-
302 { "canonicalizepermittedcnames", oCanonicalizePermittedCNAMEs },-
303 { "streamlocalbindmask", oStreamLocalBindMask },-
304 { "streamlocalbindunlink", oStreamLocalBindUnlink },-
305 { "revokedhostkeys", oRevokedHostKeys },-
306 { "fingerprinthash", oFingerprintHash },-
307 { "updatehostkeys", oUpdateHostkeys },-
308 { "hostbasedkeytypes", oHostbasedKeyTypes },-
309 { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes },-
310 { "ignoreunknown", oIgnoreUnknown },-
311 { "proxyjump", oProxyJump },-
312-
313 { NULL, oBadOption }-
314};-
315-
316/*-
317 * Adds a local TCP/IP port forward to options. Never returns if there is an-
318 * error.-
319 */-
320-
321void-
322add_local_forward(Options *options, const struct Forward *newfwd)-
323{-
324 struct Forward *fwd;-
325 int i;-
326-
327 /* Don't add duplicates */-
328 for (i = 0; i < options->num_local_forwards; i++) {
i < options->n...local_forwardsDescription
TRUEnever evaluated
FALSEnever evaluated
0
329 if (forward_equals(newfwd, options->local_forwards + i))
forward_equals..._forwards + i)Description
TRUEnever evaluated
FALSEnever evaluated
0
330 return;
never executed: return;
0
331 }
never executed: end of block
0
332 options->local_forwards = xreallocarray(options->local_forwards,-
333 options->num_local_forwards + 1,-
334 sizeof(*options->local_forwards));-
335 fwd = &options->local_forwards[options->num_local_forwards++];-
336-
337 fwd->listen_host = newfwd->listen_host;-
338 fwd->listen_port = newfwd->listen_port;-
339 fwd->listen_path = newfwd->listen_path;-
340 fwd->connect_host = newfwd->connect_host;-
341 fwd->connect_port = newfwd->connect_port;-
342 fwd->connect_path = newfwd->connect_path;-
343}
never executed: end of block
0
344-
345/*-
346 * Adds a remote TCP/IP port forward to options. Never returns if there is-
347 * an error.-
348 */-
349-
350void-
351add_remote_forward(Options *options, const struct Forward *newfwd)-
352{-
353 struct Forward *fwd;-
354 int i;-
355-
356 /* Don't add duplicates */-
357 for (i = 0; i < options->num_remote_forwards; i++) {
i < options->n...emote_forwardsDescription
TRUEnever evaluated
FALSEnever evaluated
0
358 if (forward_equals(newfwd, options->remote_forwards + i))
forward_equals..._forwards + i)Description
TRUEnever evaluated
FALSEnever evaluated
0
359 return;
never executed: return;
0
360 }
never executed: end of block
0
361 options->remote_forwards = xreallocarray(options->remote_forwards,-
362 options->num_remote_forwards + 1,-
363 sizeof(*options->remote_forwards));-
364 fwd = &options->remote_forwards[options->num_remote_forwards++];-
365-
366 fwd->listen_host = newfwd->listen_host;-
367 fwd->listen_port = newfwd->listen_port;-
368 fwd->listen_path = newfwd->listen_path;-
369 fwd->connect_host = newfwd->connect_host;-
370 fwd->connect_port = newfwd->connect_port;-
371 fwd->connect_path = newfwd->connect_path;-
372 fwd->handle = newfwd->handle;-
373 fwd->allocated_port = 0;-
374}
never executed: end of block
0
375-
376static void-
377clear_forwardings(Options *options)-
378{-
379 int i;-
380-
381 for (i = 0; i < options->num_local_forwards; i++) {
i < options->n...local_forwardsDescription
TRUEnever evaluated
FALSEnever evaluated
0
382 free(options->local_forwards[i].listen_host);-
383 free(options->local_forwards[i].listen_path);-
384 free(options->local_forwards[i].connect_host);-
385 free(options->local_forwards[i].connect_path);-
386 }
never executed: end of block
0
387 if (options->num_local_forwards > 0) {
options->num_l...l_forwards > 0Description
TRUEnever evaluated
FALSEnever evaluated
0
388 free(options->local_forwards);-
389 options->local_forwards = NULL;-
390 }
never executed: end of block
0
391 options->num_local_forwards = 0;-
392 for (i = 0; i < options->num_remote_forwards; i++) {
i < options->n...emote_forwardsDescription
TRUEnever evaluated
FALSEnever evaluated
0
393 free(options->remote_forwards[i].listen_host);-
394 free(options->remote_forwards[i].listen_path);-
395 free(options->remote_forwards[i].connect_host);-
396 free(options->remote_forwards[i].connect_path);-
397 }
never executed: end of block
0
398 if (options->num_remote_forwards > 0) {
options->num_r...e_forwards > 0Description
TRUEnever evaluated
FALSEnever evaluated
0
399 free(options->remote_forwards);-
400 options->remote_forwards = NULL;-
401 }
never executed: end of block
0
402 options->num_remote_forwards = 0;-
403 options->tun_open = SSH_TUNMODE_NO;-
404}
never executed: end of block
0
405-
406void-
407add_certificate_file(Options *options, const char *path, int userprovided)-
408{-
409 int i;-
410-
411 if (options->num_certificate_files >= SSH_MAX_CERTIFICATE_FILES)
options->num_c...e_files >= 100Description
TRUEnever evaluated
FALSEnever evaluated
0
412 fatal("Too many certificate files specified (max %d)",
never executed: fatal("Too many certificate files specified (max %d)", 100);
0
413 SSH_MAX_CERTIFICATE_FILES);
never executed: fatal("Too many certificate files specified (max %d)", 100);
0
414-
415 /* Avoid registering duplicates */-
416 for (i = 0; i < options->num_certificate_files; i++) {
i < options->n...tificate_filesDescription
TRUEnever evaluated
FALSEnever evaluated
0
417 if (options->certificate_file_userprovided[i] == userprovided &&
options->certi...= userprovidedDescription
TRUEnever evaluated
FALSEnever evaluated
0
418 strcmp(options->certificate_files[i], path) == 0) {
never executed: __result = (((const unsigned char *) (const char *) ( options->certificate_files[i] ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( path ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
419 debug2("%s: ignoring duplicate key %s", __func__, path);-
420 return;
never executed: return;
0
421 }-
422 }
never executed: end of block
0
423-
424 options->certificate_file_userprovided[options->num_certificate_files] =-
425 userprovided;-
426 options->certificate_files[options->num_certificate_files++] =-
427 xstrdup(path);-
428}
never executed: end of block
0
429-
430void-
431add_identity_file(Options *options, const char *dir, const char *filename,-
432 int userprovided)-
433{-
434 char *path;-
435 int i;-
436-
437 if (options->num_identity_files >= SSH_MAX_IDENTITY_FILES)
options->num_i...y_files >= 100Description
TRUEnever evaluated
FALSEnever evaluated
0
438 fatal("Too many identity files specified (max %d)",
never executed: fatal("Too many identity files specified (max %d)", 100);
0
439 SSH_MAX_IDENTITY_FILES);
never executed: fatal("Too many identity files specified (max %d)", 100);
0
440-
441 if (dir == NULL) /* no dir, filename is absolute */
dir == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
442 path = xstrdup(filename);
never executed: path = xstrdup(filename);
0
443 else if (xasprintf(&path, "%s%s", dir, filename) >= PATH_MAX)
xasprintf(&pat...ename) >= 4096Description
TRUEnever evaluated
FALSEnever evaluated
0
444 fatal("Identity file path %s too long", path);
never executed: fatal("Identity file path %s too long", path);
0
445-
446 /* Avoid registering duplicates */-
447 for (i = 0; i < options->num_identity_files; i++) {
i < options->n...identity_filesDescription
TRUEnever evaluated
FALSEnever evaluated
0
448 if (options->identity_file_userprovided[i] == userprovided &&
options->ident...= userprovidedDescription
TRUEnever evaluated
FALSEnever evaluated
0
449 strcmp(options->identity_files[i], path) == 0) {
never executed: __result = (((const unsigned char *) (const char *) ( options->identity_files[i] ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( path ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
450 debug2("%s: ignoring duplicate key %s", __func__, path);-
451 free(path);-
452 return;
never executed: return;
0
453 }-
454 }
never executed: end of block
0
455-
456 options->identity_file_userprovided[options->num_identity_files] =-
457 userprovided;-
458 options->identity_files[options->num_identity_files++] = path;-
459}
never executed: end of block
0
460-
461int-
462default_ssh_port(void)-
463{-
464 static int port;-
465 struct servent *sp;-
466-
467 if (port == 0) {
port == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
468 sp = getservbyname(SSH_SERVICE_NAME, "tcp");-
469 port = sp ? ntohs(sp->s_port) : SSH_DEFAULT_PORT;
never executed: __v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8)));
never executed: __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc");
__builtin_constant_p (__x)Description
TRUEnever evaluated
FALSEnever evaluated
spDescription
TRUEnever evaluated
FALSEnever evaluated
0
470 }
never executed: end of block
0
471 return port;
never executed: return port;
0
472}-
473-
474/*-
475 * Execute a command in a shell.-
476 * Return its exit status or -1 on abnormal exit.-
477 */-
478static int-
479execute_in_shell(const char *cmd)-
480{-
481 char *shell;-
482 pid_t pid;-
483 int devnull, status;-
484-
485 if ((shell = getenv("SHELL")) == NULL)
(shell = geten...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
486 shell = _PATH_BSHELL;
never executed: shell = "/bin/sh" ;
0
487-
488 /* Need this to redirect subprocess stdin/out */-
489 if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1)
(devnull = ope... , 02 )) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
490 fatal("open(/dev/null): %s", strerror(errno));
never executed: fatal("open(/dev/null): %s", strerror( (*__errno_location ()) ));
0
491-
492 debug("Executing command: '%.500s'", cmd);-
493-
494 /* Fork and execute the command. */-
495 if ((pid = fork()) == 0) {
(pid = fork()) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
496 char *argv[4];-
497-
498 /* Redirect child stdin and stdout. Leave stderr */-
499 if (dup2(devnull, STDIN_FILENO) == -1)
dup2(devnull, 0 ) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
500 fatal("dup2: %s", strerror(errno));
never executed: fatal("dup2: %s", strerror( (*__errno_location ()) ));
0
501 if (dup2(devnull, STDOUT_FILENO) == -1)
dup2(devnull, 1 ) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
502 fatal("dup2: %s", strerror(errno));
never executed: fatal("dup2: %s", strerror( (*__errno_location ()) ));
0
503 if (devnull > STDERR_FILENO)
devnull > 2Description
TRUEnever evaluated
FALSEnever evaluated
0
504 close(devnull);
never executed: close(devnull);
0
505 closefrom(STDERR_FILENO + 1);-
506-
507 argv[0] = shell;-
508 argv[1] = "-c";-
509 argv[2] = xstrdup(cmd);-
510 argv[3] = NULL;-
511-
512 execv(argv[0], argv);-
513 error("Unable to execute '%.100s': %s", cmd, strerror(errno));-
514 /* Die with signal to make this error apparent to parent. */-
515 signal(SIGTERM, SIG_DFL);-
516 kill(getpid(), SIGTERM);-
517 _exit(1);-
518 }
never executed: end of block
0
519 /* Parent. */-
520 if (pid < 0)
pid < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
521 fatal("%s: fork: %.100s", __func__, strerror(errno));
never executed: fatal("%s: fork: %.100s", __func__, strerror( (*__errno_location ()) ));
0
522-
523 close(devnull);-
524-
525 while (waitpid(pid, &status, 0) == -1) {
waitpid(pid, &status, 0) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
526 if (errno != EINTR && errno != EAGAIN)
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEnever evaluated
(*__errno_location ()) != 11Description
TRUEnever evaluated
FALSEnever evaluated
0
527 fatal("%s: waitpid: %s", __func__, strerror(errno));
never executed: fatal("%s: waitpid: %s", __func__, strerror( (*__errno_location ()) ));
0
528 }
never executed: end of block
0
529 if (!WIFEXITED(status)) {
! ((( status ) & 0x7f) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
530 error("command '%.100s' exited abnormally", cmd);-
531 return -1;
never executed: return -1;
0
532 }-
533 debug3("command returned status %d", WEXITSTATUS(status));-
534 return WEXITSTATUS(status);
never executed: return ((( status ) & 0xff00) >> 8) ;
0
535}-
536-
537/*-
538 * Parse and execute a Match directive.-
539 */-
540static int-
541match_cfg_line(Options *options, char **condition, struct passwd *pw,-
542 const char *host_arg, const char *original_host, int post_canon,-
543 const char *filename, int linenum)-
544{-
545 char *arg, *oattrib, *attrib, *cmd, *cp = *condition, *host, *criteria;-
546 const char *ruser;-
547 int r, port, this_result, result = 1, attributes = 0, negate;-
548 char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV];-
549 char uidstr[32];-
550-
551 /*-
552 * Configuration is likely to be incomplete at this point so we-
553 * must be prepared to use default values.-
554 */-
555 port = options->port <= 0 ? default_ssh_port() : options->port;
options->port <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
556 ruser = options->user == NULL ? pw->pw_name : options->user;
options->user == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
557 if (post_canon) {
post_canonDescription
TRUEnever evaluated
FALSEnever evaluated
0
558 host = xstrdup(options->hostname);-
559 } else if (options->hostname != NULL) {
never executed: end of block
options->hostn...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
560 /* NB. Please keep in sync with ssh.c:main() */-
561 host = percent_expand(options->hostname,-
562 "h", host_arg, (char *)NULL);-
563 } else {
never executed: end of block
0
564 host = xstrdup(host_arg);-
565 }
never executed: end of block
0
566-
567 debug2("checking match for '%s' host %s originally %s",-
568 cp, host, original_host);-
569 while ((oattrib = attrib = strdelim(&cp)) && *attrib != '\0') {
(oattrib = att...strdelim(&cp))Description
TRUEnever evaluated
FALSEnever evaluated
*attrib != '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
570 criteria = NULL;-
571 this_result = 1;-
572 if ((negate = attrib[0] == '!'))
(negate = attrib[0] == '!')Description
TRUEnever evaluated
FALSEnever evaluated
0
573 attrib++;
never executed: attrib++;
0
574 /* criteria "all" and "canonical" have no argument */-
575 if (strcasecmp(attrib, "all") == 0) {
strcasecmp(attrib, "all") == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
576 if (attributes > 1 ||
attributes > 1Description
TRUEnever evaluated
FALSEnever evaluated
0
577 ((arg = strdelim(&cp)) != NULL && *arg != '\0')) {
(arg = strdeli...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
*arg != '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
578 error("%.200s line %d: '%s' cannot be combined "-
579 "with other Match attributes",-
580 filename, linenum, oattrib);-
581 result = -1;-
582 goto out;
never executed: goto out;
0
583 }-
584 if (result)
resultDescription
TRUEnever evaluated
FALSEnever evaluated
0
585 result = negate ? 0 : 1;
never executed: result = negate ? 0 : 1;
negateDescription
TRUEnever evaluated
FALSEnever evaluated
0
586 goto out;
never executed: goto out;
0
587 }-
588 attributes++;-
589 if (strcasecmp(attrib, "canonical") == 0) {
strcasecmp(att...nonical") == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
590 r = !!post_canon; /* force bitmask member to boolean */-
591 if (r == (negate ? 1 : 0))
r == (negate ? 1 : 0)Description
TRUEnever evaluated
FALSEnever evaluated
negateDescription
TRUEnever evaluated
FALSEnever evaluated
0
592 this_result = result = 0;
never executed: this_result = result = 0;
0
593 debug3("%.200s line %d: %smatched '%s'",-
594 filename, linenum,-
595 this_result ? "" : "not ", oattrib);-
596 continue;
never executed: continue;
0
597 }-
598 /* All other criteria require an argument */-
599 if ((arg = strdelim(&cp)) == NULL || *arg == '\0') {
(arg = strdeli...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
600 error("Missing Match criteria for %s", attrib);-
601 result = -1;-
602 goto out;
never executed: goto out;
0
603 }-
604 if (strcasecmp(attrib, "host") == 0) {
strcasecmp(att..., "host") == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
605 criteria = xstrdup(host);-
606 r = match_hostname(host, arg) == 1;-
607 if (r == (negate ? 1 : 0))
r == (negate ? 1 : 0)Description
TRUEnever evaluated
FALSEnever evaluated
negateDescription
TRUEnever evaluated
FALSEnever evaluated
0
608 this_result = result = 0;
never executed: this_result = result = 0;
0
609 } else if (strcasecmp(attrib, "originalhost") == 0) {
never executed: end of block
strcasecmp(att...nalhost") == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
610 criteria = xstrdup(original_host);-
611 r = match_hostname(original_host, arg) == 1;-
612 if (r == (negate ? 1 : 0))
r == (negate ? 1 : 0)Description
TRUEnever evaluated
FALSEnever evaluated
negateDescription
TRUEnever evaluated
FALSEnever evaluated
0
613 this_result = result = 0;
never executed: this_result = result = 0;
0
614 } else if (strcasecmp(attrib, "user") == 0) {
never executed: end of block
strcasecmp(att..., "user") == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
615 criteria = xstrdup(ruser);-
616 r = match_pattern_list(ruser, arg, 0) == 1;-
617 if (r == (negate ? 1 : 0))
r == (negate ? 1 : 0)Description
TRUEnever evaluated
FALSEnever evaluated
negateDescription
TRUEnever evaluated
FALSEnever evaluated
0
618 this_result = result = 0;
never executed: this_result = result = 0;
0
619 } else if (strcasecmp(attrib, "localuser") == 0) {
never executed: end of block
strcasecmp(att...caluser") == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
620 criteria = xstrdup(pw->pw_name);-
621 r = match_pattern_list(pw->pw_name, arg, 0) == 1;-
622 if (r == (negate ? 1 : 0))
r == (negate ? 1 : 0)Description
TRUEnever evaluated
FALSEnever evaluated
negateDescription
TRUEnever evaluated
FALSEnever evaluated
0
623 this_result = result = 0;
never executed: this_result = result = 0;
0
624 } else if (strcasecmp(attrib, "exec") == 0) {
never executed: end of block
strcasecmp(att..., "exec") == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
625 if (gethostname(thishost, sizeof(thishost)) == -1)
gethostname(th...ishost)) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
626 fatal("gethostname: %s", strerror(errno));
never executed: fatal("gethostname: %s", strerror( (*__errno_location ()) ));
0
627 strlcpy(shorthost, thishost, sizeof(shorthost));-
628 shorthost[strcspn(thishost, ".")] = '\0';-
629 snprintf(portstr, sizeof(portstr), "%d", port);-
630 snprintf(uidstr, sizeof(uidstr), "%llu",-
631 (unsigned long long)pw->pw_uid);-
632-
633 cmd = percent_expand(arg,-
634 "L", shorthost,-
635 "d", pw->pw_dir,-
636 "h", host,-
637 "l", thishost,-
638 "n", original_host,-
639 "p", portstr,-
640 "r", ruser,-
641 "u", pw->pw_name,-
642 "i", uidstr,-
643 (char *)NULL);-
644 if (result != 1) {
result != 1Description
TRUEnever evaluated
FALSEnever evaluated
0
645 /* skip execution if prior predicate failed */-
646 debug3("%.200s line %d: skipped exec "-
647 "\"%.100s\"", filename, linenum, cmd);-
648 free(cmd);-
649 continue;
never executed: continue;
0
650 }-
651 r = execute_in_shell(cmd);-
652 if (r == -1) {
r == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
653 fatal("%.200s line %d: match exec "-
654 "'%.100s' error", filename,-
655 linenum, cmd);-
656 }
never executed: end of block
0
657 criteria = xstrdup(cmd);-
658 free(cmd);-
659 /* Force exit status to boolean */-
660 r = r == 0;-
661 if (r == (negate ? 1 : 0))
r == (negate ? 1 : 0)Description
TRUEnever evaluated
FALSEnever evaluated
negateDescription
TRUEnever evaluated
FALSEnever evaluated
0
662 this_result = result = 0;
never executed: this_result = result = 0;
0
663 } else {
never executed: end of block
0
664 error("Unsupported Match attribute %s", attrib);-
665 result = -1;-
666 goto out;
never executed: goto out;
0
667 }-
668 debug3("%.200s line %d: %smatched '%s \"%.100s\"' ",-
669 filename, linenum, this_result ? "": "not ",-
670 oattrib, criteria);-
671 free(criteria);-
672 }
never executed: end of block
0
673 if (attributes == 0) {
attributes == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
674 error("One or more attributes required for Match");-
675 result = -1;-
676 goto out;
never executed: goto out;
0
677 }-
678 out:
code before this statement never executed: out:
0
679 if (result != -1)
result != -1Description
TRUEnever evaluated
FALSEnever evaluated
0
680 debug2("match %sfound", result ? "" : "not ");
never executed: debug2("match %sfound", result ? "" : "not ");
0
681 *condition = cp;-
682 free(host);-
683 return result;
never executed: return result;
0
684}-
685-
686/* Remove environment variable by pattern */-
687static void-
688rm_env(Options *options, const char *arg, const char *filename, int linenum)-
689{-
690 int i, j;-
691 char *cp;-
692-
693 /* Remove an environment variable */-
694 for (i = 0; i < options->num_send_env; ) {
i < options->num_send_envDescription
TRUEnever evaluated
FALSEnever evaluated
0
695 cp = xstrdup(options->send_env[i]);-
696 if (!match_pattern(cp, arg + 1)) {
!match_pattern(cp, arg + 1)Description
TRUEnever evaluated
FALSEnever evaluated
0
697 free(cp);-
698 i++;-
699 continue;
never executed: continue;
0
700 }-
701 debug3("%s line %d: removing environment %s",-
702 filename, linenum, cp);-
703 free(cp);-
704 free(options->send_env[i]);-
705 options->send_env[i] = NULL;-
706 for (j = i; j < options->num_send_env - 1; j++) {
j < options->num_send_env - 1Description
TRUEnever evaluated
FALSEnever evaluated
0
707 options->send_env[j] = options->send_env[j + 1];-
708 options->send_env[j + 1] = NULL;-
709 }
never executed: end of block
0
710 options->num_send_env--;-
711 /* NB. don't increment i */-
712 }
never executed: end of block
0
713}
never executed: end of block
0
714-
715/*-
716 * Returns the number of the token pointed to by cp or oBadOption.-
717 */-
718static OpCodes-
719parse_token(const char *cp, const char *filename, int linenum,-
720 const char *ignored_unknown)-
721{-
722 int i;-
723-
724 for (i = 0; keywords[i].name; i++)
keywords[i].nameDescription
TRUEnever evaluated
FALSEnever evaluated
0
725 if (strcmp(cp, keywords[i].name) == 0)
never executed: __result = (((const unsigned char *) (const char *) ( cp ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( keywords[i].name ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
726 return keywords[i].opcode;
never executed: return keywords[i].opcode;
0
727 if (ignored_unknown != NULL &&
ignored_unknown != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
728 match_pattern_list(cp, ignored_unknown, 1) == 1)
match_pattern_...known, 1) == 1Description
TRUEnever evaluated
FALSEnever evaluated
0
729 return oIgnoredUnknownOption;
never executed: return oIgnoredUnknownOption;
0
730 error("%s: line %d: Bad configuration option: %s",-
731 filename, linenum, cp);-
732 return oBadOption;
never executed: return oBadOption;
0
733}-
734-
735/* Multistate option parsing */-
736struct multistate {-
737 char *key;-
738 int value;-
739};-
740static const struct multistate multistate_flag[] = {-
741 { "true", 1 },-
742 { "false", 0 },-
743 { "yes", 1 },-
744 { "no", 0 },-
745 { NULL, -1 }-
746};-
747static const struct multistate multistate_yesnoask[] = {-
748 { "true", 1 },-
749 { "false", 0 },-
750 { "yes", 1 },-
751 { "no", 0 },-
752 { "ask", 2 },-
753 { NULL, -1 }-
754};-
755static const struct multistate multistate_strict_hostkey[] = {-
756 { "true", SSH_STRICT_HOSTKEY_YES },-
757 { "false", SSH_STRICT_HOSTKEY_OFF },-
758 { "yes", SSH_STRICT_HOSTKEY_YES },-
759 { "no", SSH_STRICT_HOSTKEY_OFF },-
760 { "ask", SSH_STRICT_HOSTKEY_ASK },-
761 { "off", SSH_STRICT_HOSTKEY_OFF },-
762 { "accept-new", SSH_STRICT_HOSTKEY_NEW },-
763 { NULL, -1 }-
764};-
765static const struct multistate multistate_yesnoaskconfirm[] = {-
766 { "true", 1 },-
767 { "false", 0 },-
768 { "yes", 1 },-
769 { "no", 0 },-
770 { "ask", 2 },-
771 { "confirm", 3 },-
772 { NULL, -1 }-
773};-
774static const struct multistate multistate_addressfamily[] = {-
775 { "inet", AF_INET },-
776 { "inet6", AF_INET6 },-
777 { "any", AF_UNSPEC },-
778 { NULL, -1 }-
779};-
780static const struct multistate multistate_controlmaster[] = {-
781 { "true", SSHCTL_MASTER_YES },-
782 { "yes", SSHCTL_MASTER_YES },-
783 { "false", SSHCTL_MASTER_NO },-
784 { "no", SSHCTL_MASTER_NO },-
785 { "auto", SSHCTL_MASTER_AUTO },-
786 { "ask", SSHCTL_MASTER_ASK },-
787 { "autoask", SSHCTL_MASTER_AUTO_ASK },-
788 { NULL, -1 }-
789};-
790static const struct multistate multistate_tunnel[] = {-
791 { "ethernet", SSH_TUNMODE_ETHERNET },-
792 { "point-to-point", SSH_TUNMODE_POINTOPOINT },-
793 { "true", SSH_TUNMODE_DEFAULT },-
794 { "yes", SSH_TUNMODE_DEFAULT },-
795 { "false", SSH_TUNMODE_NO },-
796 { "no", SSH_TUNMODE_NO },-
797 { NULL, -1 }-
798};-
799static const struct multistate multistate_requesttty[] = {-
800 { "true", REQUEST_TTY_YES },-
801 { "yes", REQUEST_TTY_YES },-
802 { "false", REQUEST_TTY_NO },-
803 { "no", REQUEST_TTY_NO },-
804 { "force", REQUEST_TTY_FORCE },-
805 { "auto", REQUEST_TTY_AUTO },-
806 { NULL, -1 }-
807};-
808static const struct multistate multistate_canonicalizehostname[] = {-
809 { "true", SSH_CANONICALISE_YES },-
810 { "false", SSH_CANONICALISE_NO },-
811 { "yes", SSH_CANONICALISE_YES },-
812 { "no", SSH_CANONICALISE_NO },-
813 { "always", SSH_CANONICALISE_ALWAYS },-
814 { NULL, -1 }-
815};-
816-
817/*-
818 * Processes a single option line as used in the configuration files. This-
819 * only sets those values that have not already been set.-
820 */-
821int-
822process_config_line(Options *options, struct passwd *pw, const char *host,-
823 const char *original_host, char *line, const char *filename,-
824 int linenum, int *activep, int flags)-
825{-
826 return process_config_line_depth(options, pw, host, original_host,
never executed: return process_config_line_depth(options, pw, host, original_host, line, filename, linenum, activep, flags, 0);
0
827 line, filename, linenum, activep, flags, 0);
never executed: return process_config_line_depth(options, pw, host, original_host, line, filename, linenum, activep, flags, 0);
0
828}-
829-
830#define WHITESPACE " \t\r\n"-
831static int-
832process_config_line_depth(Options *options, struct passwd *pw, const char *host,-
833 const char *original_host, char *line, const char *filename,-
834 int linenum, int *activep, int flags, int depth)-
835{-
836 char *s, **charptr, *endofnumber, *keyword, *arg, *arg2;-
837 char **cpptr, fwdarg[256];-
838 u_int i, *uintptr, max_entries = 0;-
839 int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0;-
840 int remotefwd, dynamicfwd;-
841 LogLevel *log_level_ptr;-
842 SyslogFacility *log_facility_ptr;-
843 long long val64;-
844 size_t len;-
845 struct Forward fwd;-
846 const struct multistate *multistate_ptr;-
847 struct allowed_cname *cname;-
848 glob_t gl;-
849 const char *errstr;-
850-
851 if (activep == NULL) { /* We are processing a command line directive */
activep == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
852 cmdline = 1;-
853 activep = &cmdline;-
854 }
never executed: end of block
0
855-
856 /* Strip trailing whitespace. Allow \f (form feed) at EOL only */-
857 if ((len = strlen(line)) == 0)
(len = strlen(line)) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
858 return 0;
never executed: return 0;
0
859 for (len--; len > 0; len--) {
len > 0Description
TRUEnever evaluated
FALSEnever evaluated
0
860 if (strchr(WHITESPACE "\f", line[len]) == NULL)
(__extension__...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
__builtin_cons... ( line[len] )Description
TRUEnever evaluated
FALSEnever evaluated
!__builtin_con...\t\r\n" "\f" )Description
TRUEnever evaluated
FALSEnever evaluated
( line[len] ) == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
861 break;
never executed: break;
0
862 line[len] = '\0';-
863 }
never executed: end of block
0
864-
865 s = line;-
866 /* Get the keyword. (Each line is supposed to begin with a keyword). */-
867 if ((keyword = strdelim(&s)) == NULL)
(keyword = str...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
868 return 0;
never executed: return 0;
0
869 /* Ignore leading whitespace. */-
870 if (*keyword == '\0')
*keyword == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
871 keyword = strdelim(&s);
never executed: keyword = strdelim(&s);
0
872 if (keyword == NULL || !*keyword || *keyword == '\n' || *keyword == '#')
keyword == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
!*keywordDescription
TRUEnever evaluated
FALSEnever evaluated
*keyword == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
*keyword == '#'Description
TRUEnever evaluated
FALSEnever evaluated
0
873 return 0;
never executed: return 0;
0
874 /* Match lowercase keyword */-
875 lowercase(keyword);-
876-
877 opcode = parse_token(keyword, filename, linenum,-
878 options->ignored_unknown);-
879-
880 switch (opcode) {-
881 case oBadOption:
never executed: case oBadOption:
0
882 /* don't panic, but count bad options */-
883 return -1;
never executed: return -1;
0
884 case oIgnore:
never executed: case oIgnore:
0
885 return 0;
never executed: return 0;
0
886 case oIgnoredUnknownOption:
never executed: case oIgnoredUnknownOption:
0
887 debug("%s line %d: Ignored unknown option \"%s\"",-
888 filename, linenum, keyword);-
889 return 0;
never executed: return 0;
0
890 case oConnectTimeout:
never executed: case oConnectTimeout:
0
891 intptr = &options->connection_timeout;-
892parse_time:
code before this statement never executed: parse_time:
0
893 arg = strdelim(&s);-
894 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
895 fatal("%s line %d: missing time value.",
never executed: fatal("%s line %d: missing time value.", filename, linenum);
0
896 filename, linenum);
never executed: fatal("%s line %d: missing time value.", filename, linenum);
0
897 if (strcmp(arg, "none") == 0)
never executed: __result = (((const unsigned char *) (const char *) ( arg ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
898 value = -1;
never executed: value = -1;
0
899 else if ((value = convtime(arg)) == -1)
(value = convtime(arg)) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
900 fatal("%s line %d: invalid time value.",
never executed: fatal("%s line %d: invalid time value.", filename, linenum);
0
901 filename, linenum);
never executed: fatal("%s line %d: invalid time value.", filename, linenum);
0
902 if (*activep && *intptr == -1)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
*intptr == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
903 *intptr = value;
never executed: *intptr = value;
0
904 break;
never executed: break;
0
905-
906 case oForwardAgent:
never executed: case oForwardAgent:
0
907 intptr = &options->forward_agent;-
908 parse_flag:
code before this statement never executed: parse_flag:
0
909 multistate_ptr = multistate_flag;-
910 parse_multistate:
code before this statement never executed: parse_multistate:
0
911 arg = strdelim(&s);-
912 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
913 fatal("%s line %d: missing argument.",
never executed: fatal("%s line %d: missing argument.", filename, linenum);
0
914 filename, linenum);
never executed: fatal("%s line %d: missing argument.", filename, linenum);
0
915 value = -1;-
916 for (i = 0; multistate_ptr[i].key != NULL; i++) {
multistate_ptr...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
917 if (strcasecmp(arg, multistate_ptr[i].key) == 0) {
strcasecmp(arg...r[i].key) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
918 value = multistate_ptr[i].value;-
919 break;
never executed: break;
0
920 }-
921 }
never executed: end of block
0
922 if (value == -1)
value == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
923 fatal("%s line %d: unsupported option \"%s\".",
never executed: fatal("%s line %d: unsupported option \"%s\".", filename, linenum, arg);
0
924 filename, linenum, arg);
never executed: fatal("%s line %d: unsupported option \"%s\".", filename, linenum, arg);
0
925 if (*activep && *intptr == -1)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
*intptr == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
926 *intptr = value;
never executed: *intptr = value;
0
927 break;
never executed: break;
0
928-
929 case oForwardX11:
never executed: case oForwardX11:
0
930 intptr = &options->forward_x11;-
931 goto parse_flag;
never executed: goto parse_flag;
0
932-
933 case oForwardX11Trusted:
never executed: case oForwardX11Trusted:
0
934 intptr = &options->forward_x11_trusted;-
935 goto parse_flag;
never executed: goto parse_flag;
0
936-
937 case oForwardX11Timeout:
never executed: case oForwardX11Timeout:
0
938 intptr = &options->forward_x11_timeout;-
939 goto parse_time;
never executed: goto parse_time;
0
940-
941 case oGatewayPorts:
never executed: case oGatewayPorts:
0
942 intptr = &options->fwd_opts.gateway_ports;-
943 goto parse_flag;
never executed: goto parse_flag;
0
944-
945 case oExitOnForwardFailure:
never executed: case oExitOnForwardFailure:
0
946 intptr = &options->exit_on_forward_failure;-
947 goto parse_flag;
never executed: goto parse_flag;
0
948-
949 case oPasswordAuthentication:
never executed: case oPasswordAuthentication:
0
950 intptr = &options->password_authentication;-
951 goto parse_flag;
never executed: goto parse_flag;
0
952-
953 case oKbdInteractiveAuthentication:
never executed: case oKbdInteractiveAuthentication:
0
954 intptr = &options->kbd_interactive_authentication;-
955 goto parse_flag;
never executed: goto parse_flag;
0
956-
957 case oKbdInteractiveDevices:
never executed: case oKbdInteractiveDevices:
0
958 charptr = &options->kbd_interactive_devices;-
959 goto parse_string;
never executed: goto parse_string;
0
960-
961 case oPubkeyAuthentication:
never executed: case oPubkeyAuthentication:
0
962 intptr = &options->pubkey_authentication;-
963 goto parse_flag;
never executed: goto parse_flag;
0
964-
965 case oHostbasedAuthentication:
never executed: case oHostbasedAuthentication:
0
966 intptr = &options->hostbased_authentication;-
967 goto parse_flag;
never executed: goto parse_flag;
0
968-
969 case oChallengeResponseAuthentication:
never executed: case oChallengeResponseAuthentication:
0
970 intptr = &options->challenge_response_authentication;-
971 goto parse_flag;
never executed: goto parse_flag;
0
972-
973 case oGssAuthentication:
never executed: case oGssAuthentication:
0
974 intptr = &options->gss_authentication;-
975 goto parse_flag;
never executed: goto parse_flag;
0
976-
977 case oGssDelegateCreds:
never executed: case oGssDelegateCreds:
0
978 intptr = &options->gss_deleg_creds;-
979 goto parse_flag;
never executed: goto parse_flag;
0
980-
981 case oBatchMode:
never executed: case oBatchMode:
0
982 intptr = &options->batch_mode;-
983 goto parse_flag;
never executed: goto parse_flag;
0
984-
985 case oCheckHostIP:
never executed: case oCheckHostIP:
0
986 intptr = &options->check_host_ip;-
987 goto parse_flag;
never executed: goto parse_flag;
0
988-
989 case oVerifyHostKeyDNS:
never executed: case oVerifyHostKeyDNS:
0
990 intptr = &options->verify_host_key_dns;-
991 multistate_ptr = multistate_yesnoask;-
992 goto parse_multistate;
never executed: goto parse_multistate;
0
993-
994 case oStrictHostKeyChecking:
never executed: case oStrictHostKeyChecking:
0
995 intptr = &options->strict_host_key_checking;-
996 multistate_ptr = multistate_strict_hostkey;-
997 goto parse_multistate;
never executed: goto parse_multistate;
0
998-
999 case oCompression:
never executed: case oCompression:
0
1000 intptr = &options->compression;-
1001 goto parse_flag;
never executed: goto parse_flag;
0
1002-
1003 case oTCPKeepAlive:
never executed: case oTCPKeepAlive:
0
1004 intptr = &options->tcp_keep_alive;-
1005 goto parse_flag;
never executed: goto parse_flag;
0
1006-
1007 case oNoHostAuthenticationForLocalhost:
never executed: case oNoHostAuthenticationForLocalhost:
0
1008 intptr = &options->no_host_authentication_for_localhost;-
1009 goto parse_flag;
never executed: goto parse_flag;
0
1010-
1011 case oNumberOfPasswordPrompts:
never executed: case oNumberOfPasswordPrompts:
0
1012 intptr = &options->number_of_password_prompts;-
1013 goto parse_int;
never executed: goto parse_int;
0
1014-
1015 case oRekeyLimit:
never executed: case oRekeyLimit:
0
1016 arg = strdelim(&s);-
1017 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1018 fatal("%.200s line %d: Missing argument.", filename,
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1019 linenum);
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1020 if (strcmp(arg, "default") == 0) {
never executed: __result = (((const unsigned char *) (const char *) ( arg ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( "default" ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1021 val64 = 0;-
1022 } else {
never executed: end of block
0
1023 if (scan_scaled(arg, &val64) == -1)
scan_scaled(arg, &val64) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1024 fatal("%.200s line %d: Bad number '%s': %s",
never executed: fatal("%.200s line %d: Bad number '%s': %s", filename, linenum, arg, strerror( (*__errno_location ()) ));
0
1025 filename, linenum, arg, strerror(errno));
never executed: fatal("%.200s line %d: Bad number '%s': %s", filename, linenum, arg, strerror( (*__errno_location ()) ));
0
1026 if (val64 != 0 && val64 < 16)
val64 != 0Description
TRUEnever evaluated
FALSEnever evaluated
val64 < 16Description
TRUEnever evaluated
FALSEnever evaluated
0
1027 fatal("%.200s line %d: RekeyLimit too small",
never executed: fatal("%.200s line %d: RekeyLimit too small", filename, linenum);
0
1028 filename, linenum);
never executed: fatal("%.200s line %d: RekeyLimit too small", filename, linenum);
0
1029 }
never executed: end of block
0
1030 if (*activep && options->rekey_limit == -1)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
options->rekey_limit == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1031 options->rekey_limit = val64;
never executed: options->rekey_limit = val64;
0
1032 if (s != NULL) { /* optional rekey interval present */
s != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1033 if (strcmp(s, "none") == 0) {
never executed: __result = (((const unsigned char *) (const char *) ( s ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1034 (void)strdelim(&s); /* discard */-
1035 break;
never executed: break;
0
1036 }-
1037 intptr = &options->rekey_interval;-
1038 goto parse_time;
never executed: goto parse_time;
0
1039 }-
1040 break;
never executed: break;
0
1041-
1042 case oIdentityFile:
never executed: case oIdentityFile:
0
1043 arg = strdelim(&s);-
1044 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1045 fatal("%.200s line %d: Missing argument.", filename, linenum);
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1046 if (*activep) {
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
0
1047 intptr = &options->num_identity_files;-
1048 if (*intptr >= SSH_MAX_IDENTITY_FILES)
*intptr >= 100Description
TRUEnever evaluated
FALSEnever evaluated
0
1049 fatal("%.200s line %d: Too many identity files specified (max %d).",
never executed: fatal("%.200s line %d: Too many identity files specified (max %d).", filename, linenum, 100);
0
1050 filename, linenum, SSH_MAX_IDENTITY_FILES);
never executed: fatal("%.200s line %d: Too many identity files specified (max %d).", filename, linenum, 100);
0
1051 add_identity_file(options, NULL,-
1052 arg, flags & SSHCONF_USERCONF);-
1053 }
never executed: end of block
0
1054 break;
never executed: break;
0
1055-
1056 case oCertificateFile:
never executed: case oCertificateFile:
0
1057 arg = strdelim(&s);-
1058 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1059 fatal("%.200s line %d: Missing argument.",
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1060 filename, linenum);
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1061 if (*activep) {
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
0
1062 intptr = &options->num_certificate_files;-
1063 if (*intptr >= SSH_MAX_CERTIFICATE_FILES) {
*intptr >= 100Description
TRUEnever evaluated
FALSEnever evaluated
0
1064 fatal("%.200s line %d: Too many certificate "-
1065 "files specified (max %d).",-
1066 filename, linenum,-
1067 SSH_MAX_CERTIFICATE_FILES);-
1068 }
never executed: end of block
0
1069 add_certificate_file(options, arg,-
1070 flags & SSHCONF_USERCONF);-
1071 }
never executed: end of block
0
1072 break;
never executed: break;
0
1073-
1074 case oXAuthLocation:
never executed: case oXAuthLocation:
0
1075 charptr=&options->xauth_location;-
1076 goto parse_string;
never executed: goto parse_string;
0
1077-
1078 case oUser:
never executed: case oUser:
0
1079 charptr = &options->user;-
1080parse_string:
code before this statement never executed: parse_string:
0
1081 arg = strdelim(&s);-
1082 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1083 fatal("%.200s line %d: Missing argument.",
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1084 filename, linenum);
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1085 if (*activep && *charptr == NULL)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
*charptr == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1086 *charptr = xstrdup(arg);
never executed: *charptr = xstrdup(arg);
0
1087 break;
never executed: break;
0
1088-
1089 case oGlobalKnownHostsFile:
never executed: case oGlobalKnownHostsFile:
0
1090 cpptr = (char **)&options->system_hostfiles;-
1091 uintptr = &options->num_system_hostfiles;-
1092 max_entries = SSH_MAX_HOSTS_FILES;-
1093parse_char_array:
code before this statement never executed: parse_char_array:
0
1094 if (*activep && *uintptr == 0) {
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
*uintptr == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1095 while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
(arg = strdeli...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
*arg != '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1096 if ((*uintptr) >= max_entries)
(*uintptr) >= max_entriesDescription
TRUEnever evaluated
FALSEnever evaluated
0
1097 fatal("%s line %d: "
never executed: fatal("%s line %d: " "too many authorized keys files.", filename, linenum);
0
1098 "too many authorized keys files.",
never executed: fatal("%s line %d: " "too many authorized keys files.", filename, linenum);
0
1099 filename, linenum);
never executed: fatal("%s line %d: " "too many authorized keys files.", filename, linenum);
0
1100 cpptr[(*uintptr)++] = xstrdup(arg);-
1101 }
never executed: end of block
0
1102 }
never executed: end of block
0
1103 return 0;
never executed: return 0;
0
1104-
1105 case oUserKnownHostsFile:
never executed: case oUserKnownHostsFile:
0
1106 cpptr = (char **)&options->user_hostfiles;-
1107 uintptr = &options->num_user_hostfiles;-
1108 max_entries = SSH_MAX_HOSTS_FILES;-
1109 goto parse_char_array;
never executed: goto parse_char_array;
0
1110-
1111 case oHostName:
never executed: case oHostName:
0
1112 charptr = &options->hostname;-
1113 goto parse_string;
never executed: goto parse_string;
0
1114-
1115 case oHostKeyAlias:
never executed: case oHostKeyAlias:
0
1116 charptr = &options->host_key_alias;-
1117 goto parse_string;
never executed: goto parse_string;
0
1118-
1119 case oPreferredAuthentications:
never executed: case oPreferredAuthentications:
0
1120 charptr = &options->preferred_authentications;-
1121 goto parse_string;
never executed: goto parse_string;
0
1122-
1123 case oBindAddress:
never executed: case oBindAddress:
0
1124 charptr = &options->bind_address;-
1125 goto parse_string;
never executed: goto parse_string;
0
1126-
1127 case oBindInterface:
never executed: case oBindInterface:
0
1128 charptr = &options->bind_interface;-
1129 goto parse_string;
never executed: goto parse_string;
0
1130-
1131 case oPKCS11Provider:
never executed: case oPKCS11Provider:
0
1132 charptr = &options->pkcs11_provider;-
1133 goto parse_string;
never executed: goto parse_string;
0
1134-
1135 case oProxyCommand:
never executed: case oProxyCommand:
0
1136 charptr = &options->proxy_command;-
1137 /* Ignore ProxyCommand if ProxyJump already specified */-
1138 if (options->jump_host != NULL)
options->jump_...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1139 charptr = &options->jump_host; /* Skip below */
never executed: charptr = &options->jump_host;
0
1140parse_command:
code before this statement never executed: parse_command:
0
1141 if (s == NULL)
s == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1142 fatal("%.200s line %d: Missing argument.", filename, linenum);
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1143 len = strspn(s, WHITESPACE "=");-
1144 if (*activep && *charptr == NULL)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
*charptr == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1145 *charptr = xstrdup(s + len);
never executed: *charptr = xstrdup(s + len);
0
1146 return 0;
never executed: return 0;
0
1147-
1148 case oProxyJump:
never executed: case oProxyJump:
0
1149 if (s == NULL) {
s == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1150 fatal("%.200s line %d: Missing argument.",-
1151 filename, linenum);-
1152 }
never executed: end of block
0
1153 len = strspn(s, WHITESPACE "=");-
1154 if (parse_jump(s + len, options, *activep) == -1) {
parse_jump(s +...activep) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1155 fatal("%.200s line %d: Invalid ProxyJump \"%s\"",-
1156 filename, linenum, s + len);-
1157 }
never executed: end of block
0
1158 return 0;
never executed: return 0;
0
1159-
1160 case oPort:
never executed: case oPort:
0
1161 intptr = &options->port;-
1162parse_int:
code before this statement never executed: parse_int:
0
1163 arg = strdelim(&s);-
1164 if ((errstr = atoi_err(arg, &value)) != NULL)
(errstr = atoi...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1165 fatal("%s line %d: integer value %s.",
never executed: fatal("%s line %d: integer value %s.", filename, linenum, errstr);
0
1166 filename, linenum, errstr);
never executed: fatal("%s line %d: integer value %s.", filename, linenum, errstr);
0
1167 if (*activep && *intptr == -1)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
*intptr == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1168 *intptr = value;
never executed: *intptr = value;
0
1169 break;
never executed: break;
0
1170-
1171 case oConnectionAttempts:
never executed: case oConnectionAttempts:
0
1172 intptr = &options->connection_attempts;-
1173 goto parse_int;
never executed: goto parse_int;
0
1174-
1175 case oCiphers:
never executed: case oCiphers:
0
1176 arg = strdelim(&s);-
1177 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1178 fatal("%.200s line %d: Missing argument.", filename, linenum);
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1179 if (*arg != '-' && !ciphers_valid(*arg == '+' ? arg + 1 : arg))
*arg != '-'Description
TRUEnever evaluated
FALSEnever evaluated
!ciphers_valid...arg + 1 : arg)Description
TRUEnever evaluated
FALSEnever evaluated
0
1180 fatal("%.200s line %d: Bad SSH2 cipher spec '%s'.",
never executed: fatal("%.200s line %d: Bad SSH2 cipher spec '%s'.", filename, linenum, arg ? arg : "<NONE>");
0
1181 filename, linenum, arg ? arg : "<NONE>");
never executed: fatal("%.200s line %d: Bad SSH2 cipher spec '%s'.", filename, linenum, arg ? arg : "<NONE>");
0
1182 if (*activep && options->ciphers == NULL)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
options->ciphe...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1183 options->ciphers = xstrdup(arg);
never executed: options->ciphers = xstrdup(arg);
0
1184 break;
never executed: break;
0
1185-
1186 case oMacs:
never executed: case oMacs:
0
1187 arg = strdelim(&s);-
1188 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1189 fatal("%.200s line %d: Missing argument.", filename, linenum);
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1190 if (*arg != '-' && !mac_valid(*arg == '+' ? arg + 1 : arg))
*arg != '-'Description
TRUEnever evaluated
FALSEnever evaluated
!mac_valid(*ar...arg + 1 : arg)Description
TRUEnever evaluated
FALSEnever evaluated
0
1191 fatal("%.200s line %d: Bad SSH2 Mac spec '%s'.",
never executed: fatal("%.200s line %d: Bad SSH2 Mac spec '%s'.", filename, linenum, arg ? arg : "<NONE>");
0
1192 filename, linenum, arg ? arg : "<NONE>");
never executed: fatal("%.200s line %d: Bad SSH2 Mac spec '%s'.", filename, linenum, arg ? arg : "<NONE>");
0
1193 if (*activep && options->macs == NULL)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
options->macs == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1194 options->macs = xstrdup(arg);
never executed: options->macs = xstrdup(arg);
0
1195 break;
never executed: break;
0
1196-
1197 case oKexAlgorithms:
never executed: case oKexAlgorithms:
0
1198 arg = strdelim(&s);-
1199 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1200 fatal("%.200s line %d: Missing argument.",
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1201 filename, linenum);
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1202 if (*arg != '-' &&
*arg != '-'Description
TRUEnever evaluated
FALSEnever evaluated
0
1203 !kex_names_valid(*arg == '+' ? arg + 1 : arg))
!kex_names_val...arg + 1 : arg)Description
TRUEnever evaluated
FALSEnever evaluated
0
1204 fatal("%.200s line %d: Bad SSH2 KexAlgorithms '%s'.",
never executed: fatal("%.200s line %d: Bad SSH2 KexAlgorithms '%s'.", filename, linenum, arg ? arg : "<NONE>");
0
1205 filename, linenum, arg ? arg : "<NONE>");
never executed: fatal("%.200s line %d: Bad SSH2 KexAlgorithms '%s'.", filename, linenum, arg ? arg : "<NONE>");
0
1206 if (*activep && options->kex_algorithms == NULL)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
options->kex_a...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1207 options->kex_algorithms = xstrdup(arg);
never executed: options->kex_algorithms = xstrdup(arg);
0
1208 break;
never executed: break;
0
1209-
1210 case oHostKeyAlgorithms:
never executed: case oHostKeyAlgorithms:
0
1211 charptr = &options->hostkeyalgorithms;-
1212parse_keytypes:
code before this statement never executed: parse_keytypes:
0
1213 arg = strdelim(&s);-
1214 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1215 fatal("%.200s line %d: Missing argument.",
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1216 filename, linenum);
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1217 if (*arg != '-' &&
*arg != '-'Description
TRUEnever evaluated
FALSEnever evaluated
0
1218 !sshkey_names_valid2(*arg == '+' ? arg + 1 : arg, 1))
!sshkey_names_... + 1 : arg, 1)Description
TRUEnever evaluated
FALSEnever evaluated
0
1219 fatal("%s line %d: Bad key types '%s'.",
never executed: fatal("%s line %d: Bad key types '%s'.", filename, linenum, arg ? arg : "<NONE>");
0
1220 filename, linenum, arg ? arg : "<NONE>");
never executed: fatal("%s line %d: Bad key types '%s'.", filename, linenum, arg ? arg : "<NONE>");
0
1221 if (*activep && *charptr == NULL)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
*charptr == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1222 *charptr = xstrdup(arg);
never executed: *charptr = xstrdup(arg);
0
1223 break;
never executed: break;
0
1224-
1225 case oCASignatureAlgorithms:
never executed: case oCASignatureAlgorithms:
0
1226 charptr = &options->ca_sign_algorithms;-
1227 goto parse_keytypes;
never executed: goto parse_keytypes;
0
1228-
1229 case oLogLevel:
never executed: case oLogLevel:
0
1230 log_level_ptr = &options->log_level;-
1231 arg = strdelim(&s);-
1232 value = log_level_number(arg);-
1233 if (value == SYSLOG_LEVEL_NOT_SET)
value == SYSLOG_LEVEL_NOT_SETDescription
TRUEnever evaluated
FALSEnever evaluated
0
1234 fatal("%.200s line %d: unsupported log level '%s'",
never executed: fatal("%.200s line %d: unsupported log level '%s'", filename, linenum, arg ? arg : "<NONE>");
0
1235 filename, linenum, arg ? arg : "<NONE>");
never executed: fatal("%.200s line %d: unsupported log level '%s'", filename, linenum, arg ? arg : "<NONE>");
0
1236 if (*activep && *log_level_ptr == SYSLOG_LEVEL_NOT_SET)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
*log_level_ptr..._LEVEL_NOT_SETDescription
TRUEnever evaluated
FALSEnever evaluated
0
1237 *log_level_ptr = (LogLevel) value;
never executed: *log_level_ptr = (LogLevel) value;
0
1238 break;
never executed: break;
0
1239-
1240 case oLogFacility:
never executed: case oLogFacility:
0
1241 log_facility_ptr = &options->log_facility;-
1242 arg = strdelim(&s);-
1243 value = log_facility_number(arg);-
1244 if (value == SYSLOG_FACILITY_NOT_SET)
value == SYSLO...CILITY_NOT_SETDescription
TRUEnever evaluated
FALSEnever evaluated
0
1245 fatal("%.200s line %d: unsupported log facility '%s'",
never executed: fatal("%.200s line %d: unsupported log facility '%s'", filename, linenum, arg ? arg : "<NONE>");
0
1246 filename, linenum, arg ? arg : "<NONE>");
never executed: fatal("%.200s line %d: unsupported log facility '%s'", filename, linenum, arg ? arg : "<NONE>");
0
1247 if (*log_facility_ptr == -1)
*log_facility_ptr == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1248 *log_facility_ptr = (SyslogFacility) value;
never executed: *log_facility_ptr = (SyslogFacility) value;
0
1249 break;
never executed: break;
0
1250-
1251 case oLocalForward:
never executed: case oLocalForward:
0
1252 case oRemoteForward:
never executed: case oRemoteForward:
0
1253 case oDynamicForward:
never executed: case oDynamicForward:
0
1254 arg = strdelim(&s);-
1255 if (arg == NULL || *arg == '\0')
arg == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1256 fatal("%.200s line %d: Missing port argument.",
never executed: fatal("%.200s line %d: Missing port argument.", filename, linenum);
0
1257 filename, linenum);
never executed: fatal("%.200s line %d: Missing port argument.", filename, linenum);
0
1258-
1259 remotefwd = (opcode == oRemoteForward);-
1260 dynamicfwd = (opcode == oDynamicForward);-
1261-
1262 if (!dynamicfwd) {
!dynamicfwdDescription
TRUEnever evaluated
FALSEnever evaluated
0
1263 arg2 = strdelim(&s);-
1264 if (arg2 == NULL || *arg2 == '\0') {
arg2 == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
*arg2 == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1265 if (remotefwd)
remotefwdDescription
TRUEnever evaluated
FALSEnever evaluated
0
1266 dynamicfwd = 1;
never executed: dynamicfwd = 1;
0
1267 else-
1268 fatal("%.200s line %d: Missing target "
never executed: fatal("%.200s line %d: Missing target " "argument.", filename, linenum);
0
1269 "argument.", filename, linenum);
never executed: fatal("%.200s line %d: Missing target " "argument.", filename, linenum);
0
1270 } else {-
1271 /* construct a string for parse_forward */-
1272 snprintf(fwdarg, sizeof(fwdarg), "%s:%s", arg,-
1273 arg2);-
1274 }
never executed: end of block
0
1275 }-
1276 if (dynamicfwd)
dynamicfwdDescription
TRUEnever evaluated
FALSEnever evaluated
0
1277 strlcpy(fwdarg, arg, sizeof(fwdarg));
never executed: strlcpy(fwdarg, arg, sizeof(fwdarg));
0
1278-
1279 if (parse_forward(&fwd, fwdarg, dynamicfwd, remotefwd) == 0)
parse_forward(...emotefwd) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1280 fatal("%.200s line %d: Bad forwarding specification.",
never executed: fatal("%.200s line %d: Bad forwarding specification.", filename, linenum);
0
1281 filename, linenum);
never executed: fatal("%.200s line %d: Bad forwarding specification.", filename, linenum);
0
1282-
1283 if (*activep) {
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
0
1284 if (remotefwd) {
remotefwdDescription
TRUEnever evaluated
FALSEnever evaluated
0
1285 add_remote_forward(options, &fwd);-
1286 } else {
never executed: end of block
0
1287 add_local_forward(options, &fwd);-
1288 }
never executed: end of block
0
1289 }-
1290 break;
never executed: break;
0
1291-
1292 case oClearAllForwardings:
never executed: case oClearAllForwardings:
0
1293 intptr = &options->clear_forwardings;-
1294 goto parse_flag;
never executed: goto parse_flag;
0
1295-
1296 case oHost:
never executed: case oHost:
0
1297 if (cmdline)
cmdlineDescription
TRUEnever evaluated
FALSEnever evaluated
0
1298 fatal("Host directive not supported as a command-line "
never executed: fatal("Host directive not supported as a command-line " "option");
0
1299 "option");
never executed: fatal("Host directive not supported as a command-line " "option");
0
1300 *activep = 0;-
1301 arg2 = NULL;-
1302 while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
(arg = strdeli...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
*arg != '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1303 if ((flags & SSHCONF_NEVERMATCH) != 0)
(flags & 8) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1304 break;
never executed: break;
0
1305 negated = *arg == '!';-
1306 if (negated)
negatedDescription
TRUEnever evaluated
FALSEnever evaluated
0
1307 arg++;
never executed: arg++;
0
1308 if (match_pattern(host, arg)) {
match_pattern(host, arg)Description
TRUEnever evaluated
FALSEnever evaluated
0
1309 if (negated) {
negatedDescription
TRUEnever evaluated
FALSEnever evaluated
0
1310 debug("%.200s line %d: Skipping Host "-
1311 "block because of negated match "-
1312 "for %.100s", filename, linenum,-
1313 arg);-
1314 *activep = 0;-
1315 break;
never executed: break;
0
1316 }-
1317 if (!*activep)
!*activepDescription
TRUEnever evaluated
FALSEnever evaluated
0
1318 arg2 = arg; /* logged below */
never executed: arg2 = arg;
0
1319 *activep = 1;-
1320 }
never executed: end of block
0
1321 }
never executed: end of block
0
1322 if (*activep)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
0
1323 debug("%.200s line %d: Applying options for %.100s",
never executed: debug("%.200s line %d: Applying options for %.100s", filename, linenum, arg2);
0
1324 filename, linenum, arg2);
never executed: debug("%.200s line %d: Applying options for %.100s", filename, linenum, arg2);
0
1325 /* Avoid garbage check below, as strdelim is done. */-
1326 return 0;
never executed: return 0;
0
1327-
1328 case oMatch:
never executed: case oMatch:
0
1329 if (cmdline)
cmdlineDescription
TRUEnever evaluated
FALSEnever evaluated
0
1330 fatal("Host directive not supported as a command-line "
never executed: fatal("Host directive not supported as a command-line " "option");
0
1331 "option");
never executed: fatal("Host directive not supported as a command-line " "option");
0
1332 value = match_cfg_line(options, &s, pw, host, original_host,-
1333 flags & SSHCONF_POSTCANON, filename, linenum);-
1334 if (value < 0)
value < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1335 fatal("%.200s line %d: Bad Match condition", filename,
never executed: fatal("%.200s line %d: Bad Match condition", filename, linenum);
0
1336 linenum);
never executed: fatal("%.200s line %d: Bad Match condition", filename, linenum);
0
1337 *activep = (flags & SSHCONF_NEVERMATCH) ? 0 : value;
(flags & 8)Description
TRUEnever evaluated
FALSEnever evaluated
0
1338 break;
never executed: break;
0
1339-
1340 case oEscapeChar:
never executed: case oEscapeChar:
0
1341 intptr = &options->escape_char;-
1342 arg = strdelim(&s);-
1343 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1344 fatal("%.200s line %d: Missing argument.", filename, linenum);
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1345 if (strcmp(arg, "none") == 0)
never executed: __result = (((const unsigned char *) (const char *) ( arg ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1346 value = SSH_ESCAPECHAR_NONE;
never executed: value = -2;
0
1347 else if (arg[1] == '\0')
arg[1] == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1348 value = (u_char) arg[0];
never executed: value = (u_char) arg[0];
0
1349 else if (arg[0] == '^' && arg[2] == 0 &&
arg[0] == '^'Description
TRUEnever evaluated
FALSEnever evaluated
arg[2] == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1350 (u_char) arg[1] >= 64 && (u_char) arg[1] < 128)
(u_char) arg[1] >= 64Description
TRUEnever evaluated
FALSEnever evaluated
(u_char) arg[1] < 128Description
TRUEnever evaluated
FALSEnever evaluated
0
1351 value = (u_char) arg[1] & 31;
never executed: value = (u_char) arg[1] & 31;
0
1352 else {-
1353 fatal("%.200s line %d: Bad escape character.",-
1354 filename, linenum);-
1355 /* NOTREACHED */-
1356 value = 0; /* Avoid compiler warning. */-
1357 }
never executed: end of block
0
1358 if (*activep && *intptr == -1)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
*intptr == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1359 *intptr = value;
never executed: *intptr = value;
0
1360 break;
never executed: break;
0
1361-
1362 case oAddressFamily:
never executed: case oAddressFamily:
0
1363 intptr = &options->address_family;-
1364 multistate_ptr = multistate_addressfamily;-
1365 goto parse_multistate;
never executed: goto parse_multistate;
0
1366-
1367 case oEnableSSHKeysign:
never executed: case oEnableSSHKeysign:
0
1368 intptr = &options->enable_ssh_keysign;-
1369 goto parse_flag;
never executed: goto parse_flag;
0
1370-
1371 case oIdentitiesOnly:
never executed: case oIdentitiesOnly:
0
1372 intptr = &options->identities_only;-
1373 goto parse_flag;
never executed: goto parse_flag;
0
1374-
1375 case oServerAliveInterval:
never executed: case oServerAliveInterval:
0
1376 intptr = &options->server_alive_interval;-
1377 goto parse_time;
never executed: goto parse_time;
0
1378-
1379 case oServerAliveCountMax:
never executed: case oServerAliveCountMax:
0
1380 intptr = &options->server_alive_count_max;-
1381 goto parse_int;
never executed: goto parse_int;
0
1382-
1383 case oSendEnv:
never executed: case oSendEnv:
0
1384 while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
(arg = strdeli...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
*arg != '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1385 if (strchr(arg, '=') != NULL)
(__extension__...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
__builtin_constant_p ( '=' )Description
TRUEnever evaluated
FALSEnever evaluated
!__builtin_constant_p ( arg )Description
TRUEnever evaluated
FALSEnever evaluated
( '=' ) == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1386 fatal("%s line %d: Invalid environment name.",
never executed: fatal("%s line %d: Invalid environment name.", filename, linenum);
0
1387 filename, linenum);
never executed: fatal("%s line %d: Invalid environment name.", filename, linenum);
0
1388 if (!*activep)
!*activepDescription
TRUEnever evaluated
FALSEnever evaluated
0
1389 continue;
never executed: continue;
0
1390 if (*arg == '-') {
*arg == '-'Description
TRUEnever evaluated
FALSEnever evaluated
0
1391 /* Removing an env var */-
1392 rm_env(options, arg, filename, linenum);-
1393 continue;
never executed: continue;
0
1394 } else {-
1395 /* Adding an env var */-
1396 if (options->num_send_env >= INT_MAX)
options->num_s... >= 0x7fffffffDescription
TRUEnever evaluated
FALSEnever evaluated
0
1397 fatal("%s line %d: too many send env.",
never executed: fatal("%s line %d: too many send env.", filename, linenum);
0
1398 filename, linenum);
never executed: fatal("%s line %d: too many send env.", filename, linenum);
0
1399 options->send_env = xrecallocarray(-
1400 options->send_env, options->num_send_env,-
1401 options->num_send_env + 1,-
1402 sizeof(*options->send_env));-
1403 options->send_env[options->num_send_env++] =-
1404 xstrdup(arg);-
1405 }
never executed: end of block
0
1406 }-
1407 break;
never executed: break;
0
1408-
1409 case oSetEnv:
never executed: case oSetEnv:
0
1410 value = options->num_setenv;-
1411 while ((arg = strdelimw(&s)) != NULL && *arg != '\0') {
(arg = strdeli...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
*arg != '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1412 if (strchr(arg, '=') == NULL)
(__extension__...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
__builtin_constant_p ( '=' )Description
TRUEnever evaluated
FALSEnever evaluated
!__builtin_constant_p ( arg )Description
TRUEnever evaluated
FALSEnever evaluated
( '=' ) == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1413 fatal("%s line %d: Invalid SetEnv.",
never executed: fatal("%s line %d: Invalid SetEnv.", filename, linenum);
0
1414 filename, linenum);
never executed: fatal("%s line %d: Invalid SetEnv.", filename, linenum);
0
1415 if (!*activep || value != 0)
!*activepDescription
TRUEnever evaluated
FALSEnever evaluated
value != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1416 continue;
never executed: continue;
0
1417 /* Adding a setenv var */-
1418 if (options->num_setenv >= INT_MAX)
options->num_s... >= 0x7fffffffDescription
TRUEnever evaluated
FALSEnever evaluated
0
1419 fatal("%s line %d: too many SetEnv.",
never executed: fatal("%s line %d: too many SetEnv.", filename, linenum);
0
1420 filename, linenum);
never executed: fatal("%s line %d: too many SetEnv.", filename, linenum);
0
1421 options->setenv = xrecallocarray(-
1422 options->setenv, options->num_setenv,-
1423 options->num_setenv + 1, sizeof(*options->setenv));-
1424 options->setenv[options->num_setenv++] = xstrdup(arg);-
1425 }
never executed: end of block
0
1426 break;
never executed: break;
0
1427-
1428 case oControlPath:
never executed: case oControlPath:
0
1429 charptr = &options->control_path;-
1430 goto parse_string;
never executed: goto parse_string;
0
1431-
1432 case oControlMaster:
never executed: case oControlMaster:
0
1433 intptr = &options->control_master;-
1434 multistate_ptr = multistate_controlmaster;-
1435 goto parse_multistate;
never executed: goto parse_multistate;
0
1436-
1437 case oControlPersist:
never executed: case oControlPersist:
0
1438 /* no/false/yes/true, or a time spec */-
1439 intptr = &options->control_persist;-
1440 arg = strdelim(&s);-
1441 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1442 fatal("%.200s line %d: Missing ControlPersist"
never executed: fatal("%.200s line %d: Missing ControlPersist" " argument.", filename, linenum);
0
1443 " argument.", filename, linenum);
never executed: fatal("%.200s line %d: Missing ControlPersist" " argument.", filename, linenum);
0
1444 value = 0;-
1445 value2 = 0; /* timeout */-
1446 if (strcmp(arg, "no") == 0 || strcmp(arg, "false") == 0)
never executed: __result = (((const unsigned char *) (const char *) ( arg ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( "no" ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( arg ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( "false" ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1447 value = 0;
never executed: value = 0;
0
1448 else if (strcmp(arg, "yes") == 0 || strcmp(arg, "true") == 0)
never executed: __result = (((const unsigned char *) (const char *) ( arg ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( "yes" ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( arg ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( "true" ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1449 value = 1;
never executed: value = 1;
0
1450 else if ((value2 = convtime(arg)) >= 0)
(value2 = convtime(arg)) >= 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1451 value = 1;
never executed: value = 1;
0
1452 else-
1453 fatal("%.200s line %d: Bad ControlPersist argument.",
never executed: fatal("%.200s line %d: Bad ControlPersist argument.", filename, linenum);
0
1454 filename, linenum);
never executed: fatal("%.200s line %d: Bad ControlPersist argument.", filename, linenum);
0
1455 if (*activep && *intptr == -1) {
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
*intptr == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1456 *intptr = value;-
1457 options->control_persist_timeout = value2;-
1458 }
never executed: end of block
0
1459 break;
never executed: break;
0
1460-
1461 case oHashKnownHosts:
never executed: case oHashKnownHosts:
0
1462 intptr = &options->hash_known_hosts;-
1463 goto parse_flag;
never executed: goto parse_flag;
0
1464-
1465 case oTunnel:
never executed: case oTunnel:
0
1466 intptr = &options->tun_open;-
1467 multistate_ptr = multistate_tunnel;-
1468 goto parse_multistate;
never executed: goto parse_multistate;
0
1469-
1470 case oTunnelDevice:
never executed: case oTunnelDevice:
0
1471 arg = strdelim(&s);-
1472 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1473 fatal("%.200s line %d: Missing argument.", filename, linenum);
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1474 value = a2tun(arg, &value2);-
1475 if (value == SSH_TUNID_ERR)
value == (0x7fffffff - 1)Description
TRUEnever evaluated
FALSEnever evaluated
0
1476 fatal("%.200s line %d: Bad tun device.", filename, linenum);
never executed: fatal("%.200s line %d: Bad tun device.", filename, linenum);
0
1477 if (*activep) {
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
0
1478 options->tun_local = value;-
1479 options->tun_remote = value2;-
1480 }
never executed: end of block
0
1481 break;
never executed: break;
0
1482-
1483 case oLocalCommand:
never executed: case oLocalCommand:
0
1484 charptr = &options->local_command;-
1485 goto parse_command;
never executed: goto parse_command;
0
1486-
1487 case oPermitLocalCommand:
never executed: case oPermitLocalCommand:
0
1488 intptr = &options->permit_local_command;-
1489 goto parse_flag;
never executed: goto parse_flag;
0
1490-
1491 case oRemoteCommand:
never executed: case oRemoteCommand:
0
1492 charptr = &options->remote_command;-
1493 goto parse_command;
never executed: goto parse_command;
0
1494-
1495 case oVisualHostKey:
never executed: case oVisualHostKey:
0
1496 intptr = &options->visual_host_key;-
1497 goto parse_flag;
never executed: goto parse_flag;
0
1498-
1499 case oInclude:
never executed: case oInclude:
0
1500 if (cmdline)
cmdlineDescription
TRUEnever evaluated
FALSEnever evaluated
0
1501 fatal("Include directive not supported as a "
never executed: fatal("Include directive not supported as a " "command-line option");
0
1502 "command-line option");
never executed: fatal("Include directive not supported as a " "command-line option");
0
1503 value = 0;-
1504 while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
(arg = strdeli...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
*arg != '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1505 /*-
1506 * Ensure all paths are anchored. User configuration-
1507 * files may begin with '~/' but system configurations-
1508 * must not. If the path is relative, then treat it-
1509 * as living in ~/.ssh for user configurations or-
1510 * /etc/ssh for system ones.-
1511 */-
1512 if (*arg == '~' && (flags & SSHCONF_USERCONF) == 0)
*arg == '~'Description
TRUEnever evaluated
FALSEnever evaluated
(flags & 2) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1513 fatal("%.200s line %d: bad include path %s.",
never executed: fatal("%.200s line %d: bad include path %s.", filename, linenum, arg);
0
1514 filename, linenum, arg);
never executed: fatal("%.200s line %d: bad include path %s.", filename, linenum, arg);
0
1515 if (*arg != '/' && *arg != '~') {
*arg != '/'Description
TRUEnever evaluated
FALSEnever evaluated
*arg != '~'Description
TRUEnever evaluated
FALSEnever evaluated
0
1516 xasprintf(&arg2, "%s/%s",-
1517 (flags & SSHCONF_USERCONF) ?-
1518 "~/" _PATH_SSH_USER_DIR : SSHDIR, arg);-
1519 } else
never executed: end of block
0
1520 arg2 = xstrdup(arg);
never executed: arg2 = xstrdup(arg);
0
1521 memset(&gl, 0, sizeof(gl));-
1522 r = glob(arg2, GLOB_TILDE, NULL, &gl);-
1523 if (r == GLOB_NOMATCH) {
r == (-3)Description
TRUEnever evaluated
FALSEnever evaluated
0
1524 debug("%.200s line %d: include %s matched no "-
1525 "files",filename, linenum, arg2);-
1526 free(arg2);-
1527 continue;
never executed: continue;
0
1528 } else if (r != 0 || gl.gl_pathc < 0)
r != 0Description
TRUEnever evaluated
FALSEnever evaluated
gl.gl_pathc < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1529 fatal("%.200s line %d: glob failed for %s.",
never executed: fatal("%.200s line %d: glob failed for %s.", filename, linenum, arg2);
0
1530 filename, linenum, arg2);
never executed: fatal("%.200s line %d: glob failed for %s.", filename, linenum, arg2);
0
1531 free(arg2);-
1532 oactive = *activep;-
1533 for (i = 0; i < (u_int)gl.gl_pathc; i++) {
i < (u_int)gl.gl_pathcDescription
TRUEnever evaluated
FALSEnever evaluated
0
1534 debug3("%.200s line %d: Including file %s "-
1535 "depth %d%s", filename, linenum,-
1536 gl.gl_pathv[i], depth,-
1537 oactive ? "" : " (parse only)");-
1538 r = read_config_file_depth(gl.gl_pathv[i],-
1539 pw, host, original_host, options,-
1540 flags | SSHCONF_CHECKPERM |-
1541 (oactive ? 0 : SSHCONF_NEVERMATCH),-
1542 activep, depth + 1);-
1543 if (r != 1 && errno != ENOENT) {
r != 1Description
TRUEnever evaluated
FALSEnever evaluated
(*__errno_location ()) != 2Description
TRUEnever evaluated
FALSEnever evaluated
0
1544 fatal("Can't open user config file "-
1545 "%.100s: %.100s", gl.gl_pathv[i],-
1546 strerror(errno));-
1547 }
never executed: end of block
0
1548 /*-
1549 * don't let Match in includes clobber the-
1550 * containing file's Match state.-
1551 */-
1552 *activep = oactive;-
1553 if (r != 1)
r != 1Description
TRUEnever evaluated
FALSEnever evaluated
0
1554 value = -1;
never executed: value = -1;
0
1555 }
never executed: end of block
0
1556 globfree(&gl);-
1557 }
never executed: end of block
0
1558 if (value != 0)
value != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1559 return value;
never executed: return value;
0
1560 break;
never executed: break;
0
1561-
1562 case oIPQoS:
never executed: case oIPQoS:
0
1563 arg = strdelim(&s);-
1564 if ((value = parse_ipqos(arg)) == -1)
(value = parse...os(arg)) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1565 fatal("%s line %d: Bad IPQoS value: %s",
never executed: fatal("%s line %d: Bad IPQoS value: %s", filename, linenum, arg);
0
1566 filename, linenum, arg);
never executed: fatal("%s line %d: Bad IPQoS value: %s", filename, linenum, arg);
0
1567 arg = strdelim(&s);-
1568 if (arg == NULL)
arg == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1569 value2 = value;
never executed: value2 = value;
0
1570 else if ((value2 = parse_ipqos(arg)) == -1)
(value2 = pars...os(arg)) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1571 fatal("%s line %d: Bad IPQoS value: %s",
never executed: fatal("%s line %d: Bad IPQoS value: %s", filename, linenum, arg);
0
1572 filename, linenum, arg);
never executed: fatal("%s line %d: Bad IPQoS value: %s", filename, linenum, arg);
0
1573 if (*activep) {
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
0
1574 options->ip_qos_interactive = value;-
1575 options->ip_qos_bulk = value2;-
1576 }
never executed: end of block
0
1577 break;
never executed: break;
0
1578-
1579 case oRequestTTY:
never executed: case oRequestTTY:
0
1580 intptr = &options->request_tty;-
1581 multistate_ptr = multistate_requesttty;-
1582 goto parse_multistate;
never executed: goto parse_multistate;
0
1583-
1584 case oIgnoreUnknown:
never executed: case oIgnoreUnknown:
0
1585 charptr = &options->ignored_unknown;-
1586 goto parse_string;
never executed: goto parse_string;
0
1587-
1588 case oProxyUseFdpass:
never executed: case oProxyUseFdpass:
0
1589 intptr = &options->proxy_use_fdpass;-
1590 goto parse_flag;
never executed: goto parse_flag;
0
1591-
1592 case oCanonicalDomains:
never executed: case oCanonicalDomains:
0
1593 value = options->num_canonical_domains != 0;-
1594 while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
(arg = strdeli...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
*arg != '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1595 if (!valid_domain(arg, 1, &errstr)) {
!valid_domain(arg, 1, &errstr)Description
TRUEnever evaluated
FALSEnever evaluated
0
1596 fatal("%s line %d: %s", filename, linenum,-
1597 errstr);-
1598 }
never executed: end of block
0
1599 if (!*activep || value)
!*activepDescription
TRUEnever evaluated
FALSEnever evaluated
valueDescription
TRUEnever evaluated
FALSEnever evaluated
0
1600 continue;
never executed: continue;
0
1601 if (options->num_canonical_domains >= MAX_CANON_DOMAINS)
options->num_c..._domains >= 32Description
TRUEnever evaluated
FALSEnever evaluated
0
1602 fatal("%s line %d: too many hostname suffixes.",
never executed: fatal("%s line %d: too many hostname suffixes.", filename, linenum);
0
1603 filename, linenum);
never executed: fatal("%s line %d: too many hostname suffixes.", filename, linenum);
0
1604 options->canonical_domains[-
1605 options->num_canonical_domains++] = xstrdup(arg);-
1606 }
never executed: end of block
0
1607 break;
never executed: break;
0
1608-
1609 case oCanonicalizePermittedCNAMEs:
never executed: case oCanonicalizePermittedCNAMEs:
0
1610 value = options->num_permitted_cnames != 0;-
1611 while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
(arg = strdeli...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
*arg != '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1612 /* Either '*' for everything or 'list:list' */-
1613 if (strcmp(arg, "*") == 0)
never executed: __result = (((const unsigned char *) (const char *) ( arg ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
never executed: __result = (((const unsigned char *) (const char *) ( "*" ))[3] - __s2[3]);
never executed: end of block
never executed: end of block
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1614 arg2 = arg;
never executed: arg2 = arg;
0
1615 else {-
1616 lowercase(arg);-
1617 if ((arg2 = strchr(arg, ':')) == NULL ||
(arg2 = (__ext...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
__builtin_constant_p ( ':' )Description
TRUEnever evaluated
FALSEnever evaluated
!__builtin_constant_p ( arg )Description
TRUEnever evaluated
FALSEnever evaluated
( ':' ) == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1618 arg2[1] == '\0') {
arg2[1] == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1619 fatal("%s line %d: "-
1620 "Invalid permitted CNAME \"%s\"",-
1621 filename, linenum, arg);-
1622 }
never executed: end of block
0
1623 *arg2 = '\0';-
1624 arg2++;-
1625 }
never executed: end of block
0
1626 if (!*activep || value)
!*activepDescription
TRUEnever evaluated
FALSEnever evaluated
valueDescription
TRUEnever evaluated
FALSEnever evaluated
0
1627 continue;
never executed: continue;
0
1628 if (options->num_permitted_cnames >= MAX_CANON_DOMAINS)
options->num_p...d_cnames >= 32Description
TRUEnever evaluated
FALSEnever evaluated
0
1629 fatal("%s line %d: too many permitted CNAMEs.",
never executed: fatal("%s line %d: too many permitted CNAMEs.", filename, linenum);
0
1630 filename, linenum);
never executed: fatal("%s line %d: too many permitted CNAMEs.", filename, linenum);
0
1631 cname = options->permitted_cnames +-
1632 options->num_permitted_cnames++;-
1633 cname->source_list = xstrdup(arg);-
1634 cname->target_list = xstrdup(arg2);-
1635 }
never executed: end of block
0
1636 break;
never executed: break;
0
1637-
1638 case oCanonicalizeHostname:
never executed: case oCanonicalizeHostname:
0
1639 intptr = &options->canonicalize_hostname;-
1640 multistate_ptr = multistate_canonicalizehostname;-
1641 goto parse_multistate;
never executed: goto parse_multistate;
0
1642-
1643 case oCanonicalizeMaxDots:
never executed: case oCanonicalizeMaxDots:
0
1644 intptr = &options->canonicalize_max_dots;-
1645 goto parse_int;
never executed: goto parse_int;
0
1646-
1647 case oCanonicalizeFallbackLocal:
never executed: case oCanonicalizeFallbackLocal:
0
1648 intptr = &options->canonicalize_fallback_local;-
1649 goto parse_flag;
never executed: goto parse_flag;
0
1650-
1651 case oStreamLocalBindMask:
never executed: case oStreamLocalBindMask:
0
1652 arg = strdelim(&s);-
1653 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1654 fatal("%.200s line %d: Missing StreamLocalBindMask argument.", filename, linenum);
never executed: fatal("%.200s line %d: Missing StreamLocalBindMask argument.", filename, linenum);
0
1655 /* Parse mode in octal format */-
1656 value = strtol(arg, &endofnumber, 8);-
1657 if (arg == endofnumber || value < 0 || value > 0777)
arg == endofnumberDescription
TRUEnever evaluated
FALSEnever evaluated
value < 0Description
TRUEnever evaluated
FALSEnever evaluated
value > 0777Description
TRUEnever evaluated
FALSEnever evaluated
0
1658 fatal("%.200s line %d: Bad mask.", filename, linenum);
never executed: fatal("%.200s line %d: Bad mask.", filename, linenum);
0
1659 options->fwd_opts.streamlocal_bind_mask = (mode_t)value;-
1660 break;
never executed: break;
0
1661-
1662 case oStreamLocalBindUnlink:
never executed: case oStreamLocalBindUnlink:
0
1663 intptr = &options->fwd_opts.streamlocal_bind_unlink;-
1664 goto parse_flag;
never executed: goto parse_flag;
0
1665-
1666 case oRevokedHostKeys:
never executed: case oRevokedHostKeys:
0
1667 charptr = &options->revoked_host_keys;-
1668 goto parse_string;
never executed: goto parse_string;
0
1669-
1670 case oFingerprintHash:
never executed: case oFingerprintHash:
0
1671 intptr = &options->fingerprint_hash;-
1672 arg = strdelim(&s);-
1673 if (!arg || *arg == '\0')
!argDescription
TRUEnever evaluated
FALSEnever evaluated
*arg == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
1674 fatal("%.200s line %d: Missing argument.",
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1675 filename, linenum);
never executed: fatal("%.200s line %d: Missing argument.", filename, linenum);
0
1676 if ((value = ssh_digest_alg_by_name(arg)) == -1)
(value = ssh_d...me(arg)) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1677 fatal("%.200s line %d: Invalid hash algorithm \"%s\".",
never executed: fatal("%.200s line %d: Invalid hash algorithm \"%s\".", filename, linenum, arg);
0
1678 filename, linenum, arg);
never executed: fatal("%.200s line %d: Invalid hash algorithm \"%s\".", filename, linenum, arg);
0
1679 if (*activep && *intptr == -1)
*activepDescription
TRUEnever evaluated
FALSEnever evaluated
*intptr == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
1680 *intptr = value;
never executed: *intptr = value;
0
1681 break;
never executed: break;
0
1682-
1683 case oUpdateHostkeys:
never executed: case oUpdateHostkeys:
0
1684 intptr = &options->update_hostkeys;-
1685 multistate_ptr = multistate_yesnoask;-
1686 goto parse_multistate;
never executed: goto parse_multistate;
0
1687-
1688 case oHostbasedKeyTypes:
never executed: case oHostbasedKeyTypes:
0
1689 charptr = &options->hostbased_key_types;-
1690 goto parse_keytypes;
never executed: goto parse_keytypes;
0
1691-
1692 case oPubkeyAcceptedKeyTypes:
never executed: case oPubkeyAcceptedKeyTypes:
0
1693 charptr = &options->pubkey_key_types;-
1694 goto parse_keytypes;
never executed: goto parse_keytypes;
0
1695-
1696 case oAddKeysToAgent:
never executed: case oAddKeysToAgent:
0
1697 intptr = &options->add_keys_to_agent;-
1698 multistate_ptr = multistate_yesnoaskconfirm;-
1699 goto parse_multistate;
never executed: goto parse_multistate;
0
1700-
1701 case oIdentityAgent:
never executed: case oIdentityAgent:
0
1702 charptr = &options->identity_agent;-
1703 goto parse_string;
never executed: goto parse_string;
0
1704-
1705 case oDeprecated:
never executed: case oDeprecated:
0
1706 debug("%s line %d: Deprecated option \"%s\"",-
1707 filename, linenum, keyword);-
1708 return 0;
never executed: return 0;
0
1709-
1710 case oUnsupported:
never executed: case oUnsupported:
0
1711 error("%s line %d: Unsupported option \"%s\"",-
1712 filename, linenum, keyword);-
1713 return 0;
never executed: return 0;
0
1714-
1715 default:
never executed: default:
0
1716 fatal(