]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Fix a panic message
authorVolker Lendecke <vl@samba.org>
Fri, 9 Jan 2026 09:44:47 +0000 (10:44 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 20 Jan 2026 11:53:34 +0000 (11:53 +0000)
%s is not a proper file name :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/smbd/close.c

index d2d53e779e1d985c74d6a9289965fc8acc21b15c..31daea801cf7ca0303998bb64d056ad2693c6463 100644 (file)
@@ -538,8 +538,11 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
                         (unsigned int)lck_state.del_token->uid);
 
                if (!push_sec_ctx()) {
-                       smb_panic("close_remove_share_mode: file %s. failed to push "
-                                 "sec_ctx.\n");
+                       char *msg = talloc_asprintf(
+                               talloc_tos(),
+                               "close_remove_share_mode: file %s. "
+                               "failed to push sec_ctx.\n", fsp_str_dbg(fsp));
+                       smb_panic(msg);
                }
 
                set_sec_ctx(lck_state.del_token->uid,