diff options
author | Tim Prouty <tprouty@samba.org> | 2009-07-24 18:38:40 -0700 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-07-24 18:51:41 -0700 |
commit | f49f3fcb0127b6ed19fec94f93658180ead04ac5 (patch) | |
tree | 0a954660d72ff5e03b6a370f3e6bad68d0ce6f74 /source3/smbd/trans2.c | |
parent | 7197ba3abd6dfad74a28d5e3f8a73367ab22810b (diff) | |
download | samba-f49f3fcb0127b6ed19fec94f93658180ead04ac5.tar.gz samba-f49f3fcb0127b6ed19fec94f93658180ead04ac5.tar.bz2 samba-f49f3fcb0127b6ed19fec94f93658180ead04ac5.zip |
s3: Convert a few callers of unix_convert() over to filename_convert()
This patch also changes the unix convert flags to make sure the
correct semantics are preservered for allowing/disallowing wildcards
in the last component of the path.
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r-- | source3/smbd/trans2.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 50edf466c3..f34e15b1df 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2091,11 +2091,13 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n", goto out; } - ntstatus = resolve_dfspath_wcard(ctx, conn, - req->flags2 & FLAGS2_DFS_PATHNAMES, - directory, - &directory, - &mask_contains_wcard); + ntstatus = filename_convert(ctx, conn, + req->flags2 & FLAGS2_DFS_PATHNAMES, + directory, + (UCF_SAVE_LCOMP | + UCF_ALWAYS_ALLOW_WCARD_LCOMP), + &mask_contains_wcard, + &smb_dname); if (!NT_STATUS_IS_OK(ntstatus)) { if (NT_STATUS_EQUAL(ntstatus,NT_STATUS_PATH_NOT_COVERED)) { reply_botherror(req, NT_STATUS_PATH_NOT_COVERED, @@ -2106,23 +2108,10 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n", goto out; } - ntstatus = unix_convert(ctx, conn, directory, &smb_dname, - (UCF_SAVE_LCOMP | UCF_ALLOW_WCARD_LCOMP)); - if (!NT_STATUS_IS_OK(ntstatus)) { - reply_nterror(req, ntstatus); - goto out; - } - mask = smb_dname->original_lcomp; directory = smb_dname->base_name; - ntstatus = check_name(conn, directory); - if (!NT_STATUS_IS_OK(ntstatus)) { - reply_nterror(req, ntstatus); - goto out; - } - p = strrchr_m(directory,'/'); if(p == NULL) { /* Windows and OS/2 systems treat search on the root '\' as if it were '\*' */ @@ -5823,7 +5812,8 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn, status = unix_convert(ctx, conn, base_name, &smb_fname_dst, (UCF_SAVE_LCOMP | (dest_has_wcard ? - UCF_ALLOW_WCARD_LCOMP : 0))); + UCF_ALWAYS_ALLOW_WCARD_LCOMP : + 0))); /* If an error we expect this to be * NT_STATUS_OBJECT_PATH_NOT_FOUND */ |