From baac3a659eef667919bdcc21450ec92fdbbeaec1 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 | 5 +++++ source3/auth/token_util.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/libcli/security/security_token.c b/libcli/security/security_token.c index 79de6e3..b53007f 100644 --- a/libcli/security/security_token.c +++ b/libcli/security/security_token.c @@ -110,6 +110,11 @@ 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)) { + TALLOC_FREE(frame); + 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 023ad7c..6ed3588 100644 --- a/source3/auth/token_util.c +++ b/source3/auth/token_util.c @@ -892,6 +892,11 @@ 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)) { + TALLOC_FREE(frame); + return; + } + s = talloc_asprintf(frame, "UNIX token of user %ld\n", (long int)uid); -- 1.8.3.1