From c49dc7c88574688b109e456ffd0c8bca489f88ed Mon Sep 17 00:00:00 2001 From: rettenbe Date: Thu, 29 May 2008 15:43:00 +0000 Subject: [PATCH] * gosa-si-server-nobus * under construction git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11113 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/debian/gosa-si-server.install | 2 +- gosa-si/gosa-si-server-nobus | 15 ++++++++++++-- gosa-si/modules/GosaPackages.pm | 30 --------------------------- gosa-si/tests/client.php | 4 ++-- 4 files changed, 16 insertions(+), 35 deletions(-) diff --git a/gosa-si/debian/gosa-si-server.install b/gosa-si/debian/gosa-si-server.install index 1dd8d8661..920b87f38 100644 --- a/gosa-si/debian/gosa-si-server.install +++ b/gosa-si/debian/gosa-si-server.install @@ -10,7 +10,7 @@ modules/ServerPackages.pm usr/lib/gosa-si/modules server/events/gosaTriggered.pm usr/lib/gosa-si/server/GosaPackages server/events/siTriggered.pm usr/lib/gosa-si/server/ClientPackages server/events/clMessages.pm usr/lib/gosa-si/server/ClientPackages -server/events/databases.pm usr/lib/gosa-si/server/ClientPackages +server/events/databases.pm usr/lib/gosa-si/server/GosaPackages server/events/krb5.pm usr/lib/gosa-si/server/GosaPackages server/events/logHandling.pm usr/lib/gosa-si/server/ClientPackages server/events/server_server_com.pm usr/lib/gosa-si/server/ServerPackages diff --git a/gosa-si/gosa-si-server-nobus b/gosa-si/gosa-si-server-nobus index 624c7b808..ac627c659 100755 --- a/gosa-si/gosa-si-server-nobus +++ b/gosa-si/gosa-si-server-nobus @@ -1054,7 +1054,8 @@ sub msg_to_decrypt { } $error++; } - + + my $header; my $target; my $source; @@ -1067,6 +1068,12 @@ sub msg_to_decrypt { $target = @{$msg_hash->{'target'}}[0]; $source = @{$msg_hash->{'source'}}[0]; + # target and source is equal to GOSA -> process here + if (not $done) { + if ($target eq "GOSA" && $source eq "GOSA") { + $done = 1; + } + } # target is own address without forward_to_gosa-tag -> process here if (not $done) { @@ -1088,6 +1095,7 @@ sub msg_to_decrypt { } } + # if message should be processed here -> add message to incoming_db if ($done) { my $res = $incoming_db->add_dbentry( {table=>$incoming_tn, @@ -1160,8 +1168,11 @@ sub msg_to_decrypt { } } - + if (not $done) { + daemon_log("$session_id ERROR: do not know what to do with this message: $msg", 1); + } } + return; } diff --git a/gosa-si/modules/GosaPackages.pm b/gosa-si/modules/GosaPackages.pm index 2986f3b29..c744f9b4c 100644 --- a/gosa-si/modules/GosaPackages.pm +++ b/gosa-si/modules/GosaPackages.pm @@ -227,36 +227,6 @@ sub get_ip { } -#sub import_events { -# if (not -e $event_dir) { -# &main::daemon_log("G ERROR: cannot find directory or directory is not readable: $event_dir", 1); -# } -# opendir (DIR, $event_dir) or die "ERROR while loading gosa-si-events from directory $event_dir : $!\n"; -# -# while (defined (my $event = readdir (DIR))) { -# if( $event eq "." || $event eq ".." ) { next; } -# if( $event eq "siTriggered.pm" ) { next; } # SI specific events not needed in GosaPackages.pm -# if( $event eq "clMessages.pm" ) { next; } # SI specific events not needed in GosaPackages.pm -# -# eval{ require $event; }; -# if( $@ ) { -# &main::daemon_log("G ERROR: import of event module '$event' failed", 1); -# &main::daemon_log("$@", 1); -# next; -# } -# -# $event =~ /(\S*?).pm$/; -# my $event_module = $1; -# my $events_l = eval( $1."::get_events()") ; -# foreach my $event_name (@{$events_l}) { -# $event_hash->{$event_name} = $event_module; -# } -# my $events_string = join( ", ", @{$events_l}); -# &main::daemon_log("G DEBUG: GosaPackages from '$1' imported events $events_string", 8); -# } -#} - - #=== FUNCTION ================================================================ # NAME: process_incoming_msg # PARAMETERS: crypted_msg - string - incoming crypted message diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index 2be71dd8a..461ce4293 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -105,8 +105,8 @@ for($count = 1; $count <= $zahl; $count++) #$data = "
gosa_krb5_create_principal
00:01:6c:9d:aa:16 horst@WIRECARD.SYSGOSA666
"; #$data = "
gosa_krb5_modify_principal
00:01:6c:9d:b9:fa horst@WIRECARD.SYSGOSA666
"; - #$data = "
gosa_new_ping
10.89.1.31:20083 GOSA
"; - $data = "
gosa_new_ping
00:0c:29:02:e5:4d GOSA
"; + $data = "
gosa_query_fai_server
GOSA 10.89.1.131:20081
"; + #$data = "
gosa_new_ping
00:0c:29:02:e5:4d GOSA
"; $sock->write($data); $answer = "nothing"; -- 2.30.2