From: Ralph Boehme Date: Thu, 22 Oct 2020 09:10:32 +0000 (+0200) Subject: smbd: remove use of UCF_UNIX_NAME_LOOKUP X-Git-Tag: talloc-2.3.2~139 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df92b06f5beba89d1394bb38f6ab6d354cfc88e2;p=thirdparty%2Fsamba.git smbd: remove use of UCF_UNIX_NAME_LOOKUP This is now handled by SMB_FILENAME_POSIX_PATH. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 2c15366172d..8dfc97c8586 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -8270,13 +8270,9 @@ void reply_mv(struct smb_request *req) struct smb_filename *smb_fname_dst = NULL; const char *dst_original_lcomp = NULL; uint32_t src_ucf_flags = ucf_flags_from_smb_request(req) | - (req->posix_pathnames ? - UCF_UNIX_NAME_LOOKUP : - UCF_ALWAYS_ALLOW_WCARD_LCOMP); + (!req->posix_pathnames ? UCF_ALWAYS_ALLOW_WCARD_LCOMP : 0); uint32_t dst_ucf_flags = ucf_flags_from_smb_request(req) | - (req->posix_pathnames ? - 0 : - UCF_ALWAYS_ALLOW_WCARD_LCOMP); + (!req->posix_pathnames ? UCF_ALWAYS_ALLOW_WCARD_LCOMP : 0); bool stream_rename = false; START_PROFILE(SMBmv); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 5a9ec8a467e..424b9bf5cfb 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2797,7 +2797,6 @@ close_if_end = %d requires_resume_key = %d backup_priv = %d level = 0x%x, max_da if (req->posix_pathnames) { /* Always use filesystem for UNIX mtime query. */ ask_sharemode = false; - ucf_flags |= UCF_UNIX_NAME_LOOKUP; } if (req->posix_pathnames) { @@ -6146,12 +6145,6 @@ static void call_trans2qfilepathinfo(connection_struct *conn, reply_nterror(req, NT_STATUS_INVALID_LEVEL); return; } - if (info_level == SMB_QUERY_FILE_UNIX_BASIC || - info_level == SMB_QUERY_FILE_UNIX_INFO2 || - info_level == SMB_QUERY_FILE_UNIX_LINK || - req->posix_pathnames) { - ucf_flags |= UCF_UNIX_NAME_LOOKUP; - } } if (req->posix_pathnames) { @@ -9390,14 +9383,6 @@ static void call_trans2setfilepathinfo(connection_struct *conn, return; } - if (info_level == SMB_SET_FILE_UNIX_BASIC || - info_level == SMB_SET_FILE_UNIX_INFO2 || - info_level == SMB_FILE_RENAME_INFORMATION || - info_level == SMB_POSIX_PATH_OPEN || - info_level == SMB_POSIX_PATH_UNLINK) { - ucf_flags |= UCF_UNIX_NAME_LOOKUP; - } - status = filename_convert(req, conn, fname, ucf_flags,