From fcb037f34cfacf3f961955d3f2d0839ce69920a5 Mon Sep 17 00:00:00 2001 From: vakwetu Date: Sat, 22 Jan 2011 06:17:39 +0000 Subject: Bugzilla BZ 606944: Convert TPS to use ldap utilities and API from OpenLDAP instead of the Mozldap git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1766 c9f7a03b-bd48-0410-a16d-cbbf54688b0b --- pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl') diff --git a/pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl b/pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl index efdac3b50..6aac28b00 100755 --- a/pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl +++ b/pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl @@ -23,29 +23,8 @@ # # Establish platform-dependent variables: # -my $default_hardware_platform=""; -my $ldapsearch=""; -if( $^O eq "linux" ) { - $default_hardware_platform=`uname -i`; - chomp($default_hardware_platform); - if( $default_hardware_platform eq "i386" ) { - $ldapsearch = "/usr/lib/mozldap/ldapsearch"; - } elsif( $default_hardware_platform eq "x86_64" ) { - $ldapsearch = "/usr/lib64/mozldap/ldapsearch"; - } -} elsif( $^O eq "solaris" ) { - $default_hardware_platform=`uname -p`; - chomp($default_hardware_platform); - if( ( $default_hardware_platform eq "sparc" ) && - ( -d "/usr/lib/sparcv9/" ) ) { - $default_hardware_platform="sparcv9"; - } - if( $default_hardware_platform eq "sparc" ) { - $ldapsearch = "/usr/lib/mozldap6/ldapsearch"; - } elsif( $default_hardware_platform eq "sparcv9" ) { - $ldapsearch = "/usr/lib/sparcv9/mozldap6/ldapsearch"; - } -} + +my $ldapsearch = "/usr/bin/ldapsearch"; # # Feel free to modify the following parameters: @@ -135,7 +114,7 @@ sub is_agent() "-b \"" . "cn=TUS Officers,ou=Groups,".$x_basedn . "\" " . "-h \"" . $x_host . "\" " . "-p \"" . $x_port ."\" " . - "-1 \"(uid=" . $uid . "*)\" | wc -l"; + "member | grep \"uid=" . $uid . ",\" | wc -l"; my $matched = `$cmd`; @@ -174,8 +153,7 @@ sub is_user() "-b \"" . "ou=people,".$x_basedn . "\" " . "-h \"" . $x_host . "\" " . "-p \"" . $x_port ."\" " . - "-1 \"(uid=" . $uid . "*)\" | wc -l"; - + "\"(uid=" . $uid . ")\" uid | grep \"uid:\" | wc -l"; my $matched = `$cmd`; -- cgit