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);
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.
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 = {