[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2226-ga9ec21c

Tim Prouty tprouty at samba.org
Wed Jun 10 20:17:03 GMT 2009


The branch, master has been updated
       via  a9ec21cf219c3aef0388c252539f315d3e606a71 (commit)
       via  bddd7ad3dcc4a74fb61e09a2dd6fb7034c820046 (commit)
       via  5b2034f9c1db7efc14bdfe1a95356833705c4057 (commit)
       via  2481d8dcd03dfb4dbde50aebdbf3c33565cab429 (commit)
       via  6088e554f542c62405148c60fe5dedbee1c9cdd0 (commit)
       via  ab779f5c345ef59308362781501e4ae1e1191496 (commit)
       via  fc2a3b66dbbcc2f5779e1f92d4cb45a77fe8c6e6 (commit)
      from  b152afeadee32c7421db49305a1851cd19cf3c10 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a9ec21cf219c3aef0388c252539f315d3e606a71
Author: Tim Prouty <tprouty at samba.org>
Date:   Wed Jun 10 10:37:57 2009 -0700

    s3: Prepare the first set of SMB_VFS_CREATE_FILE callers to take an smb_filename struct
    
    Some of the callers required minimal changes, while others
    (copy_internals) required significant changes.  The task is simplified
    a little bit because we are able to do operations and checks on the
    base_name when a stream isn't used.
    
    This patch should cause no functional changes.
    
    Volker, Jeremy: Please check

commit bddd7ad3dcc4a74fb61e09a2dd6fb7034c820046
Author: Tim Prouty <tprouty at samba.org>
Date:   Tue Jun 9 17:04:10 2009 -0700

    s3: Add utility function for copying an smb_filename struct

commit 5b2034f9c1db7efc14bdfe1a95356833705c4057
Author: Tim Prouty <tprouty at samba.org>
Date:   Wed Jun 10 10:49:21 2009 -0700

    s3: Remove the now unused CFF_DOS_PATH flag
    All paths are now unix paths, making this flag useless.
    
    This flags argument is now unused and can be safely removed.

commit 2481d8dcd03dfb4dbde50aebdbf3c33565cab429
Author: Tim Prouty <tprouty at samba.org>
Date:   Fri Jun 5 20:24:17 2009 -0700

    s3: Remove unix_convert handling from createfile implementations

commit 6088e554f542c62405148c60fe5dedbee1c9cdd0
Author: Tim Prouty <tprouty at samba.org>
Date:   Thu Jun 4 18:39:55 2009 -0700

    s3: Make all callers of SMB_VFS_CREATEFILE call unix_convert first
    
    This step is a requirement to change SMB_VFS_CREATEFILE to take an
    smb_filename struct.

commit ab779f5c345ef59308362781501e4ae1e1191496
Author: Tim Prouty <tprouty at samba.org>
Date:   Wed Jun 10 09:59:42 2009 -0700

    s3: Remove extraneous calls to unix_convert
    
    Not only are these unnecessary in spirit because unlink_internals
    calls unix_convert, but in practice the return value is simply being
    ignored right now.

commit fc2a3b66dbbcc2f5779e1f92d4cb45a77fe8c6e6
Author: Tim Prouty <tprouty at samba.org>
Date:   Fri Jun 5 16:13:58 2009 -0700

    s3: Remove unused stat structs being passed to SMB_VFS_CREATE_FILE

-----------------------------------------------------------------------

Summary of changes:
 source3/include/proto.h            |   12 +-
 source3/include/smb.h              |    5 -
 source3/modules/onefs_open.c       |   34 +---
 source3/printing/nt_printing.c     |  154 ++++++++-----
 source3/rpc_server/srv_srvsvc_nt.c |   56 ++++-
 source3/smbd/filename.c            |   39 +++
 source3/smbd/nttrans.c             |  114 +++++----
 source3/smbd/open.c                |   50 ++---
 source3/smbd/posix_acls.c          |    5 +-
 source3/smbd/reply.c               |  464 +++++++++++++++++++++---------------
 source3/smbd/smb2_create.c         |   35 ++-
 source3/smbd/trans2.c              |   88 ++++---
 source3/smbd/vfs.c                 |   26 ++-
 13 files changed, 641 insertions(+), 441 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 9b29715..a0ad282 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6362,6 +6362,9 @@ 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 copy_smb_filename(TALLOC_CTX *ctx,
+			   const struct smb_filename *smb_fname_in,
+			   struct smb_filename **smb_fname_out);
 NTSTATUS unix_convert(TALLOC_CTX *ctx,
 		      connection_struct *conn,
 		      const char *orig_path,
@@ -6619,7 +6622,8 @@ NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn,
 			  const char *fname,
 			  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 char *directory);
+NTSTATUS create_directory(connection_struct *conn, struct smb_request *req,
+			  const struct smb_filename *smb_dname);
 void msg_file_was_renamed(struct messaging_context *msg,
 			  void *private_data,
 			  uint32_t msg_type,
@@ -6914,8 +6918,8 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
 void reply_mv(struct smb_request *req);
 NTSTATUS copy_file(TALLOC_CTX *ctx,
 			connection_struct *conn,
-			const char *src,
-			const char *dest1,
+			struct smb_filename *smb_fname_src,
+			struct smb_filename *smb_fname_dst,
 			int ofun,
 			int count,
 			bool target_is_directory);
@@ -7119,7 +7123,7 @@ void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, files_struct *fsp);
 bool smbd_vfs_init(connection_struct *conn);
 bool vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_STAT *st);
 bool vfs_object_exist(connection_struct *conn,const char *fname,SMB_STRUCT_STAT *sbuf);
