From 4fa392ad485c47b960252b2f59c7c91e9b56d36c Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Mon, 13 May 2019 11:28:01 -0700 Subject: [PATCH 1/2] fix: default enable_negotiate_port to false (#18251) --- atom/browser/io_thread.cc | 2 ++ atom/common/options_switches.cc | 3 +++ atom/common/options_switches.h | 1 + 3 files changed, 6 insertions(+) diff --git a/atom/browser/io_thread.cc b/atom/browser/io_thread.cc index dffb2460ada29..f38160d663f34 100644 --- a/atom/browser/io_thread.cc +++ b/atom/browser/io_thread.cc @@ -48,6 +48,8 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAuthDynamicParams( command_line.GetSwitchValueASCII(switches::kAuthServerWhitelist); auth_dynamic_params->delegate_whitelist = command_line.GetSwitchValueASCII( switches::kAuthNegotiateDelegateWhitelist); + auth_dynamic_params->enable_negotiate_port = + command_line->HasSwitch(atom::switches::kEnableAuthNegotiatePort); return auth_dynamic_params; } diff --git a/atom/common/options_switches.cc b/atom/common/options_switches.cc index 9d57768cedd25..dc78517c94c65 100644 --- a/atom/common/options_switches.cc +++ b/atom/common/options_switches.cc @@ -247,6 +247,9 @@ const char kAuthServerWhitelist[] = "auth-server-whitelist"; const char kAuthNegotiateDelegateWhitelist[] = "auth-negotiate-delegate-whitelist"; +// If set, include the port in generated Kerberos SPNs. +const char kEnableAuthNegotiatePort[] = "enable-auth-negotiate-port"; + } // namespace switches } // namespace atom diff --git a/atom/common/options_switches.h b/atom/common/options_switches.h index 5c2414fd68c80..e4b5038a7bc7e 100644 --- a/atom/common/options_switches.h +++ b/atom/common/options_switches.h @@ -118,6 +118,7 @@ extern const char kDiskCacheSize[]; extern const char kIgnoreConnectionsLimit[]; extern const char kAuthServerWhitelist[]; extern const char kAuthNegotiateDelegateWhitelist[]; +extern const char kEnableAuthNegotiatePort[]; } // namespace switches From 91d8ca2d22a284b7d2526acc75c550fd020c18d9 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 13 May 2019 14:56:06 -0700 Subject: [PATCH 2/2] chore: command_line is not a pointer --- atom/browser/io_thread.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/io_thread.cc b/atom/browser/io_thread.cc index f38160d663f34..8bfe807b1e5c4 100644 --- a/atom/browser/io_thread.cc +++ b/atom/browser/io_thread.cc @@ -49,7 +49,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAuthDynamicParams( auth_dynamic_params->delegate_whitelist = command_line.GetSwitchValueASCII( switches::kAuthNegotiateDelegateWhitelist); auth_dynamic_params->enable_negotiate_port = - command_line->HasSwitch(atom::switches::kEnableAuthNegotiatePort); + command_line.HasSwitch(atom::switches::kEnableAuthNegotiatePort); return auth_dynamic_params; }