aboutsummaryrefslogtreecommitdiff
path: root/files/usr/local/libexec/idm-ssh-known-hosts.common
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/idm-ssh-known-hosts.common
parentee583b5929925b2e9658385430da4f73b4883287 (diff)
downloadinfrastructure-47f90d0916ac34ef132e3bb6da92a4a67dffbba8.tar.gz
add postfix/rspamd
Diffstat (limited to 'files/usr/local/libexec/idm-ssh-known-hosts.common')
-rw-r--r--files/usr/local/libexec/idm-ssh-known-hosts.common4
1 files changed, 2 insertions, 2 deletions
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);