]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Make set_current_case_sensitive() static
authorVolker Lendecke <vl@samba.org>
Tue, 13 Dec 2022 16:31:53 +0000 (17:31 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 14 Dec 2022 22:54:29 +0000 (22:54 +0000)
This is a SMB1-only thing

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

index a9060aeafc109a5c81500b0726e5f22d272340f9..b1ad45667a08dbf3bb8c88aa49b310452c203dfa 100644 (file)
@@ -1047,7 +1047,6 @@ void smbd_exit_server_cleanly(const char *const reason) _NORETURN_;
 bool set_conn_connectpath(connection_struct *conn, const char *connectpath);
 bool canonicalize_connect_path(connection_struct *conn);
 NTSTATUS set_conn_force_user_group(connection_struct *conn, int snum);
-void set_current_case_sensitive(connection_struct *conn, uint16_t flags);
 bool chdir_current_service(connection_struct *conn);
 void load_registry_shares(void);
 int add_home_service(const char *service, const char *username, const char *homedir);
index 9edfa2116e957732bd7b371e2aa94e4661a27056..e8542e4c5dc8ac90ab35a402f62bfe6513f48e7d 100644 (file)
@@ -1017,6 +1017,53 @@ static void smb1srv_update_crypto_flags(struct smbXsrv_session *session,
        return;
 }
 
+static void set_current_case_sensitive(connection_struct *conn, uint16_t flags)
+{
+       int snum;
+       enum remote_arch_types ra_type;
+
+       SMB_ASSERT(conn != NULL);
+
+       snum = SNUM(conn);
+
+       if ((conn == last_conn) && (last_flags == flags)) {
+               return;
+       }
+
+       last_conn = conn;
+       last_flags = flags;
+
+       /*
+        * Obey the client case sensitivity requests - only for clients that
+        * support it. */
+       switch (lp_case_sensitive(snum)) {
+       case Auto:
+               /*
+                * 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)) {
+                       /*
+                        * Client can't support per-packet case sensitive
+                        * pathnames. */
+                       conn->case_sensitive = false;
+               } else {
+                       conn->case_sensitive =
+                                       !(flags & FLAG_CASELESS_PATHNAMES);
+               }
+       break;
+       case True:
+               conn->case_sensitive = true;
+               break;
+       default:
+               conn->case_sensitive = false;
+               break;
+       }
+       return;
+}
+
 /****************************************************************************
  Prepare everything for calling the actual request function, and potentially
  call the request function via the "new" interface.
index 6b821e6da70de3f1c2182da0e32e422243ffcbfa..6670b8a5a13a55cc013e5f9152b50f4bba5d83a4 100644 (file)
@@ -90,57 +90,6 @@ bool set_conn_connectpath(connection_struct *conn, const char *connectpath)
        return true;
 }
 
-/****************************************************************************
- Load parameters specific to a connection/service.
-****************************************************************************/
-
-void set_current_case_sensitive(connection_struct *conn, uint16_t flags)
-{
-       int snum;
-       enum remote_arch_types ra_type;
-
-       SMB_ASSERT(conn != NULL);
-
-       snum = SNUM(conn);
-
-       if ((conn == last_conn) && (last_flags == flags)) {
-               return;
-       }
-
-       last_conn = conn;
-       last_flags = flags;
-
-       /*
-        * Obey the client case sensitivity requests - only for clients that
-        * support it. */
-       switch (lp_case_sensitive(snum)) {
-       case Auto:
-               /*
-                * 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)) {
-                       /*
-                        * Client can't support per-packet case sensitive
-                        * pathnames. */
-                       conn->case_sensitive = false;
-               } else {
-                       conn->case_sensitive =
-                                       !(flags & FLAG_CASELESS_PATHNAMES);
-               }
-       break;
-       case True:
-               conn->case_sensitive = true;
-               break;
-       default:
-               conn->case_sensitive = false;
-               break;
-       }
-       return;
-}
-
 bool chdir_current_service(connection_struct *conn)
 {
        const struct smb_filename connectpath_fname = {