version 1.122, 2003/10/08 15:21:24 |
version 1.123, 2003/10/11 08:24:07 |
|
|
|
|
typedef enum { |
typedef enum { |
oBadOption, |
oBadOption, |
oForwardAgent, oForwardX11, oGatewayPorts, |
oForwardAgent, oForwardX11, oForwardX11Trusted, oGatewayPorts, |
oPasswordAuthentication, oRSAAuthentication, |
oPasswordAuthentication, oRSAAuthentication, |
oChallengeResponseAuthentication, oXAuthLocation, |
oChallengeResponseAuthentication, oXAuthLocation, |
oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward, |
oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward, |
|
|
} keywords[] = { |
} keywords[] = { |
{ "forwardagent", oForwardAgent }, |
{ "forwardagent", oForwardAgent }, |
{ "forwardx11", oForwardX11 }, |
{ "forwardx11", oForwardX11 }, |
|
{ "forwardx11trusted", oForwardX11Trusted }, |
{ "xauthlocation", oXAuthLocation }, |
{ "xauthlocation", oXAuthLocation }, |
{ "gatewayports", oGatewayPorts }, |
{ "gatewayports", oGatewayPorts }, |
{ "useprivilegedport", oUsePrivilegedPort }, |
{ "useprivilegedport", oUsePrivilegedPort }, |
|
|
intptr = &options->forward_x11; |
intptr = &options->forward_x11; |
goto parse_flag; |
goto parse_flag; |
|
|
|
case oForwardX11Trusted: |
|
intptr = &options->forward_x11_trusted; |
|
goto parse_flag; |
|
|
case oGatewayPorts: |
case oGatewayPorts: |
intptr = &options->gateway_ports; |
intptr = &options->gateway_ports; |
goto parse_flag; |
goto parse_flag; |
|
|
memset(options, 'X', sizeof(*options)); |
memset(options, 'X', sizeof(*options)); |
options->forward_agent = -1; |
options->forward_agent = -1; |
options->forward_x11 = -1; |
options->forward_x11 = -1; |
|
options->forward_x11_trusted = -1; |
options->xauth_location = NULL; |
options->xauth_location = NULL; |
options->gateway_ports = -1; |
options->gateway_ports = -1; |
options->use_privileged_port = -1; |
options->use_privileged_port = -1; |
|
|
options->forward_agent = 0; |
options->forward_agent = 0; |
if (options->forward_x11 == -1) |
if (options->forward_x11 == -1) |
options->forward_x11 = 0; |
options->forward_x11 = 0; |
|
if (options->forward_x11_trusted == -1) |
|
options->forward_x11_trusted = 0; |
if (options->xauth_location == NULL) |
if (options->xauth_location == NULL) |
options->xauth_location = _PATH_XAUTH; |
options->xauth_location = _PATH_XAUTH; |
if (options->gateway_ports == -1) |
if (options->gateway_ports == -1) |