From e15a9a2b9e56b6e4312e4fd8142bb4a18895d74d Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Fri, 8 Dec 2017 12:50:10 +0300 Subject: [PATCH] Log warning on empty wildcard paths --- src/ejabberd_pkix.erl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/ejabberd_pkix.erl b/src/ejabberd_pkix.erl index 54bf8bc92..7fd7e6286 100644 --- a/src/ejabberd_pkix.erl +++ b/src/ejabberd_pkix.erl @@ -295,7 +295,20 @@ get_certfiles_from_config_options(_State) -> undefined -> []; Paths -> - lists:flatmap(fun wildcard/1, Paths) + lists:flatmap( + fun(Path) -> + case wildcard(Path) of + [] -> + ?WARNING_MSG( + "Path ~s is empty, please " + "make sure ejabberd has " + "sufficient rights to read it", + [Path]), + []; + Fs -> + Fs + end + end, Paths) end, Local = lists:flatmap( fun(OptHost) ->