From: Amos Jeffries Date: Mon, 20 Dec 2010 04:50:28 +0000 (-0700) Subject: Author: Hank Hampel X-Git-Tag: SQUID_3_1_10~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7179d09e86a3d3a301064a966434a6911be1e041;p=thirdparty%2Fsquid.git Author: Hank Hampel Bug 3028: Permit wbinfo_group.pl to authenticate Kerberos users with NT domain --- diff --git a/helpers/external_acl/wbinfo_group/wbinfo_group.pl b/helpers/external_acl/wbinfo_group/wbinfo_group.pl index 06e970a759..4b0e77c794 100755 --- a/helpers/external_acl/wbinfo_group/wbinfo_group.pl +++ b/helpers/external_acl/wbinfo_group/wbinfo_group.pl @@ -12,6 +12,9 @@ # Jerry Murdock # # Version history: +# 2010-08-27 Hank Hampel +# Add Kerberos to NTLM conversion of credentials (-K) +# # 2005-12-26 Guido Serassio # Add '-d' command line debugging option # @@ -27,7 +30,6 @@ # 2002-07-05 Jerry Murdock # Initial release - # # Globals # @@ -45,6 +47,10 @@ sub debug { # sub check { local($user, $group) = @_; + if ($opt{K} && ($user =~ m/\@/)) { + @tmpuser = split(/\@/, $user); + $user = "$tmpuser[1]\\$tmpuser[0]"; + } $groupSID = `wbinfo -n "$group" | cut -d" " -f1`; chop $groupSID; $groupGID = `wbinfo -Y "$groupSID"`; @@ -62,7 +68,7 @@ sub check { sub init() { use Getopt::Std; - my $opt_string = 'hd'; + my $opt_string = 'hdK'; getopts( "$opt_string", \%opt ) or usage(); usage() if $opt{h}; } @@ -75,6 +81,7 @@ sub usage() print "Usage: wbinfo_group.pl -dh\n"; print "\t-d enable debugging\n"; print "\t-h print the help\n"; + print "\t-K downgrade Kerberos credentials to NTLM.\n"; exit; }