From: Volker Lendecke Date: Tue, 13 Dec 2022 16:33:29 +0000 (+0100) Subject: smbd: Slightly simplify set_current_case_sensitive() X-Git-Tag: talloc-2.4.0~238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d48481118bc5e2dd8999fc112967a99e508ddf80;p=thirdparty%2Fsamba.git smbd: Slightly simplify set_current_case_sensitive() Assert this isn't called from SMB2 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/smb1_process.c b/source3/smbd/smb1_process.c index e8542e4c5dc..8ea68e57a62 100644 --- a/source3/smbd/smb1_process.c +++ b/source3/smbd/smb1_process.c @@ -1023,6 +1023,7 @@ static void set_current_case_sensitive(connection_struct *conn, uint16_t flags) enum remote_arch_types ra_type; SMB_ASSERT(conn != NULL); + SMB_ASSERT(!conn->sconn->using_smb2); snum = SNUM(conn); @@ -1042,9 +1043,7 @@ static void set_current_case_sensitive(connection_struct *conn, uint16_t flags) * We need this uglyness due to DOS/Win9x clients that lie * about case insensitivity. */ ra_type = get_remote_arch(); - if (conn->sconn->using_smb2) { - conn->case_sensitive = false; - } else if ((ra_type != RA_SAMBA) && (ra_type != RA_CIFSFS)) { + if ((ra_type != RA_SAMBA) && (ra_type != RA_CIFSFS)) { /* * Client can't support per-packet case sensitive * pathnames. */