594167
From d9055b5394aff8a8ec9c75c7cf4fc43f0617e6dd Mon Sep 17 00:00:00 2001
594167
From: Frantisek Sumsal <frantisek@sumsal.cz>
594167
Date: Fri, 17 Jun 2022 14:47:10 +0200
594167
Subject: [PATCH] test: always wrap useradd/userdel when running w/ ASan
594167
594167
since they dlopen() PAM modules, including systemd ones.
594167
594167
(cherry picked from commit 94850fb956458703e0c6e0bee7f482aa41a47e9e)
594167
594167
Related: #2087652
594167
---
594167
 test/test-functions | 4 ++--
594167
 1 file changed, 2 insertions(+), 2 deletions(-)
594167
594167
diff --git a/test/test-functions b/test/test-functions
594167
index 77d4a0afff..b5fcf07818 100644
594167
--- a/test/test-functions
594167
+++ b/test/test-functions
594167
@@ -2411,9 +2411,9 @@ inst_binary() {
594167
 
594167
     # Same as above, but we need to wrap certain libraries unconditionally
594167
     #
594167
-    # login - dlopen()s (not only) systemd's PAM modules
594167
+    # login, useradd, userdel - dlopen()s (not only) systemd's PAM modules
594167
     # tar - called by machinectl in TEST-25
594167
-    if get_bool "$IS_BUILT_WITH_ASAN" && [[ "$bin" =~ /(login|tar)$ ]]; then
594167
+    if get_bool "$IS_BUILT_WITH_ASAN" && [[ "$bin" =~ /(login|tar|useradd|userdel)$ ]]; then
594167
         wrap_binary=1
594167
     fi
594167