summaryrefslogtreecommitdiffstats
path: root/pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl
diff options
context:
space:
mode:
authorvakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-01-22 06:17:39 +0000
committervakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-01-22 06:17:39 +0000
commitfcb037f34cfacf3f961955d3f2d0839ce69920a5 (patch)
treed0c86d2aa5b9efe435ca36242ea2d9032472ef3e /pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl
parent277cc0e0f10ac4f9c90cc45434533be716310b5b (diff)
downloadpki-fcb037f34cfacf3f961955d3f2d0839ce69920a5.tar.gz
pki-fcb037f34cfacf3f961955d3f2d0839ce69920a5.tar.xz
pki-fcb037f34cfacf3f961955d3f2d0839ce69920a5.zip
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
Diffstat (limited to 'pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl')
-rwxr-xr-xpki/base/tps/forms/esc/cgi-bin/sow/cfg.pl30
1 files changed, 4 insertions, 26 deletions
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`;