aboutsummaryrefslogtreecommitdiff
path: root/files/usr/local/libexec
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-10-03 08:37:38 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-10-03 08:37:38 -0400
commit47f90d0916ac34ef132e3bb6da92a4a67dffbba8 (patch)
tree764a6aee2dea7a69096eba27c4264776f8190380 /files/usr/local/libexec
parentee583b5929925b2e9658385430da4f73b4883287 (diff)
downloadinfrastructure-47f90d0916ac34ef132e3bb6da92a4a67dffbba8.tar.gz
add postfix/rspamd
Diffstat (limited to 'files/usr/local/libexec')
-rw-r--r--files/usr/local/libexec/idm-ssh-authorized-keys.common4
-rw-r--r--files/usr/local/libexec/idm-ssh-known-hosts.common4
2 files changed, 4 insertions, 4 deletions
diff --git a/files/usr/local/libexec/idm-ssh-authorized-keys.common b/files/usr/local/libexec/idm-ssh-authorized-keys.common
index d18b199..89d2f20 100644
--- a/files/usr/local/libexec/idm-ssh-authorized-keys.common
+++ b/files/usr/local/libexec/idm-ssh-authorized-keys.common
@@ -20,7 +20,7 @@ close($fh);
my $mech = $config{SASL_MECH} // 'GSSAPI';
my $uri = $config{URI} // quit('URI not specified');
-my $basedn = $config{BASE} // quit('BASE not specified');
+my $basedn = $config{USERS_BASE} // quit('USERS_BASE not specified');
@ARGV == 1 or die "usage: $0 USERNAME\n";
my $username = $ARGV[0];
@@ -32,7 +32,7 @@ $status->code and die "$0: ".$status->error;
my $search = $conn->search(
scope => 'sub',
- base => "ou=accounts,$basedn",
+ base => $basedn,
filter => '(&(objectClass=posixAccount)(sshPublicKey=*)(uid=' . escape_filter_value($username) . '))',
attrs => ['sshPublicKey']);
$search->code and die "$0: ".$search->error;
diff --git a/files/usr/local/libexec/idm-ssh-known-hosts.common b/files/usr/local/libexec/idm-ssh-known-hosts.common
index 78b48fc..5b784d6 100644
--- a/files/usr/local/libexec/idm-ssh-known-hosts.common
+++ b/files/usr/local/libexec/idm-ssh-known-hosts.common
@@ -31,7 +31,7 @@ close($fh);
my $mech = $config{SASL_MECH} // 'GSSAPI';
my $uri = $config{URI} // quit('URI not specified');
-my $basedn = $config{BASE} // quit('BASE not specified');
+my $basedn = $config{HOSTS_BASE} // quit('HOSTS_BASE not specified');
my $conn = Net::LDAP->new($uri, version => '3') or quit($@);
my $sasl = Authen::SASL->new($mech);
@@ -40,7 +40,7 @@ $status->code and quit($status->error);
my $search = $conn->search(
scope => 'sub',
- base => "ou=hosts,ou=accounts,$basedn",
+ base => $basedn,
filter => '(&(sshPublicKey=*)(associatedDomain=' . escape_filter_value($hostname) . '))',
attrs => ['sshPublicKey']);
$search->code and quit($search->error);