summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authorSimon Wilkinson <simon@sxw.org.uk>2014-02-09 16:09:48 +0000
committerColin Watson <cjwatson@debian.org>2018-10-20 22:54:00 +0100
commit72b1d308e6400194ef6e4e7dd45bfa48fa39b5e6 (patch)
tree2a3b57ae5446f4273804064ccc42659adfc2a3b2 /servconf.c
parent3d246f10429fc9a37b98eabef94fe8dc7c61002b (diff)
GSSAPI key exchange support
This patch has been rejected upstream: "None of the OpenSSH developers are in favour of adding this, and this situation has not changed for several years. This is not a slight on Simon's patch, which is of fine quality, but just that a) we don't trust GSSAPI implementations that much and b) we don't like adding new KEX since they are pre-auth attack surface. This one is particularly scary, since it requires hooks out to typically root-owned system resources." However, quite a lot of people rely on this in Debian, and it's better to have it merged into the main openssh package rather than having separate -krb5 packages (as we used to have). It seems to have a generally good security history. Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1242 Last-Updated: 2018-10-20 Patch-Name: gssapi.patch
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/servconf.c b/servconf.c
index 932d363bb..4668b8a45 100644
--- a/servconf.c
+++ b/servconf.c
@@ -124,8 +124,10 @@ initialize_server_options(ServerOptions *options)
124 options->kerberos_ticket_cleanup = -1; 124 options->kerberos_ticket_cleanup = -1;
125 options->kerberos_get_afs_token = -1; 125 options->kerberos_get_afs_token = -1;
126 options->gss_authentication=-1; 126 options->gss_authentication=-1;
127 options->gss_keyex = -1;
127 options->gss_cleanup_creds = -1; 128 options->gss_cleanup_creds = -1;
128 options->gss_strict_acceptor = -1; 129 options->gss_strict_acceptor = -1;
130 options->gss_store_rekey = -1;
129 options->password_authentication = -1; 131 options->password_authentication = -1;
130 options->kbd_interactive_authentication = -1; 132 options->kbd_interactive_authentication = -1;
131 options->challenge_response_authentication = -1; 133 options->challenge_response_authentication = -1;
@@ -337,10 +339,14 @@ fill_default_server_options(ServerOptions *options)
337 options->kerberos_get_afs_token = 0; 339 options->kerberos_get_afs_token = 0;
338 if (options->gss_authentication == -1) 340 if (options->gss_authentication == -1)
339 options->gss_authentication = 0; 341 options->gss_authentication = 0;
342 if (options->gss_keyex == -1)
343 options->gss_keyex = 0;
340 if (options->gss_cleanup_creds == -1) 344 if (options->gss_cleanup_creds == -1)
341 options->gss_cleanup_creds = 1; 345 options->gss_cleanup_creds = 1;
342 if (options->gss_strict_acceptor == -1) 346 if (options->gss_strict_acceptor == -1)
343 options->gss_strict_acceptor = 1; 347 options->gss_strict_acceptor = 1;
348 if (options->gss_store_rekey == -1)
349 options->gss_store_rekey = 0;
344 if (options->password_authentication == -1) 350 if (options->password_authentication == -1)
345 options->password_authentication = 1; 351 options->password_authentication = 1;
346 if (options->kbd_interactive_authentication == -1) 352 if (options->kbd_interactive_authentication == -1)
@@ -485,6 +491,7 @@ typedef enum {
485 sHostKeyAlgorithms, 491 sHostKeyAlgorithms,
486 sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile, 492 sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile,
487 sGssAuthentication, sGssCleanupCreds, sGssStrictAcceptor, 493 sGssAuthentication, sGssCleanupCreds, sGssStrictAcceptor,
494 sGssKeyEx, sGssStoreRekey,
488 sAcceptEnv, sSetEnv, sPermitTunnel, 495 sAcceptEnv, sSetEnv, sPermitTunnel,
489 sMatch, sPermitOpen, sPermitListen, sForceCommand, sChrootDirectory, 496 sMatch, sPermitOpen, sPermitListen, sForceCommand, sChrootDirectory,
490 sUsePrivilegeSeparation, sAllowAgentForwarding, 497 sUsePrivilegeSeparation, sAllowAgentForwarding,
@@ -559,12 +566,20 @@ static struct {
559#ifdef GSSAPI 566#ifdef GSSAPI
560 { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL }, 567 { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL },
561 { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, 568 { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL },
569 { "gssapicleanupcreds", sGssCleanupCreds, SSHCFG_GLOBAL },
562 { "gssapistrictacceptorcheck", sGssStrictAcceptor, SSHCFG_GLOBAL }, 570 { "gssapistrictacceptorcheck", sGssStrictAcceptor, SSHCFG_GLOBAL },
571 { "gssapikeyexchange", sGssKeyEx, SSHCFG_GLOBAL },
572 { "gssapistorecredentialsonrekey", sGssStoreRekey, SSHCFG_GLOBAL },
563#else 573#else
564 { "gssapiauthentication", sUnsupported, SSHCFG_ALL }, 574 { "gssapiauthentication", sUnsupported, SSHCFG_ALL },
565 { "gssapicleanupcredentials", sUnsupported, SSHCFG_GLOBAL }, 575 { "gssapicleanupcredentials", sUnsupported, SSHCFG_GLOBAL },
576 { "gssapicleanupcreds", sUnsupported, SSHCFG_GLOBAL },
566 { "gssapistrictacceptorcheck", sUnsupported, SSHCFG_GLOBAL }, 577 { "gssapistrictacceptorcheck", sUnsupported, SSHCFG_GLOBAL },
578 { "gssapikeyexchange", sUnsupported, SSHCFG_GLOBAL },
579 { "gssapistorecredentialsonrekey", sUnsupported, SSHCFG_GLOBAL },
567#endif 580#endif
581 { "gssusesessionccache", sUnsupported, SSHCFG_GLOBAL },
582 { "gssapiusesessioncredcache", sUnsupported, SSHCFG_GLOBAL },
568 { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL }, 583 { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL },
569 { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL }, 584 { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL },
570 { "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, 585 { "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL },
@@ -1468,6 +1483,10 @@ process_server_config_line(ServerOptions *options, char *line,
1468 intptr = &options->gss_authentication; 1483 intptr = &options->gss_authentication;
1469 goto parse_flag; 1484 goto parse_flag;
1470 1485
1486 case sGssKeyEx:
1487 intptr = &options->gss_keyex;
1488 goto parse_flag;
1489
1471 case sGssCleanupCreds: 1490 case sGssCleanupCreds:
1472 intptr = &options->gss_cleanup_creds; 1491 intptr = &options->gss_cleanup_creds;
1473 goto parse_flag; 1492 goto parse_flag;
@@ -1476,6 +1495,10 @@ process_server_config_line(ServerOptions *options, char *line,
1476 intptr = &options->gss_strict_acceptor; 1495 intptr = &options->gss_strict_acceptor;
1477 goto parse_flag; 1496 goto parse_flag;
1478 1497
1498 case sGssStoreRekey:
1499 intptr = &options->gss_store_rekey;
1500 goto parse_flag;
1501
1479 case sPasswordAuthentication: 1502 case sPasswordAuthentication:
1480 intptr = &options->password_authentication; 1503 intptr = &options->password_authentication;
1481 goto parse_flag; 1504 goto parse_flag;
@@ -2560,7 +2583,10 @@ dump_config(ServerOptions *o)
2560#endif 2583#endif
2561#ifdef GSSAPI 2584#ifdef GSSAPI
2562 dump_cfg_fmtint(sGssAuthentication, o->gss_authentication); 2585 dump_cfg_fmtint(sGssAuthentication, o->gss_authentication);
2586 dump_cfg_fmtint(sGssKeyEx, o->gss_keyex);
2563 dump_cfg_fmtint(sGssCleanupCreds, o->gss_cleanup_creds); 2587 dump_cfg_fmtint(sGssCleanupCreds, o->gss_cleanup_creds);
2588 dump_cfg_fmtint(sGssStrictAcceptor, o->gss_strict_acceptor);
2589 dump_cfg_fmtint(sGssStoreRekey, o->gss_store_rekey);
2564#endif 2590#endif
2565 dump_cfg_fmtint(sPasswordAuthentication, o->password_authentication); 2591 dump_cfg_fmtint(sPasswordAuthentication, o->password_authentication);
2566 dump_cfg_fmtint(sKbdInteractiveAuthentication, 2592 dump_cfg_fmtint(sKbdInteractiveAuthentication,