-bool vfs_file_exist(connection_struct *conn, const char *fname,SMB_STRUCT_STAT *sbuf);
+NTSTATUS vfs_file_exist(connection_struct *conn, struct smb_filename *smb_fname);
 ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count);
 ssize_t vfs_pread_data(files_struct *fsp, char *buf,
                 size_t byte_count, SMB_OFF_T offset);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 188c83f..4eed68f 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1904,11 +1904,6 @@ struct smb_extended_info {
 	char   samba_version_string[SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH];
 };
 
-/*
- * create_file_flags
- */
-#define CFF_DOS_PATH		0x00000001
-
 /* time info */
 struct smb_file_time {
 	struct timespec mtime;
diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c
index 21c5d51..4198e5f 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/printing/nt_printing.c b/source3/printing/nt_printing.c
index a05e0de..1aec954 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -634,40 +634,30 @@ bool nt_printing_init(struct messaging_context *msg_ctx)
  Function to allow filename parsing "the old way".
 ********************************************************************/
 
-static char *driver_unix_convert(connection_struct *conn,
-		const char *old_name,
-		SMB_STRUCT_STAT *pst)
+static NTSTATUS driver_unix_convert(connection_struct *conn,
+				    const char *old_name,
+				    struct smb_filename **smb_fname)
 {
 	NTSTATUS status;
 	TALLOC_CTX *ctx = talloc_tos();
-	struct smb_filename *smb_fname = NULL;
 	char *name = talloc_strdup(ctx, old_name);
-	char *new_name = NULL;
 
 	if (!name) {
-		return NULL;
+		return NT_STATUS_NO_MEMORY;
 	}
 	unix_format(name);
 	name = unix_clean_name(ctx, name);
 	if (!name) {
-		return NULL;
+		return NT_STATUS_NO_MEMORY;
 	}
 	trim_string(name,"/","/");
 
-	status = unix_convert(ctx, conn, name, &smb_fname, 0);
+	status = unix_convert(ctx, conn, name, smb_fname, 0);
 	if (!NT_STATUS_IS_OK(status)) {
-		return NULL;
-	}
-
-	*pst = smb_fname->st;
-	status = get_full_smb_filename(ctx, smb_fname, &new_name);
-	if (!NT_STATUS_IS_OK(status)) {
-		TALLOC_FREE(smb_fname);
-		return NULL;
+		return NT_STATUS_NO_MEMORY;
 	}
 
-	TALLOC_FREE(smb_fname);
-	return new_name;
+	return NT_STATUS_OK;
 }
 
 /*******************************************************************
@@ -1297,11 +1287,13 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
 	uint32 old_minor;
 	time_t old_create_time;
 
+	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);
@@ -1309,8 +1301,13 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
 	old_create_time = (time_t)0;
 
 	/* Get file version info (if available) for previous file (if it exists) */
-	filepath = driver_unix_convert(conn,old_file,&stat_buf);
-	if (!filepath) {
+	status = driver_unix_convert(conn, old_file, &smb_fname);
+	if (!NT_STATUS_IS_OK(status)) {
+		goto error_exit;
+	}
+
+	status = get_full_smb_filename(talloc_tos(), smb_fname, &filepath);
+	if (!NT_STATUS_IS_OK(status)) {
 		goto error_exit;
 	}
 
@@ -1337,10 +1334,11 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
 		/* 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));
-		return 1;
+		ret = 1;
+		goto done;
 
 	} else {
-		int ret = get_file_version(fsp, old_file, &old_major, &old_minor);
+		ret = get_file_version(fsp, old_file, &old_major, &old_minor);
 		if (ret == -1) {
 			goto error_exit;
 		}
@@ -1361,8 +1359,13 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
 	fsp = NULL;
 
 	/* Get file version info (if available) for new file */
-	filepath = driver_unix_convert(conn,new_file,&stat_buf);
-	if (!filepath) {
+	status = driver_unix_convert(conn, new_file, &smb_fname);
+	if (!NT_STATUS_IS_OK(status)) {
+		goto error_exit;
+	}
+
+	status = get_full_smb_filename(talloc_tos(), smb_fname, &filepath);
+	if (!NT_STATUS_IS_OK(status)) {
 		goto error_exit;
 	}
 
@@ -1392,7 +1395,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
 		goto error_exit;
 
 	} else {
-		int ret = get_file_version(fsp, new_file, &new_major, &new_minor);
+		ret = get_file_version(fsp, new_file, &new_major, &new_minor);
 		if (ret == -1) {
 			goto error_exit;
 		}
@@ -1418,29 +1421,36 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr
 			(new_major == old_major && new_minor > old_minor)) {
 
 			DEBUG(6,("file_version_is_newer: Replacing [%s] with [%s]\n", old_file, new_file));
-			return 1;
+			ret = 1;
+			goto done;
 		}
 		else {
 			DEBUG(6,("file_version_is_newer: Leaving [%s] unchanged\n", old_file));
-			return 0;
+			ret = 0;
+			goto done;
 		}
 
 	} else {
 		/* Compare modification time/dates and choose the newest time/date */
 		if (new_create_time > old_create_time) {
 			DEBUG(6,("file_version_is_newer: Replacing [%s] with [%s]\n", old_file, new_file));
-			return 1;
+			ret = 1;
+			goto done;
 		}
 		else {
 			DEBUG(6,("file_version_is_newer: Leaving [%s] unchanged\n", old_file));
-			return 0;
+			ret = 0;
+			goto done;
 		}
 	}
 
-	error_exit:
-		if(fsp)
-			close_file(NULL, fsp, NORMAL_CLOSE);
-		return -1;
+ error_exit:
+	if(fsp)
+		close_file(NULL, fsp, NORMAL_CLOSE);
+	ret = -1;
+ done:
+	TALLOC_FREE(smb_fname);
+	return ret;
 }
 
 /****************************************************************************
@@ -1453,7 +1463,8 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
 {
 	int               cversion;
 	NTSTATUS          nt_status;
- 	char *driverpath = NULL;
+	struct smb_filename *smb_fname = NULL;
+	char *driverpath = NULL;
 	files_struct      *fsp = NULL;
 	SMB_STRUCT_STAT   st;
 	connection_struct *conn = NULL;
@@ -1509,17 +1520,24 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
 		goto error_exit;
 	}
 
-	driverpath = driver_unix_convert(conn,driverpath,&st);
-	if (!driverpath) {
-		*perr = WERR_NOMEM;
+	nt_status = driver_unix_convert(conn, driverpath, &smb_fname);
+	if (!NT_STATUS_IS_OK(nt_status)) {
+		*perr = ntstatus_to_werror(nt_status);
 		goto error_exit;
 	}
 
-	if (!vfs_file_exist(conn, driverpath, &st)) {
+	nt_status = vfs_file_exist(conn, smb_fname);
+	if (!NT_STATUS_IS_OK(nt_status)) {
 		*perr = WERR_BADFILE;
 		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 */
