Code

* gosa-si-server-nobus
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 30 May 2008 10:40:33 +0000 (10:40 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 30 May 2008 10:40:33 +0000 (10:40 +0000)
* under construction

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11122 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/debian/gosa-si-server.install
gosa-si/gosa-si-server-nobus
gosa-si/server/events/databases.pm
gosa-si/tests/client.php

index 4a6fa4af7def072c074fc561dd47ba296f9ad8b3..a596eb45889ac7e3dff7d66122b77ad9da0cd9d9 100644 (file)
@@ -14,4 +14,5 @@ server/events/databases.pm          usr/lib/gosa-si/server/GosaPackages
 server/events/databases.pm          usr/lib/gosa-si/server/ServerPackages
 server/events/krb5.pm               usr/lib/gosa-si/server/GosaPackages
 server/events/logHandling.pm        usr/lib/gosa-si/server/ClientPackages
+server/events/logHandling.pm        usr/lib/gosa-si/server/ServerPackages
 server/events/server_server_com.pm  usr/lib/gosa-si/server/ServerPackages
index 6562c2e806919443ba69273056ed013186c44b5d..ebe24c107b76136385153977ee3ac330b4b539b5 100755 (executable)
@@ -1114,6 +1114,13 @@ sub msg_to_decrypt {
 
         # if message should be processed here -> add message to incoming_db
         if ($done) {
+
+            # if a job or a gosa message comes from a foreign server, fake module to GosaPackages
+            # so gosa-si-server knows how to process this kind of messages
+            if ($header =~ /^gosa_/ || $header =~ /job_/) {
+                $module = "GosaPackages";
+            }
+
             my $res = $incoming_db->add_dbentry( {table=>$incoming_tn,
                     primkey=>[],
                     headertag=>$header,
index 4745c05ed044e058b4de476d02a3b3a827d38a72..bc23786d8a24f956455beefb7652a6b4cafc2675 100644 (file)
@@ -68,7 +68,7 @@ sub query_db {
     my $sql_statement= "SELECT $select FROM $table $where $orderby $limit";
     my $res_hash = $db->select_dbentry($sql_statement);
     
-    my $out_xml = &db_res2si_msg($res_hash, $header, $target, $source);
+    my $out_xml = &db_res2si_msg($res_hash, $header, $source, $target);
     #$out_xml =~ s/<\/xml>/<session_id>$session_id<\/session_id><\/xml>/;
     my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
     if (defined $forward_to_gosa) {
index eec4b88642f3a6cf7f4b103f020d5e034f507c54..b9e35f3b317c16d0e007fed5e5134b4b463ba161 100755 (executable)
@@ -106,8 +106,8 @@ for($count = 1; $count <= $zahl; $count++)
     #$data = "<xml> <header>gosa_krb5_modify_principal</header> <target>00:01:6c:9d:b9:fa</target> <principal>horst@WIRECARD.SYS</principal><source>GOSA</source><max_life>666</max_life></xml>"; 
 
     #$data = "<xml><header>gosa_query_fai_server</header><source>GOSA</source> <target>10.89.1.131:20081</target></xml>";
-    $data = "<xml><header>gosa_query_fai_server</header><source>GOSA</source> <target>10.89.1.31:20081</target></xml>";
     #$data = "<xml> <header>gosa_new_ping</header> <target>00:0c:29:02:e5:4d</target> <source>GOSA</source> </xml>";
+    $data = "<xml> <header>job_ping</header> <source>GOSA</source> <target>00:0c:29:02:e5:4d</target> <macaddress>00:0c:29:02:e5:4d</macaddress><timestamp>29700101000000</timestamp> </xml>";
 
     $sock->write($data);
     $answer = "nothing";