libnftables: do not re-add default include directory in include search
Pablo Neira Ayuso
maintainerPATCH 1/1 libnftables: do not re-add default include directory in include search
Otherwise globbing might duplicate included files because include_path_glob() is called twice.
Fixes 7eb950a8e8fa ("libnftables: include canonical path to avoid duplicates")
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- src/libnftables.c | 3 +++ 1 file changed, 3 insertions(+)
src/libnftables.c +3 -0
@@ -176,6 +176,9 @@ static bool nft_ctx_find_include_path(struct nft_ctx *ctx, const char *path)return true; } +if (!strcmp (path,DEFAULT_INCLUDE_PATH )) +return true; +return false; }
Signature · 1 line
2.30.2
Quoted 5 lines · Pablo Neira Ayuso
Otherwise globbing might duplicate included files because
include_path_glob()is called twice.Fixes 7eb950a8e8fa ("libnftables: include canonical path to avoid duplicates")Signed-off-by Pablo Neira Ayuso <[email protected]>
Tested-by Jeremy Sowden <[email protected]>
LGTM. Will get this into Debian.
Thanks, Pablo.
J.
Quoted 22 lines
---
src/libnftables.c| 3 +++1 file changed, 3 insertions(+)src/libnftables.c +3
-0@@ -176,6 +176,9 @@ static bool nft_ctx_find_include_path(struct nft_ctx *ctx, const char *path)return true; } +if (!strcmp (path,DEFAULT_INCLUDE_PATH )) +return true; +return false; }Signature · 1 line
2.30.2
Pablo Neira Ayuso
maintainerQuoted 10 lines · Jeremy Sowden
Quoted 5 lines · Pablo Neira Ayuso
Otherwise globbing might duplicate included files because
include_path_glob()is called twice.Fixes 7eb950a8e8fa ("libnftables: include canonical path to avoid duplicates")Signed-off-by Pablo Neira Ayuso <[email protected]>Tested-by Jeremy Sowden <[email protected]>LGTM. Will get this into Debian.
Applied, thanks for testing.