]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Slightly simplify set_current_case_sensitive()
authorVolker Lendecke <vl@samba.org>
Tue, 13 Dec 2022 16:33:29 +0000 (17:33 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 14 Dec 2022 22:54:29 +0000 (22:54 +0000)
Assert this isn't called from SMB2

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb1_process.c

index e8542e4c5dc8ac90ab35a402f62bfe6513f48e7d..8ea68e57a62c1a94f6a0233d2e26e97874d04c4d 100644 (file)
@@ -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. */