summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 815509e)
raw | patch | inline | side by side (parent: 815509e)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 Dec 2007 07:48:57 +0000 (07:48 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 Dec 2007 07:48:57 +0000 (07:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8034 594d385d-05f5-0310-b6e9-bd551577e9d8
contrib/daemon/gosa-sc | patch | blob | history | |
contrib/daemon/gosa-sd | patch | blob | history | |
contrib/daemon/gosa-sd-bus | patch | blob | history |
diff --git a/contrib/daemon/gosa-sc b/contrib/daemon/gosa-sc
index c8cd0f04ad6f8cb1d44ea870718ba543adb635a1..1cc276f11718b023d4c6e85410f681bb02ca30c0 100755 (executable)
--- a/contrib/daemon/gosa-sc
+++ b/contrib/daemon/gosa-sc
#===============================================================================
sub create_ciphering {
my ($passwd) = @_;
- $passwd = substr("$passwd"x32, 0, 32);
+ $passwd = substr("$passwd" x 32, 0, 32);
my $my_cipher = Crypt::Rijndael->new($passwd , Crypt::Rijndael::MODE_CBC );
return $my_cipher;
diff --git a/contrib/daemon/gosa-sd b/contrib/daemon/gosa-sd
index ed72ccc5e0a23f8e03505c08568bd960b9bcbcc0..ef3eec74c52a57abb4a7764405791ef886000d51 100755 (executable)
--- a/contrib/daemon/gosa-sd
+++ b/contrib/daemon/gosa-sd
#===============================================================================
sub create_ciphering {
my ($passwd) = @_;
- $passwd = substr("$passwd"x32, 0, 32);
+ $passwd = substr("$passwd" x 32, 0, 32);
my $my_cipher = Crypt::Rijndael->new($passwd , Crypt::Rijndael::MODE_CBC );
return $my_cipher;
index f4282e39d138a0c7b95249a912fd2c5aab33b8ed..6010ff0e51d0eccfbe7b6b81e955d7dc62233d28 100755 (executable)
}
my $l = @valid_keys;
- daemon_log("number of valid daemon_keys: $l\n", 7);
+ daemon_log("number of valid daemons: $l\n", 7);
my ($msg, $msg_hash);
my $msg_flag = 0;
# collect addresses from possible incoming clients
foreach my $host_key (@valid_keys) {
eval{
- daemon_log( "key: $host_key\n", 7);
+ daemon_log( "daemon: $host_key\n", 7);
my $key_passwd = $known_daemons->{$host_key}->{passwd};
- daemon_log("key_passwd: $key_passwd\n", 7);
+ daemon_log("daemon_passwd: $key_passwd\n", 7);
my $key_cipher = &create_ciphering($key_passwd);
$msg = &decrypt_msg($crypted_msg, $key_cipher);
+ daemon_log("daemon decrypted msg: $msg", 7);
$msg_hash = $xml->XMLin($msg, ForceArray=>1);
};
if($@) {
- daemon_log("key raise error", 7);
+ daemon_log("msg processing raise error", 7);
+ daemon_log("error string: $@", 7);
$msg_flag += 1;
} else {
last;
#}
+#=== FUNCTION ================================================================
+# NAME: create_passwd
+# PARAMETERS: nothing
+# RETURNS: new_passwd - string
+# DESCRIPTION: creates a 32 bit long random passwd out of "a".."z","A".."Z",0..9
+#===============================================================================
+sub create_passwd {
+ my $new_passwd = "";
+ for(my $i=0; $i<31; $i++) {
+ $new_passwd .= ("a".."z","A".."Z",0..9)[int(rand(62))]
+ }
+ return $new_passwd;
+}
+
+
+#=== FUNCTION ================================================================
+# NAME: create_ciphering
+# PARAMETERS: passwd - string - used to create ciphering
+# RETURNS: cipher - object
+# DESCRIPTION: creates a Crypt::Rijndael::MODE_CBC object with passwd as key
+#===============================================================================
+sub create_ciphering {
+ my ($passwd) = @_;
+ $passwd = substr("$passwd" x 32, 0, 32);
+ my $my_cipher = Crypt::Rijndael->new($passwd , Crypt::Rijndael::MODE_CBC );
+ return $my_cipher;
+}
+
+
#=== FUNCTION ================================================================
# NAME: encrypt_msg
# PARAMETERS: msg - string - message to encrypt
}
-#=== FUNCTION ================================================================
-# NAME: create_ciphering
-# PARAMETERS: passwd - string - used to create ciphering
-# RETURNS: cipher - object
-# DESCRIPTION: creates a Crypt::Rijndael::MODE_CBC object with passwd as key
-#===============================================================================
-sub create_ciphering {
- my ($passwd) = @_;
- $passwd = substr("$passwd"x32, 0, 32);
- my $my_cipher = Crypt::Rijndael->new($passwd , Crypt::Rijndael::MODE_CBC );
- return $my_cipher;
-}
-
-
-#=== FUNCTION ================================================================
-# NAME: create_passwd
-# PARAMETERS: nothing
-# RETURNS: new_passwd - string
-# DESCRIPTION: creates a 32 bit long random passwd out of "a".."z","A".."Z",0..9
-#===============================================================================
-sub create_passwd {
- my $new_passwd = "";
- for(my $i=0; $i<31; $i++) {
- $new_passwd .= ("a".."z","A".."Z",0..9)[int(rand(62))]
- }
- return $new_passwd;
-}
-
-
#=== FUNCTION ================================================================
# NAME: here_i_am
# PARAMETERS: msg_hash - hash - hash from function create_xml_hash