initial commit of file from CVS for smeserver-horde on Sat Mar 23 16:05:15 AEDT 2024
This commit is contained in:
1
root/etc/e-smith/db/configuration/defaults/horde/access
Normal file
1
root/etc/e-smith/db/configuration/defaults/horde/access
Normal file
@@ -0,0 +1 @@
|
||||
public
|
@@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/horde/imp
Normal file
1
root/etc/e-smith/db/configuration/defaults/horde/imp
Normal file
@@ -0,0 +1 @@
|
||||
installed
|
1
root/etc/e-smith/db/configuration/defaults/horde/status
Normal file
1
root/etc/e-smith/db/configuration/defaults/horde/status
Normal file
@@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/horde/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/horde/type
Normal file
@@ -0,0 +1 @@
|
||||
service
|
1
root/etc/e-smith/db/configuration/defaults/imp/imp
Normal file
1
root/etc/e-smith/db/configuration/defaults/imp/imp
Normal file
@@ -0,0 +1 @@
|
||||
installed
|
1
root/etc/e-smith/db/configuration/defaults/imp/status
Normal file
1
root/etc/e-smith/db/configuration/defaults/imp/status
Normal file
@@ -0,0 +1 @@
|
||||
disabled
|
1
root/etc/e-smith/db/configuration/defaults/imp/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/imp/type
Normal file
@@ -0,0 +1 @@
|
||||
service
|
7
root/etc/e-smith/db/configuration/migrate/50horde
Normal file
7
root/etc/e-smith/db/configuration/migrate/50horde
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
#remove access entry for imp as we only accept SSL now
|
||||
$DB->get_prop_and_delete( 'imp', 'access' );
|
||||
|
||||
|
||||
|
||||
}
|
32
root/etc/e-smith/db/configuration/migrate/HordePassword
Normal file
32
root/etc/e-smith/db/configuration/migrate/HordePassword
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
my $horderec = $DB->get('horde')
|
||||
|| $DB->new_record('horde', {type => 'service'});
|
||||
my $horde_pw = $horderec->prop('DbPassword');
|
||||
if (not $horde_pw or length($horde_pw) < 57)
|
||||
{
|
||||
use MIME::Base64 qw(encode_base64);
|
||||
|
||||
$horde_pw = "not set due to error";
|
||||
if ( open( RANDOM, "/dev/urandom" ) )
|
||||
{
|
||||
my $buf;
|
||||
# 57 bytes is a full line of Base64 coding, and contains
|
||||
# 456 bits of randomness - given a perfectly random /dev/random
|
||||
if ( read( RANDOM, $buf, 57 ) != 57 )
|
||||
{
|
||||
warn("Short read from /dev/random: $!");
|
||||
}
|
||||
else
|
||||
{
|
||||
$horde_pw = encode_base64($buf);
|
||||
chomp $horde_pw;
|
||||
}
|
||||
close RANDOM;
|
||||
}
|
||||
else
|
||||
{
|
||||
warn "Could not open /dev/urandom: $!";
|
||||
}
|
||||
$horderec->set_prop('DbPassword', $horde_pw);
|
||||
}
|
||||
}
|
32
root/etc/e-smith/db/configuration/migrate/HordeSecret
Normal file
32
root/etc/e-smith/db/configuration/migrate/HordeSecret
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
my $horderec = $DB->get('horde')
|
||||
|| $DB->new_record('horde', {type => 'service'});
|
||||
my $horde_secret = $horderec->prop('SecretKey');
|
||||
if (not $horde_secret or length($horde_secret) < 57)
|
||||
{
|
||||
use MIME::Base64 qw(encode_base64);
|
||||
|
||||
$horde_secret = "not set due to error";
|
||||
if ( open( RANDOM, "/dev/urandom" ) )
|
||||
{
|
||||
my $buf;
|
||||
# 57 bytes is a full line of Base64 coding, and contains
|
||||
# 456 bits of randomness - given a perfectly random /dev/random
|
||||
if ( read( RANDOM, $buf, 57 ) != 57 )
|
||||
{
|
||||
warn("Short read from /dev/random: $!");
|
||||
}
|
||||
else
|
||||
{
|
||||
$horde_secret = encode_base64($buf);
|
||||
chomp $horde_secret;
|
||||
}
|
||||
close RANDOM;
|
||||
}
|
||||
else
|
||||
{
|
||||
warn "Could not open /dev/urandom: $!";
|
||||
}
|
||||
$horderec->set_prop('SecretKey', $horde_secret);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user