From: Jeremy Allison Date: Tue, 8 Jun 2021 20:12:55 +0000 (-0700) Subject: s3: smbd: Ensure we only call get_acl_group_bits() with a valid smb_fname->fsp. X-Git-Tag: tevent-0.11.0~620 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d2ff049ba9b68d017002ce92251e3a03593ef8c5;p=thirdparty%2Fsamba.git s3: smbd: Ensure we only call get_acl_group_bits() with a valid smb_fname->fsp. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index a858edee558..d6b5695f8a7 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -959,8 +959,10 @@ int file_set_dosmode(connection_struct *conn, unixmode = smb_fname->st.st_ex_mode; - get_acl_group_bits(conn, smb_fname, + if (smb_fname->fsp != NULL) { + get_acl_group_bits(conn, smb_fname, &smb_fname->st.st_ex_mode); + } if (S_ISDIR(smb_fname->st.st_ex_mode)) dosmode |= FILE_ATTRIBUTE_DIRECTORY;