|
Lines 74-79
initialize_server_options(ServerOptions *options)
Link Here
|
| 74 |
|
74 |
|
| 75 |
/* Portable-specific options */ |
75 |
/* Portable-specific options */ |
| 76 |
options->use_pam = -1; |
76 |
options->use_pam = -1; |
|
|
77 |
options->pam_service_name = NULL; |
| 77 |
|
78 |
|
| 78 |
/* Standard Options */ |
79 |
/* Standard Options */ |
| 79 |
options->num_ports = 0; |
80 |
options->num_ports = 0; |
|
Lines 186-191
fill_default_server_options(ServerOptions *options)
Link Here
|
| 186 |
/* Portable-specific options */ |
187 |
/* Portable-specific options */ |
| 187 |
if (options->use_pam == -1) |
188 |
if (options->use_pam == -1) |
| 188 |
options->use_pam = 0; |
189 |
options->use_pam = 0; |
|
|
190 |
if (options->pam_service_name == NULL) { |
| 191 |
extern char *__progname; |
| 192 |
options->pam_service_name = xstrdup(__progname); |
| 193 |
} |
| 189 |
|
194 |
|
| 190 |
/* Standard Options */ |
195 |
/* Standard Options */ |
| 191 |
if (options->protocol == SSH_PROTO_UNKNOWN) |
196 |
if (options->protocol == SSH_PROTO_UNKNOWN) |
|
Lines 389-395
fill_default_server_options(ServerOptions *options)
Link Here
|
| 389 |
typedef enum { |
394 |
typedef enum { |
| 390 |
sBadOption, /* == unknown option */ |
395 |
sBadOption, /* == unknown option */ |
| 391 |
/* Portable-specific options */ |
396 |
/* Portable-specific options */ |
| 392 |
sUsePAM, |
397 |
sUsePAM, sPAMServiceName, |
| 393 |
/* Standard Options */ |
398 |
/* Standard Options */ |
| 394 |
sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, |
399 |
sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, |
| 395 |
sKeyRegenerationTime, sPermitRootLogin, sLogFacility, sLogLevel, |
400 |
sKeyRegenerationTime, sPermitRootLogin, sLogFacility, sLogLevel, |
|
Lines 439-446
static struct {
Link Here
|
| 439 |
/* Portable-specific options */ |
444 |
/* Portable-specific options */ |
| 440 |
#ifdef USE_PAM |
445 |
#ifdef USE_PAM |
| 441 |
{ "usepam", sUsePAM, SSHCFG_GLOBAL }, |
446 |
{ "usepam", sUsePAM, SSHCFG_GLOBAL }, |
|
|
447 |
{ "pamservicename", sPAMServiceName, SSHCFG_ALL }, |
| 442 |
#else |
448 |
#else |
| 443 |
{ "usepam", sUnsupported, SSHCFG_GLOBAL }, |
449 |
{ "usepam", sUnsupported, SSHCFG_GLOBAL }, |
|
|
450 |
{ "pamservicename", sUnsupported, SSHCFG_ALL }, |
| 444 |
#endif |
451 |
#endif |
| 445 |
{ "pamauthenticationviakbdint", sDeprecated, SSHCFG_GLOBAL }, |
452 |
{ "pamauthenticationviakbdint", sDeprecated, SSHCFG_GLOBAL }, |
| 446 |
/* Standard Options */ |
453 |
/* Standard Options */ |
|
Lines 1000-1005
process_server_config_line(ServerOptions *options, char *line,
Link Here
|
| 1000 |
intptr = &options->use_pam; |
1007 |
intptr = &options->use_pam; |
| 1001 |
goto parse_flag; |
1008 |
goto parse_flag; |
| 1002 |
|
1009 |
|
|
|
1010 |
case sPAMServiceName: |
| 1011 |
arg = strdelim(&cp); |
| 1012 |
if (!arg || *arg == '\0') |
| 1013 |
fatal("%s line %d: Missing Pam Service Name", |
| 1014 |
filename, linenum); |
| 1015 |
if (*activep) { |
| 1016 |
if(options->pam_service_name != NULL) |
| 1017 |
free(options->pam_service_name); |
| 1018 |
options->pam_service_name = xstrdup(arg); |
| 1019 |
} |
| 1020 |
break; |
| 1021 |
|
| 1003 |
/* Standard Options */ |
1022 |
/* Standard Options */ |
| 1004 |
case sBadOption: |
1023 |
case sBadOption: |
| 1005 |
return -1; |
1024 |
return -1; |
|
Lines 2024-2029
copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
Link Here
|
| 2024 |
|
2043 |
|
| 2025 |
M_CP_STROPT(adm_forced_command); |
2044 |
M_CP_STROPT(adm_forced_command); |
| 2026 |
M_CP_STROPT(chroot_directory); |
2045 |
M_CP_STROPT(chroot_directory); |
|
|
2046 |
M_CP_STROPT(pam_service_name); |
| 2027 |
} |
2047 |
} |
| 2028 |
|
2048 |
|
| 2029 |
#undef M_CP_INTOPT |
2049 |
#undef M_CP_INTOPT |
|
Lines 2215-2220
dump_config(ServerOptions *o)
Link Here
|
| 2215 |
/* integer arguments */ |
2235 |
/* integer arguments */ |
| 2216 |
#ifdef USE_PAM |
2236 |
#ifdef USE_PAM |
| 2217 |
dump_cfg_fmtint(sUsePAM, o->use_pam); |
2237 |
dump_cfg_fmtint(sUsePAM, o->use_pam); |
|
|
2238 |
dump_cfg_string(sPAMServiceName, o->pam_service_name); |
| 2218 |
#endif |
2239 |
#endif |
| 2219 |
dump_cfg_int(sServerKeyBits, o->server_key_bits); |
2240 |
dump_cfg_int(sServerKeyBits, o->server_key_bits); |
| 2220 |
dump_cfg_int(sLoginGraceTime, o->login_grace_time); |
2241 |
dump_cfg_int(sLoginGraceTime, o->login_grace_time); |