summaryrefslogtreecommitdiffstats
path: root/pki
diff options
context:
space:
mode:
authorjmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2008-08-08 01:32:43 +0000
committerjmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2008-08-08 01:32:43 +0000
commita8746d86b23496265ef869fedc8a1956eb86035a (patch)
treef9a9414f52995b8f95df0345bc774e68a7a984d3 /pki
parent8c826c57070db6796d426f91754cbd54b5e84e81 (diff)
downloadpki-a8746d86b23496265ef869fedc8a1956eb86035a.tar.gz
pki-a8746d86b23496265ef869fedc8a1956eb86035a.tar.xz
pki-a8746d86b23496265ef869fedc8a1956eb86035a.zip
Fix for #458337, port separation.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@97 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki')
-rwxr-xr-xpki/base/setup/pkicommon47
1 files changed, 47 insertions, 0 deletions
diff --git a/pki/base/setup/pkicommon b/pki/base/setup/pkicommon
index e5913c12b..02af73b4b 100755
--- a/pki/base/setup/pkicommon
+++ b/pki/base/setup/pkicommon
@@ -521,6 +521,51 @@ sub check_for_valid_url_prefix
return 0;
}
+# arg0 secure_port
+# arg1 unsecure_port
+# arg2 agent_secure_port
+# arg3 ee_secure_port
+# arg4 admin_secure_port
+# return 1 - ports are valid (success)
+# return 0 - ports have a conflict (failure)
+sub AreConnectorPortsValid
+{
+ # parse parameters
+ my( $secure_port, $unsecure_port, $agent_secure_port,
+ $ee_secure_port, $admin_secure_port ) = @_;
+
+
+ if( $secure_port == -1 && $agent_secure_port == -1)
+ {
+ return 0;
+ }
+
+ if( $secure_port >= 0 && $agent_secure_port >= 0)
+ {
+ return 0;
+ }
+
+ if( $secure_port >= 0)
+ {
+ if ( $secure_port == $unsecure_port)
+ {
+ return 0;
+ }
+ return 1;
+ }
+
+ # Now make sure none of the separated ports are the same
+ if( ($agent_secure_port == $admin_secure_port) ||
+ ( $agent_secure_port == $ee_secure_port) ||
+ ( $ee_secure_port == $admin_secure_port) )
+ {
+ return 0;
+ }
+
+ return 1;
+
+}
+
# arg0 username
# arg1 port
@@ -1865,6 +1910,7 @@ sub copy_directory
my $result = 0;
+ emit("copy_directory(): source=> $source_dir_path dest=> $dest_dir_path \n","debug");
if( !is_path_valid( $source_dir_path ) ) {
emit( "copy_directory(): illegal source path => $source_dir_path.\n",
"error" );
@@ -1917,6 +1963,7 @@ sub remove_directory
{
my( $dir ) = $_[0];
+ emit("remove_directory(): " . $dir . "\n","debug");
my $result = 0;
if( !is_path_valid( $dir ) ) {