richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
Blob Blame History Raw
From d9055b5394aff8a8ec9c75c7cf4fc43f0617e6dd Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
Date: Fri, 17 Jun 2022 14:47:10 +0200
Subject: [PATCH] test: always wrap useradd/userdel when running w/ ASan

since they dlopen() PAM modules, including systemd ones.

(cherry picked from commit 94850fb956458703e0c6e0bee7f482aa41a47e9e)

Related: #2087652
---
 test/test-functions | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test-functions b/test/test-functions
index 77d4a0afff..b5fcf07818 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -2411,9 +2411,9 @@ inst_binary() {
 
     # Same as above, but we need to wrap certain libraries unconditionally
     #
-    # login - dlopen()s (not only) systemd's PAM modules
+    # login, useradd, userdel - dlopen()s (not only) systemd's PAM modules
     # tar - called by machinectl in TEST-25
-    if get_bool "$IS_BUILT_WITH_ASAN" && [[ "$bin" =~ /(login|tar)$ ]]; then
+    if get_bool "$IS_BUILT_WITH_ASAN" && [[ "$bin" =~ /(login|tar|useradd|userdel)$ ]]; then
         wrap_binary=1
     fi