initial commit of file from CVS for e-smith-oidentd on Wed 12 Jul 09:01:42 BST 2023

This commit is contained in:
Brian Read
2023-07-12 09:01:42 +01:00
parent 67854ff30a
commit 6844b79b8e
18 changed files with 670 additions and 2 deletions

View File

@@ -0,0 +1 @@
113

View File

@@ -0,0 +1 @@
public

View File

@@ -0,0 +1 @@
disabled

View File

@@ -0,0 +1 @@
service

View File

@@ -0,0 +1,10 @@
{
my $auth = $DB->get('auth');
my $oidentd = $DB->get('oidentd');
if ($auth)
{
$oidentd ||= $DB->new_record('oidentd', {type => 'service'});
$oidentd->merge_props($auth->props);
$auth->delete;
}
}

View File

@@ -0,0 +1,27 @@
{
use esmith::util;
#--------------------------------------------------
# Compute local IP address, netmask and network values.
#--------------------------------------------------
my $ipaddrBits = esmith::util::IPquadToAddr ($LocalIP);
my $netmaskBits = esmith::util::IPquadToAddr ($LocalNetmask);
my $networkBits = $ipaddrBits & $netmaskBits;
#--------------------------------------------------
# Compute our hostid, and the highest hostid, limiting range
# to a class B at most (so we don't get a huge output file).
#--------------------------------------------------
my $myHostid = (~ $netmaskBits) & $ipaddrBits;
my $maxHostid = ((~ $netmaskBits) & 0xffffff) - 1;
$maxHostid = ($maxHostid <= 65534) ? $maxHostid : 65534;
for ($i = 1; $i <= $maxHostid; $i++)
{
my $ip = esmith::util::IPaddrToQuad ($networkBits | $i);
$OUT .= "$ip\tuser$i\t\tUNIX\n";
}
}

View File

@@ -0,0 +1 @@
OIDENTD_OPTIONS="-m -t 10 -q -u daemon -g daemon"