summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-06-05 20:24:17 -0700
committerTim Prouty <tprouty@samba.org>2009-06-10 13:13:27 -0700
commit2481d8dcd03dfb4dbde50aebdbf3c33565cab429 (patch)
tree6a6775957154e9f8f64c85d6cddaedde753022be /source3
parent6088e554f542c62405148c60fe5dedbee1c9cdd0 (diff)
downloadsamba-2481d8dcd03dfb4dbde50aebdbf3c33565cab429.tar.gz
samba-2481d8dcd03dfb4dbde50aebdbf3c33565cab429.tar.bz2
samba-2481d8dcd03dfb4dbde50aebdbf3c33565cab429.zip
s3: Remove unix_convert handling from createfile implementations
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/onefs_open.c34
-rw-r--r--source3/smbd/open.c33
2 files changed, 8 insertions, 59 deletions
diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c
index 21c5d51f90..4198e5fd56 100644
--- a/source3/modules/onefs_open.c
+++ b/source3/modules/onefs_open.c
@@ -2056,38 +2056,12 @@ NTSTATUS onefs_create_file(vfs_handle_struct *handle,
case_state = set_posix_case_semantics(talloc_tos(), conn);
}
- /* Convert dos path to unix path if it hasn't already been done. */
- if (create_file_flags & CFF_DOS_PATH) {
- struct smb_filename *smb_fname = NULL;
- char *converted_fname;
-
- SET_STAT_INVALID(sbuf);
-
- status = unix_convert(talloc_tos(), conn, fname, &smb_fname,
- 0);
- if (!NT_STATUS_IS_OK(status)) {
- goto fail;
- }
-
- status = get_full_smb_filename(talloc_tos(), smb_fname,
- &converted_fname);
- if (!NT_STATUS_IS_OK(status)) {
- TALLOC_FREE(smb_fname);
- goto fail;
- }
-
- sbuf = smb_fname->st;
- fname = converted_fname;
- TALLOC_FREE(smb_fname);
+ if (psbuf != NULL) {
+ sbuf = *psbuf;
} else {
- if (psbuf != NULL) {
- sbuf = *psbuf;
- } else {
- if (SMB_VFS_STAT(conn, fname, &sbuf) == -1) {
- SET_STAT_INVALID(sbuf);
- }
+ if (SMB_VFS_STAT(conn, fname, &sbuf) == -1) {
+ SET_STAT_INVALID(sbuf);
}
-
}
TALLOC_FREE(case_state);
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 65a1ded1b8..773436fa8e 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -3438,37 +3438,12 @@ NTSTATUS create_file_default(connection_struct *conn,
case_state = set_posix_case_semantics(talloc_tos(), conn);
}
- if (create_file_flags & CFF_DOS_PATH) {
- struct smb_filename *smb_fname = NULL;
- char *converted_fname;
-
- SET_STAT_INVALID(sbuf);
-
- status = unix_convert(talloc_tos(), conn, fname, &smb_fname,
- 0);
- if (!NT_STATUS_IS_OK(status)) {
- goto fail;
- }
-
- status = get_full_smb_filename(talloc_tos(), smb_fname,
- &converted_fname);
- if (!NT_STATUS_IS_OK(status)) {
- TALLOC_FREE(smb_fname);
- goto fail;
- }
-
- sbuf = smb_fname->st;
- fname = converted_fname;
- TALLOC_FREE(smb_fname);
+ if (psbuf != NULL) {
+ sbuf = *psbuf;
} else {
- if (psbuf != NULL) {
- sbuf = *psbuf;
- } else {
- if (SMB_VFS_STAT(conn, fname, &sbuf) == -1) {
- SET_STAT_INVALID(sbuf);
- }
+ if (SMB_VFS_STAT(conn, fname, &sbuf) == -1) {
+ SET_STAT_INVALID(sbuf);
}
-
}
TALLOC_FREE(case_state);