From c108921dcf37115f1e11a93c549c94a4034b6aef Mon Sep 17 00:00:00 2001 From: Valentin Tolmer Date: Mon, 1 Aug 2022 13:55:20 +0200 Subject: [PATCH] server: Add a log message when search is restricted Fixes #264. --- server/src/infra/ldap_handler.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/infra/ldap_handler.rs b/server/src/infra/ldap_handler.rs index b80b0bf..3e0b6e1 100644 --- a/server/src/infra/ldap_handler.rs +++ b/server/src/infra/ldap_handler.rs @@ -15,7 +15,7 @@ use ldap3_server::proto::{ LdapFilter, LdapOp, LdapPartialAttribute, LdapPasswordModifyRequest, LdapResult, LdapResultCode, LdapSearchRequest, LdapSearchResultEntry, LdapSearchScope, }; -use tracing::{debug, instrument, warn}; +use tracing::{debug, info, instrument, warn}; #[derive(Debug, PartialEq, Eq, Clone)] struct LdapDn(String); @@ -738,6 +738,7 @@ impl LdapHandler filters, Some(u) => { + info!("Unpriviledged search, limiting results"); UserRequestFilter::And(vec![filters, UserRequestFilter::UserId((*u).clone())]) } }; @@ -802,6 +803,7 @@ impl LdapHandler filter, Some(u) => { + info!("Unpriviledged search, limiting results"); GroupRequestFilter::And(vec![filter, GroupRequestFilter::Member((*u).clone())]) } };