diff options
author | jmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-03-28 23:02:19 +0000 |
---|---|---|
committer | jmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-03-28 23:02:19 +0000 |
commit | 2c7bb62e4d7c33f7f7d1b11b65df61a0043a720a (patch) | |
tree | db279c8eb4440b2546077c01d05a0dad1f2047ca /pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl | |
parent | 6ce8fa837d9e427ecb4188c4db4456dce98db30d (diff) | |
download | pki-2c7bb62e4d7c33f7f7d1b11b65df61a0043a720a.tar.gz pki-2c7bb62e4d7c33f7f7d1b11b65df61a0043a720a.tar.xz pki-2c7bb62e4d7c33f7f7d1b11b65df61a0043a720a.zip |
SO officer security fix #491227.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@342 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl')
-rwxr-xr-x | pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl | 11 |
1 files changed, 6 insertions, 5 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 5e2b25476..bbd4863bc 100755 --- a/pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl +++ b/pki/base/tps/forms/esc/cgi-bin/sow/cfg.pl @@ -3,8 +3,7 @@ # --- BEGIN COPYRIGHT BLOCK --- # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; -# version 2.1 of the License. +# License as published by the Free Software Foundation. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -124,17 +123,19 @@ sub is_agent() my $x_bindpwd = `grep -e "^tokendbBindPass" $x_bindpwdpath | cut -c17-`; chomp($x_bindpwd); - my $cmd = $ldapsearch . "\" " . + my $cmd = $ldapsearch . " " . "-D \"" . $x_binddn . "\" " . "-w \"" . $x_bindpwd . "\" " . "-b \"" . "cn=TUS Officers,ou=Groups,".$x_basedn . "\" " . "-h \"" . $x_host . "\" " . "-p \"" . $x_port ."\" " . - "-1 \"(member=uid=" . $uid . "*)\" | wc -l"; + "-1 \"(uid=" . $uid . "*)\" | wc -l"; + my $matched = `$cmd`; + chomp($matched); - if ($matched eq "0") { + if ($matched eq "0" || $matched eq "") { return 0; } else { return 1; |