@@ -104,7 +104,7 @@ struct http_parser {
104104
105105 int auth_finalize (http_context &, const char *);
106106 int auth_krb (http_context &ctx, const char *input, size_t isize, std::string &output);
107- int auth_exthelper (http_context &, const char * proc, const char *input, std::string &output);
107+ int auth_exthelper (http_context &, const std::string & proc, const char *input, std::string &output);
108108 tproc_status auth_spnego (http_context &ctx, const char *past_method);
109109 tproc_status auth_basic (http_context *, const char *);
110110 tproc_status auth (http_context &ctx);
@@ -138,7 +138,7 @@ struct http_parser {
138138 std::unique_ptr<std::mutex[]> g_ssl_mutex_buf;
139139 std::mutex g_vconnection_lock; /* protects g_vconnection_hash */
140140 std::unordered_map<std::string, VIRTUAL_CONNECTION> g_vconnection_hash;
141- std::string gss_helper_program, ntlm_helper_program ;
141+ std::string gss_helper_program;
142142};
143143
144144class VCONN_REF {
@@ -230,7 +230,6 @@ http_parser::http_parser(size_t context_num, time_duration timeout,
230230 g_certificate_passwd.clear ();
231231 g_private_key_path = key_path;
232232 gss_helper_program = g_config_file->get_value (" gss_program" );
233- ntlm_helper_program = g_config_file->get_value (" ntlmssp_program" );
234233}
235234
236235#ifdef OLD_SSL
@@ -901,16 +900,14 @@ int http_parser::auth_finalize(http_context &ctx, const char *user)
901900 return 1 ;
902901}
903902
904- int http_parser::auth_exthelper (http_context &ctx, const char * prog,
903+ int http_parser::auth_exthelper (http_context &ctx, const std::string_view & prog,
905904 const char *encinput, std::string &gss_output)
906905{
907906 auto encsize = strlen (encinput);
908907 auto &pinfo = ctx.ntlm_proc ;
909908 gss_output.clear ();
910909
911910 if (pinfo.p_pid <= 0 ) {
912- if (prog == nullptr || *prog == ' \0 ' )
913- prog = " /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp" ;
914911 auto args = HX_split (prog, " " , nullptr , 0 );
915912 auto cl_0 = HX::make_scope_exit ([=]() { HX_zvecfree (args); });
916913 pinfo.p_flags = HXPROC_STDIN | HXPROC_STDOUT | HXPROC_STDERR;
@@ -1121,11 +1118,8 @@ int http_parser::auth_krb(http_context &ctx, const char *input, size_t isize,
11211118
11221119tproc_status http_parser::auth_spnego (http_context &ctx, const char *past_method)
11231120{
1124- bool rq_ntlmssp = strncmp (past_method, " TlRMTVNT" , 8 ) == 0 ;
1125- const auto &the_helper = rq_ntlmssp ? ntlm_helper_program : gss_helper_program;
1126-
11271121 if (the_helper != " internal-gss" ) {
1128- auto ret = auth_exthelper (ctx, the_helper. c_str () , past_method, ctx.last_gss_output );
1122+ auto ret = auth_exthelper (ctx, gss_helper_program , past_method, ctx.last_gss_output );
11291123 ctx.auth_status = ret <= 0 ? http_status::unauthorized : http_status::ok;
11301124 ctx.auth_method = auth_method::negotiate_b64;
11311125 if (ret <= 0 && ret != -99 )
0 commit comments