Roman Dmitriev преди 2 години
родител
ревизия
e5282f12b3
променени са 4 файла, в които са добавени 8 реда и са изтрити 8 реда
  1. 2 2
      html/cfg/config.sample.php
  2. 2 2
      scripts/Rstat/config.pm
  3. 3 3
      scripts/cfg/config.sample
  4. 1 1
      updates/2-4-12/upgrade-to-2-4-12.pl

+ 2 - 2
html/cfg/config.sample.php

@@ -27,7 +27,7 @@ define("SNMP_timeout","500000");
 define("SNMP_retry","1");
 
 #crypt config - CHANGE IT!!!
-define("ENCRYPTION_KEY","!!!CHANGE_ME!!!");
-define("ENCRYPTION_IV","123456782345");
+define("ENCRYPTION_KEY","!!!CHANGE_ME!!!!");
+define("ENCRYPTION_IV","0123456789012345");
 
 ?>

+ 2 - 2
scripts/Rstat/config.pm

@@ -144,8 +144,8 @@ $config_ref{nagios_dir}=~s/\/$//;
 $config_ref{nagios_cmd}=$Config->{_}->{nagios_cmd} || '/var/spool/nagios/cmd/nagios.cmd';
 $config_ref{nagios_event_socket}=$Config->{_}->{nagios_event_socket} || '/var/spool/nagios/hoststate.socket';
 
-$config_ref{encryption_key}=Config->{_}->{encryption_key} || '!!!CHANGE_ME!!!';
-$config_ref{encryption_iv}=Config->{_}->{encryption_iv} || '123456782345';
+$config_ref{encryption_key}=$Config->{_}->{encryption_key} || '!!!CHANGE_ME!!!';
+$config_ref{encryption_iv}=$Config->{_}->{encryption_iv} || '123456782345';
 
 our $MY_NAME=$FN[-1];
 our $SPID="/var/run/".$FN[-1];

+ 3 - 3
scripts/cfg/config.sample

@@ -37,6 +37,6 @@ nagios_dir=/etc/nagios4
 nagios_cmd=/var/spool/nagios4/cmd/nagios.cmd
 nagios_event_socket=/var/spool/nagios4/hoststate.socket
 
-#crypt config
-encryption_key="!!!CHANGE_ME!!!"
-encryption_iv="123456782345"
+#crypt config - 8/16/24 char and equal length
+encryption_key=!!!CHANGE_ME!!!!
+encryption_iv=0123456789012345

+ 1 - 1
updates/2-4-12/upgrade-to-2-4-12.pl

@@ -15,7 +15,7 @@ use Rstat::net_utils;
 use strict;
 use warnings;
 
-if ($config_ref{encryption_key}=~/change_me/i)) { print "Set encryption key please!\n"; exit 100; }
+if ($config_ref{encryption_key}=~/change_me/i) { print "Set encryption key please!\n"; exit 100; }
 
 print "Stage 1: Migrate default password\n";