From 07675b8fa403c11c7cae39095021a6edfffbae9c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 14 Oct 2024 13:29:21 +0200 Subject: [PATCH] smbd: Fix Bug 15737 Bug: https://bugzilla.samba.org/show_bug.cgi?id=15737 Signed-off-by: Volker Lendecke --- libcli/security/security_token.c | 4 ++++ source3/auth/token_util.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libcli/security/security_token.c b/libcli/security/security_token.c index 79de6e3b31b..d3c4060c50e 100644 --- a/libcli/security/security_token.c +++ b/libcli/security/security_token.c @@ -110,6 +110,10 @@ void security_token_debug(int dbg_class, int dbg_lev, const struct security_toke char *privs = NULL; uint32_t i; + if (!CHECK_DEBUGLVLC(dbg_class, dbg_lev)) { + return; + } + if (!token) { DEBUGC(dbg_class, dbg_lev, ("Security token: (NULL)\n")); TALLOC_FREE(frame); diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c index 023ad7cbb02..51307469397 100644 --- a/source3/auth/token_util.c +++ b/source3/auth/token_util.c @@ -892,6 +892,10 @@ void debug_unix_user_token(int dbg_class, int dbg_lev, uid_t uid, gid_t gid, char *s = NULL; int i; + if (!CHECK_DEBUGLVLC(dbg_class, dbg_lev)) { + return; + } + s = talloc_asprintf(frame, "UNIX token of user %ld\n", (long int)uid); -- 2.39.5