From a6bd0761d11a7821d5436668b5fcd3d85dc17064 Mon Sep 17 00:00:00 2001 From: Nigel Kukard Date: Sat, 1 Oct 2016 18:41:07 +0000 Subject: [PATCH] Only use CN and awitLoginHostAlias to find hosts When using awitLoginHost the results get messy as many hosts can be returned if one is using port knocking or port forwarding. --- awit-ssh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awit-ssh b/awit-ssh index 2dfc288..778c3e3 100755 --- a/awit-ssh +++ b/awit-ssh @@ -54,7 +54,7 @@ use User::pwent; my $NAME = "AWIT-SSH-Client"; -our $VERSION = "0.7.1"; +our $VERSION = "0.7.2"; print(STDERR "$NAME v$VERSION - Copyright (c) 2016, AllWorldIT\n\n"); @@ -258,7 +258,7 @@ my $mesg = $ldap->bind("cn=$username,ou=Users,$ldapBase",password => $password); # Search $mesg = $ldap->search( base => "ou=Servers,$ldapBase", - filter => "(|(cn=$loginHost)(awitLoginHost=$loginHost)(awitLoginHostAlias=$loginHost))", + filter => "(|(cn=$loginHost)(awitLoginHostAlias=$loginHost))", ); # Check for error if (my $mesgCode = $mesg->code()) { -- GitLab