summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 688afab)
raw | patch | inline | side by side (parent: 688afab)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 21 Jul 2008 13:25:39 +0000 (13:25 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 21 Jul 2008 13:25:39 +0000 (13:25 +0000) |
* imported modules do not have to have the same password
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11734 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11734 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server | patch | blob | history | |
gosa-si/modules/ServerPackages.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index 250e0080b376831bdaced8405381f5de7cfee7bb..0b41be35dc0aadd26060444c5aeded95f756106c 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
close (DIR);
}
+#=== FUNCTION ================================================================
+# NAME: password_check
+# PARAMETERS: nothing
+# RETURNS: nothing
+# DESCRIPTION: escalates an critical error if two modules exist which are avaialable by
+# the same password
+#===============================================================================
+sub password_check {
+ my $passwd_hash = {};
+ while (my ($mod_name, $mod_info) = each %$known_modules) {
+ my $mod_passwd = @$mod_info[1];
+ if (not defined $mod_passwd) { next; }
+ if (not exists $passwd_hash->{$mod_passwd}) {
+ $passwd_hash->{$mod_passwd} = $mod_name;
+
+ # escalates critical error
+ } else {
+ &daemon_log("0 ERROR: two loaded modules do have the same password. Please modify the 'key'-parameter in config file");
+ &daemon_log("0 ERROR: module='$mod_name' and module='".$passwd_hash->{$mod_passwd}."'");
+ exit( -1 );
+ }
+ }
+
+}
+
#=== FUNCTION ================================================================
# NAME: sig_int_handler
# PARAMETERS: signal - string - signal arose from system
-# RETURNS: noting
+# RETURNS: nothing
# DESCRIPTION: handels tasks to be done befor signal becomes active
#===============================================================================
sub sig_int_handler {
}
+# import all modules
+&import_modules;
+# check wether all modules are gosa-si valid passwd check
+&password_check;
+
+
POE::Component::Server::TCP->new(
Alias => "TCP_SERVER",
Port => $server_port,
);
-# import all modules
-&import_modules;
-
-# TODO
-# check wether all modules are gosa-si valid passwd check
-
-
-
POE::Kernel->run();
exit;
index ca0a1c8b70ce79663b509659f291c360005be489..d50cdea1600645fa4ed259ffee29409123523ab4 100644 (file)
sub get_module_info {
my @info = ($main::server_address,
- $main::foreign_server_key,
+ $main::ServerPackages_key,
);
return \@info;
}