initial commit of file from CVS for smeserver-horde on Sat Mar 23 16:05:15 AEDT 2024

This commit is contained in:
Trevor Batley
2024-03-23 16:05:15 +11:00
parent 21bc0fdf89
commit 46a910a743
129 changed files with 4154 additions and 2 deletions

View File

@@ -0,0 +1 @@
public

View File

@@ -0,0 +1 @@
enabled

View File

@@ -0,0 +1 @@
installed

View File

@@ -0,0 +1 @@
enabled

View File

@@ -0,0 +1 @@
service

View File

@@ -0,0 +1 @@
installed

View File

@@ -0,0 +1 @@
disabled

View File

@@ -0,0 +1 @@
service

View File

@@ -0,0 +1,7 @@
{
#remove access entry for imp as we only accept SSL now
$DB->get_prop_and_delete( 'imp', 'access' );
}

View 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);
}
}

View 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);
}
}