s3: We only need base_name in map_open_params_to_ntcreate
authorVolker Lendecke <vl@samba.org>
Fri, 29 Jul 2011 14:12:16 +0000 (16:12 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 29 Jul 2011 14:43:17 +0000 (16:43 +0200)
source3/smbd/open.c
source3/smbd/proto.h
source3/smbd/reply.c
source3/smbd/trans2.c

index d81c2781108f9391ef8e9d3b12b2777ae77e8e9f..82125832cbc8fa972144f245643f38c056a02cf0 100644 (file)
@@ -1339,7 +1339,7 @@ NTSTATUS fcb_or_dos_open(struct smb_request *req,
  Open a file with a share mode - old openX method - map into NTCreate.
 ****************************************************************************/
 
-bool map_open_params_to_ntcreate(const struct smb_filename *smb_fname,
+bool map_open_params_to_ntcreate(const char *smb_base_fname,
                                 int deny_mode, int open_func,
                                 uint32 *paccess_mask,
                                 uint32 *pshare_mode,
@@ -1355,7 +1355,7 @@ bool map_open_params_to_ntcreate(const struct smb_filename *smb_fname,
 
        DEBUG(10,("map_open_params_to_ntcreate: fname = %s, deny_mode = 0x%x, "
                  "open_func = 0x%x\n",
-                 smb_fname_str_dbg(smb_fname), (unsigned int)deny_mode,
+                 smb_base_fname, (unsigned int)deny_mode,
                  (unsigned int)open_func ));
 
        /* Create the NT compatible access_mask. */
@@ -1430,7 +1430,7 @@ bool map_open_params_to_ntcreate(const struct smb_filename *smb_fname,
 
                case DENY_DOS:
                        private_flags |= NTCREATEX_OPTIONS_PRIVATE_DENY_DOS;
-                       if (is_executable(smb_fname->base_name)) {
+                       if (is_executable(smb_base_fname)) {
                                share_mode = FILE_SHARE_READ|FILE_SHARE_WRITE;
                        } else {
                                if (GET_OPENX_MODE(deny_mode) == DOS_OPEN_RDONLY) {
@@ -1455,7 +1455,7 @@ bool map_open_params_to_ntcreate(const struct smb_filename *smb_fname,
        DEBUG(10,("map_open_params_to_ntcreate: file %s, access_mask = 0x%x, "
                  "share_mode = 0x%x, create_disposition = 0x%x, "
                  "create_options = 0x%x private_flags = 0x%x\n",
-                 smb_fname_str_dbg(smb_fname),
+                 smb_base_fname,
                  (unsigned int)access_mask,
                  (unsigned int)share_mode,
                  (unsigned int)create_disposition,
index 1f414db59fced8c2b9b6cf54433432975e175fa3..763a946a160d6100c454b61db3bc5fd918f8ca46 100644 (file)
@@ -609,7 +609,7 @@ NTSTATUS fcb_or_dos_open(struct smb_request *req,
                         uint32 access_mask,
                         uint32 share_access,
                         uint32 create_options);
-bool map_open_params_to_ntcreate(const struct smb_filename *smb_fname,
+bool map_open_params_to_ntcreate(const char *smb_base_fname,
                                 int deny_mode, int open_func,
                                 uint32 *paccess_mask,
                                 uint32 *pshare_mode,
index e740fb4c570e69ac3254d24a954d0640eb6bc3e3..59ec8f212e5f948bc0feff817731d426cd7da44f 100644 (file)
@@ -1789,7 +1789,7 @@ void reply_open(struct smb_request *req)
                goto out;
        }
 
-       if (!map_open_params_to_ntcreate(smb_fname, deny_mode,
+       if (!map_open_params_to_ntcreate(smb_fname->base_name, deny_mode,
                                         OPENX_FILE_EXISTS_OPEN, &access_mask,
                                         &share_mode, &create_disposition,
                                         &create_options, &private_flags)) {
@@ -1964,7 +1964,8 @@ void reply_open_and_X(struct smb_request *req)
                goto out;
        }
 
-       if (!map_open_params_to_ntcreate(smb_fname, deny_mode, smb_ofun,
+       if (!map_open_params_to_ntcreate(smb_fname->base_name, deny_mode,
+                                        smb_ofun,
                                         &access_mask, &share_mode,
                                         &create_disposition,
                                         &create_options,
@@ -6755,7 +6756,8 @@ NTSTATUS copy_file(TALLOC_CTX *ctx,
        if (!target_is_directory && count) {
                new_create_disposition = FILE_OPEN;
        } else {
-               if (!map_open_params_to_ntcreate(smb_fname_dst_tmp, 0, ofun,
+               if (!map_open_params_to_ntcreate(smb_fname_dst_tmp->base_name,
+                                                0, ofun,
                                                 NULL, NULL,
                                                 &new_create_disposition,
                                                 NULL,
index 90eb40a62f4d539d8958c845451b30a0230e3ae4..859d2adef400952333edea3fea35c171fbd850ce 100644 (file)
@@ -1082,7 +1082,8 @@ static void call_trans2open(connection_struct *conn,
                goto out;
        }
 
-       if (!map_open_params_to_ntcreate(smb_fname, deny_mode, open_ofun,
+       if (!map_open_params_to_ntcreate(smb_fname->base_name, deny_mode,
+                                        open_ofun,
                                         &access_mask, &share_mode,
                                         &create_disposition,
                                         &create_options,