diff options
-rw-r--r-- | base/tps/CMakeLists.txt | 34 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/demo/enroll.cgi (renamed from base/tps/forms/esc/cgi-bin/demo/enroll.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/demo/index.cgi (renamed from base/tps/forms/esc/cgi-bin/demo/index.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/esc.cgi (renamed from base/tps/forms/esc/esc.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/home.cgi (renamed from base/tps/forms/esc/home.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/home/cachain.cgi (renamed from base/tps/forms/esc/cgi-bin/home/cachain.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/home/enroll.cgi (renamed from base/tps/forms/esc/cgi-bin/home/enroll.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/home/index.cgi (renamed from base/tps/forms/esc/cgi-bin/home/index.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/so/enroll.cgi (renamed from base/tps/forms/esc/cgi-bin/so/enroll.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/so/index.cgi (renamed from base/tps/forms/esc/cgi-bin/so/index.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/ajax-list.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/ajax-list.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/enroll.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/enroll.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/enroll_temp.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/enroll_temp.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/format.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/format.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/formatso.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/formatso.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/index.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/index.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/is_agent.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/is_agent.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/is_user.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/is_user.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/main.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/main.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/noaccess.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/noaccess.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/read.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/read.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/read_temp.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/read_temp.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/search.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/search.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/search_temp.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/search_temp.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/seturl.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/seturl.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/cgi-bin/sow/welcome.cgi (renamed from base/tps/forms/esc/cgi-bin/sow/welcome.cgi) | 0 | ||||
-rwxr-xr-x | base/tps/apache/docroot/index.cgi (renamed from base/tps/forms/index.cgi) | 0 | ||||
-rw-r--r-- | base/tps/apache/docroot/index.html (renamed from base/tps/forms/index.html) | 0 | ||||
-rwxr-xr-x | base/tps/forms/esc/cgi-bin/sow/cfg.pl | 174 |
29 files changed, 10 insertions, 198 deletions
diff --git a/base/tps/CMakeLists.txt b/base/tps/CMakeLists.txt index 4e6a922d2..6044a13c1 100644 --- a/base/tps/CMakeLists.txt +++ b/base/tps/CMakeLists.txt @@ -79,13 +79,6 @@ install( install( DIRECTORY - forms/esc/cgi-bin - DESTINATION - ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} -) - -install( - DIRECTORY apache/conf DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} @@ -105,23 +98,16 @@ install( ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} ) -install( - FILES - forms/index.html - DESTINATION - ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/docroot -) - -install( - FILES - forms/index.cgi - DESTINATION - ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/docroot - PERMISSIONS - OWNER_EXECUTE OWNER_WRITE OWNER_READ - GROUP_EXECUTE GROUP_READ - WORLD_EXECUTE WORLD_READ -) +# install( +# FILES +# apache/docroot/index.cgi +# DESTINATION +# ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/docroot +# PERMISSIONS +# OWNER_EXECUTE OWNER_WRITE OWNER_READ +# GROUP_EXECUTE GROUP_READ +# WORLD_EXECUTE WORLD_READ +# ) install( DIRECTORY diff --git a/base/tps/forms/esc/cgi-bin/demo/enroll.cgi b/base/tps/apache/cgi-bin/demo/enroll.cgi index c0f4bcabf..c0f4bcabf 100755 --- a/base/tps/forms/esc/cgi-bin/demo/enroll.cgi +++ b/base/tps/apache/cgi-bin/demo/enroll.cgi diff --git a/base/tps/forms/esc/cgi-bin/demo/index.cgi b/base/tps/apache/cgi-bin/demo/index.cgi index c9a1d21dd..c9a1d21dd 100755 --- a/base/tps/forms/esc/cgi-bin/demo/index.cgi +++ b/base/tps/apache/cgi-bin/demo/index.cgi diff --git a/base/tps/forms/esc/esc.cgi b/base/tps/apache/cgi-bin/esc.cgi index 70a93c0a0..70a93c0a0 100755 --- a/base/tps/forms/esc/esc.cgi +++ b/base/tps/apache/cgi-bin/esc.cgi diff --git a/base/tps/forms/esc/home.cgi b/base/tps/apache/cgi-bin/home.cgi index 5fdf5ecf8..5fdf5ecf8 100755 --- a/base/tps/forms/esc/home.cgi +++ b/base/tps/apache/cgi-bin/home.cgi diff --git a/base/tps/forms/esc/cgi-bin/home/cachain.cgi b/base/tps/apache/cgi-bin/home/cachain.cgi index ddbf5e6ae..ddbf5e6ae 100755 --- a/base/tps/forms/esc/cgi-bin/home/cachain.cgi +++ b/base/tps/apache/cgi-bin/home/cachain.cgi diff --git a/base/tps/forms/esc/cgi-bin/home/enroll.cgi b/base/tps/apache/cgi-bin/home/enroll.cgi index c0f4bcabf..c0f4bcabf 100755 --- a/base/tps/forms/esc/cgi-bin/home/enroll.cgi +++ b/base/tps/apache/cgi-bin/home/enroll.cgi diff --git a/base/tps/forms/esc/cgi-bin/home/index.cgi b/base/tps/apache/cgi-bin/home/index.cgi index 1e54a8354..1e54a8354 100755 --- a/base/tps/forms/esc/cgi-bin/home/index.cgi +++ b/base/tps/apache/cgi-bin/home/index.cgi diff --git a/base/tps/forms/esc/cgi-bin/so/enroll.cgi b/base/tps/apache/cgi-bin/so/enroll.cgi index 148cd78c0..148cd78c0 100755 --- a/base/tps/forms/esc/cgi-bin/so/enroll.cgi +++ b/base/tps/apache/cgi-bin/so/enroll.cgi diff --git a/base/tps/forms/esc/cgi-bin/so/index.cgi b/base/tps/apache/cgi-bin/so/index.cgi index 7b3f2c68d..7b3f2c68d 100755 --- a/base/tps/forms/esc/cgi-bin/so/index.cgi +++ b/base/tps/apache/cgi-bin/so/index.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/ajax-list.cgi b/base/tps/apache/cgi-bin/sow/ajax-list.cgi index 0f4ac094f..0f4ac094f 100755 --- a/base/tps/forms/esc/cgi-bin/sow/ajax-list.cgi +++ b/base/tps/apache/cgi-bin/sow/ajax-list.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/enroll.cgi b/base/tps/apache/cgi-bin/sow/enroll.cgi index 8a6431e52..8a6431e52 100755 --- a/base/tps/forms/esc/cgi-bin/sow/enroll.cgi +++ b/base/tps/apache/cgi-bin/sow/enroll.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/enroll_temp.cgi b/base/tps/apache/cgi-bin/sow/enroll_temp.cgi index 5817039a2..5817039a2 100755 --- a/base/tps/forms/esc/cgi-bin/sow/enroll_temp.cgi +++ b/base/tps/apache/cgi-bin/sow/enroll_temp.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/format.cgi b/base/tps/apache/cgi-bin/sow/format.cgi index 9b310991d..9b310991d 100755 --- a/base/tps/forms/esc/cgi-bin/sow/format.cgi +++ b/base/tps/apache/cgi-bin/sow/format.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/formatso.cgi b/base/tps/apache/cgi-bin/sow/formatso.cgi index d53129139..d53129139 100755 --- a/base/tps/forms/esc/cgi-bin/sow/formatso.cgi +++ b/base/tps/apache/cgi-bin/sow/formatso.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/index.cgi b/base/tps/apache/cgi-bin/sow/index.cgi index 7f7a98869..7f7a98869 100755 --- a/base/tps/forms/esc/cgi-bin/sow/index.cgi +++ b/base/tps/apache/cgi-bin/sow/index.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/is_agent.cgi b/base/tps/apache/cgi-bin/sow/is_agent.cgi index c6b6a87f7..c6b6a87f7 100755 --- a/base/tps/forms/esc/cgi-bin/sow/is_agent.cgi +++ b/base/tps/apache/cgi-bin/sow/is_agent.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/is_user.cgi b/base/tps/apache/cgi-bin/sow/is_user.cgi index d7a551421..d7a551421 100755 --- a/base/tps/forms/esc/cgi-bin/sow/is_user.cgi +++ b/base/tps/apache/cgi-bin/sow/is_user.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/main.cgi b/base/tps/apache/cgi-bin/sow/main.cgi index c6f65e42e..c6f65e42e 100755 --- a/base/tps/forms/esc/cgi-bin/sow/main.cgi +++ b/base/tps/apache/cgi-bin/sow/main.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/noaccess.cgi b/base/tps/apache/cgi-bin/sow/noaccess.cgi index 17166bcb6..17166bcb6 100755 --- a/base/tps/forms/esc/cgi-bin/sow/noaccess.cgi +++ b/base/tps/apache/cgi-bin/sow/noaccess.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/read.cgi b/base/tps/apache/cgi-bin/sow/read.cgi index 8a5793c2b..8a5793c2b 100755 --- a/base/tps/forms/esc/cgi-bin/sow/read.cgi +++ b/base/tps/apache/cgi-bin/sow/read.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/read_temp.cgi b/base/tps/apache/cgi-bin/sow/read_temp.cgi index 31c6fd7e3..31c6fd7e3 100755 --- a/base/tps/forms/esc/cgi-bin/sow/read_temp.cgi +++ b/base/tps/apache/cgi-bin/sow/read_temp.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/search.cgi b/base/tps/apache/cgi-bin/sow/search.cgi index e681ed100..e681ed100 100755 --- a/base/tps/forms/esc/cgi-bin/sow/search.cgi +++ b/base/tps/apache/cgi-bin/sow/search.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/search_temp.cgi b/base/tps/apache/cgi-bin/sow/search_temp.cgi index 5d752a49d..5d752a49d 100755 --- a/base/tps/forms/esc/cgi-bin/sow/search_temp.cgi +++ b/base/tps/apache/cgi-bin/sow/search_temp.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/seturl.cgi b/base/tps/apache/cgi-bin/sow/seturl.cgi index dfac46d8f..dfac46d8f 100755 --- a/base/tps/forms/esc/cgi-bin/sow/seturl.cgi +++ b/base/tps/apache/cgi-bin/sow/seturl.cgi diff --git a/base/tps/forms/esc/cgi-bin/sow/welcome.cgi b/base/tps/apache/cgi-bin/sow/welcome.cgi index bc76dd3fa..bc76dd3fa 100755 --- a/base/tps/forms/esc/cgi-bin/sow/welcome.cgi +++ b/base/tps/apache/cgi-bin/sow/welcome.cgi diff --git a/base/tps/forms/index.cgi b/base/tps/apache/docroot/index.cgi index 0e643166b..0e643166b 100755 --- a/base/tps/forms/index.cgi +++ b/base/tps/apache/docroot/index.cgi diff --git a/base/tps/forms/index.html b/base/tps/apache/docroot/index.html index b225251a1..b225251a1 100644 --- a/base/tps/forms/index.html +++ b/base/tps/apache/docroot/index.html diff --git a/base/tps/forms/esc/cgi-bin/sow/cfg.pl b/base/tps/forms/esc/cgi-bin/sow/cfg.pl deleted file mode 100755 index d616fa136..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/cfg.pl +++ /dev/null @@ -1,174 +0,0 @@ -#! /usr/bin/perl -# -# --- 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. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301 USA -# -# Copyright (C) 2007 Red Hat, Inc. -# All rights reserved. -# --- END COPYRIGHT BLOCK --- -# - -use Mozilla::LDAP::Conn; -use PKI::TPS::Common; - -# -# Feel free to modify the following parameters: -# -my $ldapHost = "localhost"; -my $ldapPort = "389"; -my $basedn = "ou=People,dc=sfbay,dc=redhat,dc=com"; -my $port = "7888"; -my $secure_port = "7889"; -my $host = "localhost"; - -my $cfg = "/var/lib/pki-tps/conf/CS.cfg"; - -sub get_ldap_host() -{ - my $ldapport = `grep auth.instance.0.hostport $cfg | cut -c26-`; - chomp($ldapport); - my ($ldapHost, $p) = split(/:/, $ldapport); - return $ldapHost; -} - -sub get_ldap_port() -{ - my $ldapport = `grep auth.instance.0.hostport $cfg | cut -c26-`; - chomp($ldapport); - my ($p, $ldapPort) = split(/:/, $ldapport); - return $ldapPort; -} - -sub get_ldap_secure() -{ - my $ldapsecure = `grep auth.instance.0.ssl $cfg | cut -c21-`; - chomp($ldapsecure); - return $ldapsecure; -} - -sub get_ldap_certdir() -{ - my $ldapcertdir = `grep service.instanceDir $cfg | cut -c21-`; - chomp($ldapcertdir); - return $ldapcertdir . "/alias"; -} - -sub get_base_dn() -{ - my $basedn = `grep auth.instance.0.baseDN $cfg | cut -c24-`; - chomp($basedn); - return $basedn; -} - -sub get_port() -{ - my $port = `grep service.unsecurePort $cfg | cut -c22-`; - chomp($port); - return $port; -} - -sub get_secure_port() -{ - my $secure_port = `grep service.securePort $cfg | cut -c20-`; - chomp($secure_port); - return $secure_port; -} - -sub get_host() -{ - my $host = `grep service.machineName $cfg | cut -c21-`; - chomp($host); - return $host; -} - -sub is_agent() -{ - my ($dn) = @_; - - my $uid = $dn; - # need to map a subject dn into user DN - $uid =~ /uid=([^,]*)/; # retrieve the uid - $uid = $1; - - my $x_hostport = `grep -e "^tokendb.hostport" $cfg | cut -c18-`; - chomp($x_hostport); - my ($x_host, $x_port) = split(/:/, $x_hostport); - - my $x_secureconn = `grep -e "^tokendb.ssl" $cfg | cut -c13-`; - chomp($x_secureconn); - my $x_basedn = `grep -e "^tokendb.userBaseDN" $cfg | cut -c20-`; - chomp($x_basedn); - my $x_binddn = `grep -e "^tokendb.bindDN" $cfg | cut -c16-`; - chomp($x_binddn); - my $x_bindpwdpath = `grep -e "^tokendb.bindPassPath" $cfg | cut -c22-`; - chomp($x_bindpwdpath); - my $x_bindpwd = `grep -e "^tokendbBindPass" $x_bindpwdpath | cut -c17-`; - chomp($x_bindpwd); - - my $ldap = PKI::TPS::Common::make_connection( - {host => $x_host, port => $x_port, pswd => $x_bindpwd, bind => $x_binddn, cert => $x_certdir}, - $x_secureconn); - - return 0 if (! $ldap); - - my $entry = $ldap->search ( "cn=TUS Officers,ou=Groups,$x_basedn", - "sub", - "uid=$uid", - 0 - ); - - $ldap->close(); - - if ($entry) { - return 1; - } - return 0; -} - -sub is_user() -{ - my ($dn) = @_; - - my $uid = $dn; - # need to map a subject dn into user DN - $uid =~ /uid=([^,]*)/; # retrieve the uid - $uid = $1; - - my $x_host = get_ldap_host(); - my $x_port = get_ldap_port(); - my $x_secureconn = get_ldap_secure(); - my $x_basedn = get_base_dn(); - my $x_certdir = get_ldap_certdir(); - - my $ldap = PKI::TPS::Common::make_connection( - {host => $x_host, port => $x_port, cert => $x_certdir}, - $x_secureconn); - - return 0 if (! $ldap); - - my $entry = $ldap->search ( "ou=people,$x_basedn", - "sub", - "uid=$uid", - 0 - ); - - $ldap->close(); - - if ($entry) { - return 1; - } - return 0; -} - |