The Samba-Bugzilla – Attachment 7006 Details for
Bug 8419
Make VFS op "streaminfo" stackable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 3.6.1
0001-First-part-of-fix-for-bug-8419-Make-VFS-op-streaminf.patch (text/plain), 6.42 KB, created by
Jeremy Allison
on 2011-10-17 20:06:55 UTC
(
hide
)
Description:
git-am fix for 3.6.1
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2011-10-17 20:06:55 UTC
Size:
6.42 KB
patch
obsolete
>From c3bdcab5161107be8155a7913d9cb325383a781d Mon Sep 17 00:00:00 2001 >From: Frank Lahm <franklahm@googlemail.com> >Date: Mon, 17 Oct 2011 11:10:29 -0700 >Subject: [PATCH] First part of fix for bug #8419 - Make VFS op "streaminfo" stackable. > >Autobuild-User: Jeremy Allison <jra@samba.org> >Autobuild-Date: Mon Oct 17 21:39:32 CEST 2011 on sn-devel-104 >--- > source3/lib/filename_util.c | 2 +- > source3/smbd/close.c | 6 +++--- > source3/smbd/filename.c | 4 ++-- > source3/smbd/nttrans.c | 4 ++-- > source3/smbd/open.c | 6 +++--- > source3/smbd/proto.h | 6 ++++++ > source3/smbd/trans2.c | 5 ++--- > source3/smbd/vfs.c | 15 +++++++++++++++ > 8 files changed, 34 insertions(+), 14 deletions(-) > >diff --git a/source3/lib/filename_util.c b/source3/lib/filename_util.c >index 2405183..85d9fb5 100644 >--- a/source3/lib/filename_util.c >+++ b/source3/lib/filename_util.c >@@ -47,7 +47,7 @@ NTSTATUS get_full_smb_filename(TALLOC_CTX *ctx, > > /** > * There are actually legitimate callers of this such as functions that >- * enumerate streams using the SMB_VFS_STREAMINFO interface and then want to >+ * enumerate streams using the vfs_streaminfo interface and then want to > * operate on each stream. > */ > NTSTATUS create_synthetic_smb_fname(TALLOC_CTX *ctx, const char *base_name, >diff --git a/source3/smbd/close.c b/source3/smbd/close.c >index 33e497c..b736432 100644 >--- a/source3/smbd/close.c >+++ b/source3/smbd/close.c >@@ -212,8 +212,8 @@ NTSTATUS delete_all_streams(connection_struct *conn, const char *fname) > TALLOC_CTX *frame = talloc_stackframe(); > NTSTATUS status; > >- status = SMB_VFS_STREAMINFO(conn, NULL, fname, talloc_tos(), >- &num_streams, &stream_info); >+ status = vfs_streaminfo(conn, NULL, fname, talloc_tos(), >+ &num_streams, &stream_info); > > if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) { > DEBUG(10, ("no streams around\n")); >@@ -222,7 +222,7 @@ NTSTATUS delete_all_streams(connection_struct *conn, const char *fname) > } > > if (!NT_STATUS_IS_OK(status)) { >- DEBUG(10, ("SMB_VFS_STREAMINFO failed: %s\n", >+ DEBUG(10, ("vfs_streaminfo failed: %s\n", > nt_errstr(status))); > goto fail; > } >diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c >index 7fe7cc8..b7c7831 100644 >--- a/source3/smbd/filename.c >+++ b/source3/smbd/filename.c >@@ -1184,8 +1184,8 @@ static NTSTATUS build_stream_path(TALLOC_CTX *mem_ctx, > } > > /* Fall back to a case-insensitive scan of all streams on the file. */ >- status = SMB_VFS_STREAMINFO(conn, NULL, smb_fname->base_name, mem_ctx, >- &num_streams, &streams); >+ status = vfs_streaminfo(conn, NULL, smb_fname->base_name, mem_ctx, >+ &num_streams, &streams); > > if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) { > SET_STAT_INVALID(smb_fname->st); >diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c >index 2d6fa26..8e78d3c 100644 >--- a/source3/smbd/nttrans.c >+++ b/source3/smbd/nttrans.c >@@ -702,7 +702,7 @@ void reply_ntcreate_and_X(struct smb_request *req) > if (NT_STATUS_IS_OK(status) && num_names) { > file_status &= ~NO_EAS; > } >- status = SMB_VFS_STREAMINFO(conn, NULL, smb_fname->base_name, ctx, >+ status = vfs_streaminfo(conn, NULL, smb_fname->base_name, ctx, > &num_streams, &streams); > /* There is always one stream, ::$DATA. */ > if (NT_STATUS_IS_OK(status) && num_streams > 1) { >@@ -1283,7 +1283,7 @@ static void call_nt_transact_create(connection_struct *conn, > if (NT_STATUS_IS_OK(status) && num_names) { > file_status &= ~NO_EAS; > } >- status = SMB_VFS_STREAMINFO(conn, NULL, smb_fname->base_name, ctx, >+ status = vfs_streaminfo(conn, NULL, smb_fname->base_name, ctx, > &num_streams, &streams); > /* There is always one stream, ::$DATA. */ > if (NT_STATUS_IS_OK(status) && num_streams > 1) { >diff --git a/source3/smbd/open.c b/source3/smbd/open.c >index b897c8a..f3fccd0 100644 >--- a/source3/smbd/open.c >+++ b/source3/smbd/open.c >@@ -2972,8 +2972,8 @@ NTSTATUS open_streams_for_delete(connection_struct *conn, > TALLOC_CTX *frame = talloc_stackframe(); > NTSTATUS status; > >- status = SMB_VFS_STREAMINFO(conn, NULL, fname, talloc_tos(), >- &num_streams, &stream_info); >+ status = vfs_streaminfo(conn, NULL, fname, talloc_tos(), >+ &num_streams, &stream_info); > > if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED) > || NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) { >@@ -2983,7 +2983,7 @@ NTSTATUS open_streams_for_delete(connection_struct *conn, > } > > if (!NT_STATUS_IS_OK(status)) { >- DEBUG(10, ("SMB_VFS_STREAMINFO failed: %s\n", >+ DEBUG(10, ("vfs_streaminfo failed: %s\n", > nt_errstr(status))); > goto fail; > } >diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h >index e2b02ec..49bb911 100644 >--- a/source3/smbd/proto.h >+++ b/source3/smbd/proto.h >@@ -1179,6 +1179,12 @@ int vfs_lstat_smb_fname(struct connection_struct *conn, const char *fname, > SMB_STRUCT_STAT *psbuf); > NTSTATUS vfs_stat_fsp(files_struct *fsp); > NTSTATUS vfs_chown_fsp(files_struct *fsp, uid_t uid, gid_t gid); >+NTSTATUS vfs_streaminfo(connection_struct *conn, >+ struct files_struct *fsp, >+ const char *fname, >+ TALLOC_CTX *mem_ctx, >+ unsigned int *num_streams, >+ struct stream_struct **streams); > > /* The following definitions come from smbd/avahi_register.c */ > >diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c >index 6ef7156..8b6a15f 100644 >--- a/source3/smbd/trans2.c >+++ b/source3/smbd/trans2.c >@@ -4681,9 +4681,8 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn, > return NT_STATUS_INVALID_PARAMETER; > } > >- status = SMB_VFS_STREAMINFO( >- conn, fsp, smb_fname->base_name, talloc_tos(), >- &num_streams, &streams); >+ status = vfs_streaminfo(conn, fsp, smb_fname->base_name, >+ talloc_tos(), &num_streams, &streams); > > if (!NT_STATUS_IS_OK(status)) { > DEBUG(10, ("could not get stream info: %s\n", >diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c >index 7f16670..1424d50 100644 >--- a/source3/smbd/vfs.c >+++ b/source3/smbd/vfs.c >@@ -1126,6 +1126,21 @@ NTSTATUS vfs_stat_fsp(files_struct *fsp) > return NT_STATUS_OK; > } > >+/** >+ * Initialize num_streams and streams, then call VFS op streaminfo >+ */ >+NTSTATUS vfs_streaminfo(connection_struct *conn, >+ struct files_struct *fsp, >+ const char *fname, >+ TALLOC_CTX *mem_ctx, >+ unsigned int *num_streams, >+ struct stream_struct **streams) >+{ >+ *num_streams = 0; >+ *streams = NULL; >+ return SMB_VFS_STREAMINFO(conn, fsp, fname, mem_ctx, num_streams, streams); >+} >+ > /* > generate a file_id from a stat structure > */ >-- >1.7.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8419
:
6824
|
6825
|
6838
|
6843
|
6924
|
7002
|
7006
|
7011