[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha7-2292-g04afa4b
Tim Prouty
tprouty at samba.org
Sat Jun 13 00:13:49 GMT 2009
The branch, master has been updated
via 04afa4b6b50f3a23a1872983c75653dc5f670279 (commit)
via 9d7c4ad7482d0c5cff6d15324f82767c851bbf43 (commit)
from f409b00dc7100bfd574848a4d3ebd04ef3825baf (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 04afa4b6b50f3a23a1872983c75653dc5f670279
Author: Tim Prouty <tprouty at samba.org>
Date: Fri Jun 12 12:54:11 2009 -0700
s3: Plumb smb_filename through SMB_VFS_CREATE_FILE
commit 9d7c4ad7482d0c5cff6d15324f82767c851bbf43
Author: Tim Prouty <tprouty at samba.org>
Date: Fri Jun 12 12:41:19 2009 -0700
s3: Add smb_filename utility functions and fix a bug in copy_smb_filename
-----------------------------------------------------------------------
Summary of changes:
source3/include/proto.h | 17 +++-
source3/include/vfs.h | 10 +-
source3/include/vfs_macros.h | 6 +-
source3/modules/vfs_default.c | 14 ++--
source3/modules/vfs_full_audit.c | 20 ++---
source3/printing/nt_printing.c | 74 +++++++-----------
source3/rpc_server/srv_srvsvc_nt.c | 32 ++------
source3/smbd/filename.c | 90 ++++++++++++++++++++-
source3/smbd/nttrans.c | 103 +++++++++++--------------
source3/smbd/open.c | 115 +++++++++++++--------------
source3/smbd/posix_acls.c | 15 +++-
source3/smbd/reply.c | 149 ++++++++++++++----------------------
source3/smbd/smb2_create.c | 13 +---
source3/smbd/trans2.c | 96 +++++++++++++++--------
14 files changed, 386 insertions(+), 368 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/include/proto.h b/source3/include/proto.h
index a0ad282..1c7ba87 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6362,6 +6362,15 @@ int fsp_stat(files_struct *fsp, SMB_STRUCT_STAT *pst);
NTSTATUS get_full_smb_filename(TALLOC_CTX *ctx, const struct smb_filename *smb_fname,
char **full_name);
+NTSTATUS create_synthetic_smb_fname(TALLOC_CTX *ctx, const char *base_name,
+ const char *stream_name,
+ SMB_STRUCT_STAT *psbuf,
+ struct smb_filename **smb_fname_out);
+NTSTATUS create_synthetic_smb_fname_split(TALLOC_CTX *ctx,
+ const char *fname,
+ SMB_STRUCT_STAT *psbuf,
+ struct smb_filename **smb_fname_out);
+char *smb_fname_str_dbg(const struct smb_filename *smb_fname);
NTSTATUS copy_smb_filename(TALLOC_CTX *ctx,
const struct smb_filename *smb_fname_in,
struct smb_filename **smb_fname_out);
@@ -6623,7 +6632,7 @@ NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn,
SMB_STRUCT_STAT *psbuf, files_struct **result);
NTSTATUS close_file_fchmod(struct smb_request *req, files_struct *fsp);
NTSTATUS create_directory(connection_struct *conn, struct smb_request *req,
- const struct smb_filename *smb_dname);
+ struct smb_filename *smb_dname);
void msg_file_was_renamed(struct messaging_context *msg,
void *private_data,
uint32_t msg_type,
@@ -6637,8 +6646,7 @@ NTSTATUS open_streams_for_delete(connection_struct *conn,
NTSTATUS create_file_default(connection_struct *conn,
struct smb_request *req,
uint16_t root_dir_fid,
- const char *fname,
- uint32_t create_file_flags,
+ struct smb_filename * smb_fname,
uint32_t access_mask,
uint32_t share_access,
uint32_t create_disposition,
@@ -6650,8 +6658,7 @@ NTSTATUS create_file_default(connection_struct *conn,
struct ea_list *ea_list,
files_struct **result,
- int *pinfo,
- SMB_STRUCT_STAT *psbuf);
+ int *pinfo);
NTSTATUS get_relative_fid_filename(connection_struct *conn,
struct smb_request *req,
uint16_t root_dir_fid,
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 9a736a7..e0e0228 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -117,8 +117,9 @@
/* Leave at 25 - not yet released. Add init_search_op call. - sdann */
/* Leave at 25 - not yet released. Add locking calls. -- zkirsch. */
/* Leave at 25 - not yet released. Add strict locking calls. -- drichards. */
+/* Changed to version 26 - Plumb struct smb_filename to SMB_VFS_CREATE_FILE. */
-#define SMB_VFS_INTERFACE_VERSION 25
+#define SMB_VFS_INTERFACE_VERSION 26
/* to bug old modules which are trying to compile with the old functions */
@@ -145,6 +146,7 @@ struct smb_request;
struct ea_list;
struct smb_file_time;
struct blocking_lock_record;
+struct smb_filename;
/*
Available VFS operations. These values must be in sync with vfs_ops struct
@@ -332,8 +334,7 @@ struct vfs_ops {
NTSTATUS (*create_file)(struct vfs_handle_struct *handle,
struct smb_request *req,
uint16_t root_dir_fid,
- const char *fname,
- uint32_t create_file_flags,
+ struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
uint32_t create_disposition,
@@ -344,8 +345,7 @@ struct vfs_ops {
struct security_descriptor *sd,
struct ea_list *ea_list,
files_struct **result,
- int *pinfo,
- SMB_STRUCT_STAT *psbuf);
+ int *pinfo);
int (*close_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp);
ssize_t (*vfs_read)(struct vfs_handle_struct *handle, struct files_struct *fsp, void *data, size_t n);
ssize_t (*pread)(struct vfs_handle_struct *handle, struct files_struct *fsp, void *data, size_t n, SMB_OFF_T offset);
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 0b59f8f..d888361 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -49,7 +49,7 @@
/* File operations */
#define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs.ops.open)((conn)->vfs.handles.open, (fname), (fsp), (flags), (mode)))
-#define SMB_VFS_CREATE_FILE(conn, req, root_dir_fid, fname, create_file_flags, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo, psbuf) (((conn)->vfs.ops.create_file)((conn)->vfs.handles.create_file, (req), (root_dir_fid), (fname), (create_file_flags), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo), (psbuf)))
+#define SMB_VFS_CREATE_FILE(conn, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo) (((conn)->vfs.ops.create_file)((conn)->vfs.handles.create_file, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo)))
#define SMB_VFS_CLOSE(fsp) ((fsp)->conn->vfs.ops.close_fn((fsp)->conn->vfs.handles.close_hnd, (fsp)))
#define SMB_VFS_READ(fsp, data, n) ((fsp)->conn->vfs.ops.vfs_read((fsp)->conn->vfs.handles.vfs_read, (fsp), (data), (n)))
#define SMB_VFS_PREAD(fsp, data, n, off) ((fsp)->conn->vfs.ops.pread((fsp)->conn->vfs.handles.pread, (fsp), (data), (n), (off)))
@@ -184,7 +184,7 @@
/* File operations */
#define SMB_VFS_OPAQUE_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs_opaque.ops.open)((conn)->vfs_opaque.handles.open, (fname), (fsp), (flags), (mode)))
-#define SMB_VFS_OPAQUE_CREATE_FILE(conn, req, root_dir_fid, fname, create_file_flags, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo, psbuf) (((conn)->vfs_opaque.ops.create_file)((conn)->vfs_opaque.handles.create_file, (req), (root_dir_fid), (fname), (create_file_flags), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo), (psbuf)))
+#define SMB_VFS_OPAQUE_CREATE_FILE(conn, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo) (((conn)->vfs_opaque.ops.create_file)((conn)->vfs_opaque.handles.create_file, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo)))
#define SMB_VFS_OPAQUE_CLOSE(fsp) ((fsp)->conn->vfs_opaque.ops.close_fn((fsp)->conn->vfs_opaque.handles.close_hnd, (fsp)))
#define SMB_VFS_OPAQUE_READ(fsp, data, n) ((fsp)->conn->vfs_opaque.ops.vfs_read((fsp)->conn->vfs_opaque.handles.vfs_read, (fsp), (data), (n)))
#define SMB_VFS_OPAQUE_PREAD(fsp, data, n, off) ((fsp)->conn->vfs_opaque.ops.pread((fsp)->conn->vfs_opaque.handles.pread, (fsp), (data), (n), (off)))
@@ -320,7 +320,7 @@
/* File operations */
#define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) (((handle)->vfs_next.ops.open)((handle)->vfs_next.handles.open, (fname), (fsp), (flags), (mode)))
-#define SMB_VFS_NEXT_CREATE_FILE(handle, req, root_dir_fid, fname, create_file_flags, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo, psbuf) (((handle)->vfs_next.ops.create_file)((handle)->vfs_next.handles.create_file, (req), (root_dir_fid), (fname), (create_file_flags), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo), (psbuf)))
+#define SMB_VFS_NEXT_CREATE_FILE(handle, req, root_dir_fid, smb_fname, access_mask, share_access, create_disposition, create_options, file_attributes, oplock_request, allocation_size, sd, ea_list, result, pinfo) (((handle)->vfs_next.ops.create_file)((handle)->vfs_next.handles.create_file, (req), (root_dir_fid), (smb_fname), (access_mask), (share_access), (create_disposition), (create_options), (file_attributes), (oplock_request), (allocation_size), (sd), (ea_list), (result), (pinfo)))
#define SMB_VFS_NEXT_CLOSE(handle, fsp) ((handle)->vfs_next.ops.close_fn((handle)->vfs_next.handles.close_hnd, (fsp)))
#define SMB_VFS_NEXT_READ(handle, fsp, data, n) ((handle)->vfs_next.ops.vfs_read((handle)->vfs_next.handles.vfs_read, (fsp), (data), (n)))
#define SMB_VFS_NEXT_PREAD(handle, fsp, data, n, off) ((handle)->vfs_next.ops.pread((handle)->vfs_next.handles.pread, (fsp), (data), (n), (off)))
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 4368dcd..28adce5 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -228,8 +228,7 @@ static int vfswrap_open(vfs_handle_struct *handle, const char *fname,
static NTSTATUS vfswrap_create_file(vfs_handle_struct *handle,
struct smb_request *req,
uint16_t root_dir_fid,
- const char *fname,
- uint32_t create_file_flags,
+ struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
uint32_t create_disposition,
@@ -240,15 +239,14 @@ static NTSTATUS vfswrap_create_file(vfs_handle_struct *handle,
struct security_descriptor *sd,
struct ea_list *ea_list,
files_struct **result,
- int *pinfo,
- SMB_STRUCT_STAT *psbuf)
+ int *pinfo)
{
- return create_file_default(handle->conn, req, root_dir_fid, fname,
- create_file_flags, access_mask, share_access,
+ return create_file_default(handle->conn, req, root_dir_fid, smb_fname,
+ access_mask, share_access,
create_disposition, create_options,
file_attributes, oplock_request,
- allocation_size, sd, ea_list, result, pinfo,
- psbuf);
+ allocation_size, sd, ea_list, result,
+ pinfo);
}
static int vfswrap_close(vfs_handle_struct *handle, files_struct *fsp)
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index bbcb7b3..e2d08b4 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -115,8 +115,7 @@ static int smb_full_audit_open(vfs_handle_struct *handle,
static NTSTATUS smb_full_audit_create_file(vfs_handle_struct *handle,
struct smb_request *req,
uint16_t root_dir_fid,
- const char *fname,
- uint32_t create_file_flags,
+ struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
uint32_t create_disposition,
@@ -127,8 +126,7 @@ static NTSTATUS smb_full_audit_create_file(vfs_handle_struct *handle,
struct security_descriptor *sd,
struct ea_list *ea_list,
files_struct **result,
- int *pinfo,
- SMB_STRUCT_STAT *psbuf);
+ int *pinfo);
static int smb_full_audit_close(vfs_handle_struct *handle, files_struct *fsp);
static ssize_t smb_full_audit_read(vfs_handle_struct *handle, files_struct *fsp,
void *data, size_t n);
@@ -1197,8 +1195,7 @@ static int smb_full_audit_open(vfs_handle_struct *handle,
static NTSTATUS smb_full_audit_create_file(vfs_handle_struct *handle,
struct smb_request *req,
uint16_t root_dir_fid,
- const char *fname,
- uint32_t create_file_flags,
+ struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
uint32_t create_disposition,
@@ -1209,8 +1206,7 @@ static NTSTATUS smb_full_audit_create_file(vfs_handle_struct *handle,
struct security_descriptor *sd,
struct ea_list *ea_list,
files_struct **result_fsp,
- int *pinfo,
- SMB_STRUCT_STAT *psbuf)
+ int *pinfo)
{
NTSTATUS result;
@@ -1218,8 +1214,7 @@ static NTSTATUS smb_full_audit_create_file(vfs_handle_struct *handle,
handle, /* handle */
req, /* req */
root_dir_fid, /* root_dir_fid */
- fname, /* fname */
- create_file_flags, /* create_file_flags */
+ smb_fname, /* fname */
access_mask, /* access_mask */
share_access, /* share_access */
create_disposition, /* create_disposition*/
@@ -1230,11 +1225,10 @@ static NTSTATUS smb_full_audit_create_file(vfs_handle_struct *handle,
sd, /* sd */
ea_list, /* ea_list */
result_fsp, /* result */
- pinfo, /* pinfo */
- psbuf); /* psbuf */
+ pinfo); /* pinfo */
do_log(SMB_VFS_OP_CREATE_FILE, (NT_STATUS_IS_OK(result)), handle, "0x%x|%s",
- access_mask, fname);
+ access_mask, smb_fname_str_dbg(smb_fname));
return result;
}
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 1aec954..74aaf02 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1277,7 +1277,6 @@ the modification date). Otherwise chose the numerically larger version number.
static int file_version_is_newer(connection_struct *conn, fstring new_file, fstring old_file)
{
bool use_version = true;
- char *filepath = NULL;
uint32 new_major;
uint32 new_minor;
@@ -1290,13 +1289,11 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
struct smb_filename *smb_fname = NULL;
files_struct *fsp = NULL;
SMB_STRUCT_STAT st;
- SMB_STRUCT_STAT stat_buf;
NTSTATUS status;
int ret;
SET_STAT_INVALID(st);
- SET_STAT_INVALID(stat_buf);
new_create_time = (time_t)0;
old_create_time = (time_t)0;
@@ -1306,17 +1303,11 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
goto error_exit;
}
- status = get_full_smb_filename(talloc_tos(), smb_fname, &filepath);
- if (!NT_STATUS_IS_OK(status)) {
- goto error_exit;
- }
-
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
0, /* root_dir_fid */
- filepath, /* fname */
- 0, /* create_file_flags */
+ smb_fname, /* fname */
FILE_GENERIC_READ, /* access_mask */
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */
FILE_OPEN, /* create_disposition*/
@@ -1327,13 +1318,13 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
NULL, /* sd */
NULL, /* ea_list */
&fsp, /* result */
- NULL, /* pinfo */
- &stat_buf); /* psbuf */
+ NULL); /* pinfo */
if (!NT_STATUS_IS_OK(status)) {
/* Old file not found, so by definition new file is in fact newer */
- DEBUG(10,("file_version_is_newer: Can't open old file [%s], errno = %d\n",
- filepath, errno));
+ DEBUG(10,("file_version_is_newer: Can't open old file [%s], "
+ "errno = %d\n", smb_fname_str_dbg(smb_fname),
+ errno));
ret = 1;
goto done;
@@ -1364,17 +1355,11 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
goto error_exit;
}
- status = get_full_smb_filename(talloc_tos(), smb_fname, &filepath);
- if (!NT_STATUS_IS_OK(status)) {
- goto error_exit;
- }
-
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
0, /* root_dir_fid */
- filepath, /* fname */
- 0, /* create_file_flags */
+ smb_fname, /* fname */
FILE_GENERIC_READ, /* access_mask */
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */
FILE_OPEN, /* create_disposition*/
@@ -1385,13 +1370,12 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
NULL, /* sd */
NULL, /* ea_list */
&fsp, /* result */
- NULL, /* pinfo */
- &stat_buf); /* psbuf */
+ NULL); /* pinfo */
if (!NT_STATUS_IS_OK(status)) {
/* New file not found, this shouldn't occur if the caller did its job */
- DEBUG(3,("file_version_is_newer: Can't open new file [%s], errno = %d\n",
- filepath, errno));
+ DEBUG(3,("file_version_is_newer: Can't open new file [%s], "
+ "errno = %d\n", smb_fname_str_dbg(smb_fname), errno));
goto error_exit;
} else {
@@ -1466,15 +1450,12 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
struct smb_filename *smb_fname = NULL;
char *driverpath = NULL;
files_struct *fsp = NULL;
- SMB_STRUCT_STAT st;
connection_struct *conn = NULL;
NTSTATUS status;
char *oldcwd;
fstring printdollar;
int printdollar_snum;
- SET_STAT_INVALID(st);
-
*perr = WERR_INVALID_PARAM;
/* If architecture is Windows 95/98/ME, the version is always 0. */
@@ -1532,18 +1513,11 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
goto error_exit;
}
- status = get_full_smb_filename(talloc_tos(), smb_fname, &driverpath);
- if (!NT_STATUS_IS_OK(status)) {
- *perr = WERR_NOMEM;
- goto error_exit;
- }
-
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
0, /* root_dir_fid */
- driverpath, /* fname */
- 0, /* create_file_flags */
+ smb_fname, /* fname */
FILE_GENERIC_READ, /* access_mask */
FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */
FILE_OPEN, /* create_disposition*/
@@ -1554,22 +1528,25 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
NULL, /* sd */
NULL, /* ea_list */
&fsp, /* result */
- NULL, /* pinfo */
- &st); /* psbuf */
+ NULL); /* pinfo */
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(3,("get_correct_cversion: Can't open file [%s], errno = %d\n",
- driverpath, errno));
+ DEBUG(3,("get_correct_cversion: Can't open file [%s], errno = "
+ "%d\n", smb_fname_str_dbg(smb_fname), errno));
*perr = WERR_ACCESS_DENIED;
goto error_exit;
} else {
uint32 major;
uint32 minor;
- int ret = get_file_version(fsp, driverpath, &major, &minor);
+ int ret;
+
+ ret = get_file_version(fsp, smb_fname->base_name, &major, &minor);
if (ret == -1) goto error_exit;
if (!ret) {
- DEBUG(6,("get_correct_cversion: Version info not found [%s]\n", driverpath));
+ DEBUG(6,("get_correct_cversion: Version info not "
+ "found [%s]\n",
+ smb_fname_str_dbg(smb_fname)));
goto error_exit;
}
@@ -1587,17 +1564,20 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
break;
default:
- DEBUG(6,("get_correct_cversion: cversion invalid [%s] cversion = %d\n",
- driverpath, cversion));
+ DEBUG(6,("get_correct_cversion: cversion "
+ "invalid [%s] cversion = %d\n",
+ smb_fname_str_dbg(smb_fname),
+ cversion));
goto error_exit;
}
- DEBUG(10,("get_correct_cversion: Version info found [%s] major = 0x%x minor = 0x%x\n",
- driverpath, major, minor));
+ DEBUG(10,("get_correct_cversion: Version info found [%s] major"
+ " = 0x%x minor = 0x%x\n",
+ smb_fname_str_dbg(smb_fname), major, minor));
}
DEBUG(10,("get_correct_cversion: Driver file [%s] cversion = %d\n",
- driverpath, cversion));
+ smb_fname_str_dbg(smb_fname), cversion));
goto done;
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 2df7232..7887f81 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -2033,7 +2033,6 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
struct srvsvc_NetGetFileSecurity *r)
{
struct smb_filename *smb_fname = NULL;
- char *fname = NULL;
SEC_DESC *psd = NULL;
size_t sd_size;
fstring servicename;
@@ -2074,18 +2073,11 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
goto error_exit;
}
- nt_status = get_full_smb_filename(talloc_tos(), smb_fname, &fname);
- if (!NT_STATUS_IS_OK(nt_status)) {
- werr = ntstatus_to_werror(nt_status);
- goto error_exit;
- }
-
nt_status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
0, /* root_dir_fid */
- fname, /* fname */
- 0, /* create_file_flags */
+ smb_fname, /* fname */
FILE_READ_ATTRIBUTES, /* access_mask */
FILE_SHARE_READ|FILE_SHARE_WRITE, /* share_access */
FILE_OPEN, /* create_disposition*/
@@ -2096,12 +2088,11 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
NULL, /* sd */
NULL, /* ea_list */
&fsp, /* result */
- NULL, /* pinfo */
- NULL); /* psbuf */
+ NULL); /* pinfo */
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(3,("_srvsvc_NetGetFileSecurity: can't open %s\n",
- fname));
+ smb_fname_str_dbg(smb_fname)));
werr = ntstatus_to_werror(nt_status);
goto error_exit;
}
@@ -2113,7 +2104,7 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(3,("_srvsvc_NetGetFileSecurity: Unable to get NT ACL "
- "for file %s\n", fname));
+ "for file %s\n", smb_fname_str_dbg(smb_fname)));
werr = ntstatus_to_werror(nt_status);
goto error_exit;
}
@@ -2168,7 +2159,6 @@ WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p,
struct srvsvc_NetSetFileSecurity *r)
{
struct smb_filename *smb_fname = NULL;
- char *fname = NULL;
fstring servicename;
files_struct *fsp = NULL;
SMB_STRUCT_STAT st;
@@ -2208,18 +2198,11 @@ WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p,
goto error_exit;
}
- nt_status = get_full_smb_filename(talloc_tos(), smb_fname, &fname);
- if (!NT_STATUS_IS_OK(nt_status)) {
- werr = ntstatus_to_werror(nt_status);
- goto error_exit;
- }
-
nt_status = SMB_VFS_CREATE_FILE(
conn, /* conn */
NULL, /* req */
0, /* root_dir_fid */
- fname, /* fname */
- 0, /* create_file_flags */
+ smb_fname, /* fname */
--
Samba Shared Repository
More information about the samba-cvs
mailing list