@@ -1586,6 +1604,7 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
  error_exit:
 	cversion = -1;
  done:
+	TALLOC_FREE(smb_fname);
 	if (fsp != NULL) {
 		close_file(NULL, fsp, NORMAL_CLOSE);
 	}
@@ -1811,10 +1830,12 @@ static WERROR move_driver_file_to_download_area(TALLOC_CTX *mem_ctx,
 						uint32_t driver_version,
 						uint32_t version)
 {
+	struct smb_filename *smb_fname_old = NULL;
+	struct smb_filename *smb_fname_new = NULL;
 	char *old_name = NULL;
 	char *new_name = NULL;
-	SMB_STRUCT_STAT st;
 	NTSTATUS status;
+	WERROR ret;
 
 	old_name = talloc_asprintf(mem_ctx, "%s/%s",
 				   short_architecture, driver_file);
@@ -1826,25 +1847,45 @@ static WERROR move_driver_file_to_download_area(TALLOC_CTX *mem_ctx,
 
 	if (version != -1 && (version = file_version_is_newer(conn, old_name, new_name)) > 0) {
 
-		old_name = driver_unix_convert(conn, old_name, &st);
-		W_ERROR_HAVE_NO_MEMORY(old_name);
+		status = driver_unix_convert(conn, old_name, &smb_fname_old);
+		if (!NT_STATUS_IS_OK(status)) {
+			ret = WERR_NOMEM;
+			goto out;
+		}
+
+		/* Setup a synthetic smb_filename struct */
+		smb_fname_new = TALLOC_ZERO_P(mem_ctx, struct smb_filename);
+		if (!smb_fname_new) {
+			ret = WERR_NOMEM;
+			goto out;
+		}
 
-		DEBUG(10,("move_driver_file_to_download_area: copying '%s' to '%s'\n",
-			old_name, new_name));
+		smb_fname_new->base_name = new_name;
 
-		status = copy_file(mem_ctx, conn, old_name, new_name,
+		DEBUG(10,("move_driver_file_to_download_area: copying '%s' to "
+			  "'%s'\n", smb_fname_old->base_name,
+			  smb_fname_new->base_name));
+
+		status = copy_file(mem_ctx, conn, smb_fname_old, smb_fname_new,
 				   OPENX_FILE_EXISTS_TRUNCATE |
 				   OPENX_FILE_CREATE_IF_NOT_EXIST,
 				   0, false);
 
 		if (!NT_STATUS_IS_OK(status)) {
-			DEBUG(0,("move_driver_file_to_download_area: Unable to rename [%s] to [%s]: %s\n",
-				old_name, new_name, nt_errstr(status)));
-			return WERR_ACCESS_DENIED;
+			DEBUG(0,("move_driver_file_to_download_area: Unable "
+				 "to rename [%s] to [%s]: %s\n",
+				 smb_fname_old->base_name, new_name,
+				 nt_errstr(status)));
+			ret = WERR_ACCESS_DENIED;
+			goto out;
 		}
 	}
 
-	return WERR_OK;
+	ret = WERR_OK;
+ out:
+	TALLOC_FREE(smb_fname_old);
+	TALLOC_FREE(smb_fname_new);
+	return ret;
 }
 
 WERROR move_driver_to_download_area(struct pipes_struct *p,
@@ -1854,10 +1895,10 @@ WERROR move_driver_to_download_area(struct pipes_struct *p,
 	NT_PRINTER_DRIVER_INFO_LEVEL_3 *driver;
 	NT_PRINTER_DRIVER_INFO_LEVEL_3 converted_driver;
 	const char *short_architecture;
+	struct smb_filename *smb_dname = NULL;
 	char *new_dir = NULL;
 	connection_struct *conn = NULL;
 	NTSTATUS nt_status;
-	SMB_STRUCT_STAT st;
 	int i;
 	TALLOC_CTX *ctx = talloc_tos();
 	int ver = 0;
@@ -1911,15 +1952,15 @@ WERROR move_driver_to_download_area(struct pipes_struct *p,
 		*perr = WERR_NOMEM;
 		goto err_exit;
 	}
-	new_dir = driver_unix_convert(conn,new_dir,&st);
-	if (!new_dir) {
+	nt_status = driver_unix_convert(conn, new_dir, &smb_dname);
+	if (!NT_STATUS_IS_OK(nt_status)) {
 		*perr = WERR_NOMEM;
 		goto err_exit;
 	}
 
-	DEBUG(5,("Creating first directory: %s\n", new_dir));
+	DEBUG(5,("Creating first directory: %s\n", smb_dname->base_name));
 
-	create_directory(conn, NULL, new_dir);
+	create_directory(conn, NULL, smb_dname);
 
 	/* For each driver file, archi\filexxx.yyy, if there is a duplicate file
 	 * listed for this driver which has already been moved, skip it (note:
@@ -2044,6 +2085,7 @@ WERROR move_driver_to_download_area(struct pipes_struct *p,
 	}
 
   err_exit:
+	TALLOC_FREE(smb_dname);
 
 	if (conn != NULL) {
 		vfs_ChDir(conn, oldcwd);
@@ -5134,7 +5176,6 @@ static bool delete_driver_files(struct pipes_struct *rpc_pipe,
 	const char *file;
 	connection_struct *conn;
 	NTSTATUS nt_status;
-	SMB_STRUCT_STAT  st;
 	char *oldcwd;
 	fstring printdollar;
 	int printdollar_snum;
@@ -5172,7 +5213,6 @@ static bool delete_driver_files(struct pipes_struct *rpc_pipe,
 	if ( *info_3->driverpath ) {
 		if ( (s = strchr( &info_3->driverpath[1], '\\' )) != NULL ) {
 			file = s;
-			driver_unix_convert(conn,file,&st);
 			DEBUG(10,("deleting driverfile [%s]\n", s));
 			unlink_internals(conn, NULL, 0, file, False);
 		}
@@ -5181,7 +5221,6 @@ static bool delete_driver_files(struct pipes_struct *rpc_pipe,
 	if ( *info_3->configfile ) {
 		if ( (s = strchr( &info_3->configfile[1], '\\' )) != NULL ) {
 			file = s;
-			driver_unix_convert(conn,file,&st);
 			DEBUG(10,("deleting configfile [%s]\n", s));
 			unlink_internals(conn, NULL, 0, file, False);
 		}
@@ -5190,7 +5229,6 @@ static bool delete_driver_files(struct pipes_struct *rpc_pipe,
 	if ( *info_3->datafile ) {
 		if ( (s = strchr( &info_3->datafile[1], '\\' )) != NULL ) {
 			file = s;
-			driver_unix_convert(conn,file,&st);
 			DEBUG(10,("deleting datafile [%s]\n", s));
 			unlink_internals(conn, NULL, 0, file, False);
 		}
@@ -5199,7 +5237,6 @@ static bool delete_driver_files(struct pipes_struct *rpc_pipe,
 	if ( *info_3->helpfile ) {
 		if ( (s = strchr( &info_3->helpfile[1], '\\' )) != NULL ) {
 			file = s;
-			driver_unix_convert(conn,file,&st);
 			DEBUG(10,("deleting helpfile [%s]\n", s));
 			unlink_internals(conn, NULL, 0, file, False);
 		}
@@ -5215,7 +5252,6 @@ static bool delete_driver_files(struct pipes_struct *rpc_pipe,
 
 			if ( (p = strchr( info_3->dependentfiles[i]+1, '\\' )) != NULL ) {
 				file = p;
-				driver_unix_convert(conn,file,&st);
 				DEBUG(10,("deleting dependent file [%s]\n", file));
 				unlink_internals(conn, NULL, 0, file, False);
 			}
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 4f0e48b..2df7232 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -2032,6 +2032,8 @@ WERROR _srvsvc_NetRemoteTOD(pipes_struct *p,
 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;
@@ -2065,12 +2067,25 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
 		goto error_exit;
 	}
 
+	nt_status = unix_convert(talloc_tos(), conn, r->in.file, &smb_fname,
+				 0);
+	if (!NT_STATUS_IS_OK(nt_status)) {
+		werr = ntstatus_to_werror(nt_status);
+		goto error_exit;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list