The Samba-Bugzilla – Attachment 11495 Details for
Bug 11550
smbstatus doesn't show named streams info
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.3.next, 4.2.next.
0001-s3-smbstatus-add-stream-name-to-share_entry_forall.patch (text/plain), 5.51 KB, created by
Jeremy Allison
on 2015-10-14 21:43:11 UTC
(
hide
)
Description:
git-am fix for 4.3.next, 4.2.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2015-10-14 21:43:11 UTC
Size:
5.51 KB
patch
obsolete
>From c9ca41bfc9cb8d007ad725fb925c0d7dce978ebd Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Sun, 11 Oct 2015 09:38:18 +0200 >Subject: [PATCH] s3:smbstatus: add stream name to share_entry_forall() > >Add stream name argument to share_entry_forall machinery so smbstatus >can print the stream name of a file. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=11550 > >Signed-off-by: Ralph Boehme <slow@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit cd0c2a5eca43cea76491ae0d820414287c234c1a) >--- > source3/locking/proto.h | 3 ++- > source3/locking/share_mode_lock.c | 11 ++++++++--- > source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 21 +++++++++++++++------ > source3/utils/status.c | 6 +++++- > 4 files changed, 30 insertions(+), 11 deletions(-) > >diff --git a/source3/locking/proto.h b/source3/locking/proto.h >index 75faa94..193aef7 100644 >--- a/source3/locking/proto.h >+++ b/source3/locking/proto.h >@@ -202,7 +202,8 @@ int share_mode_forall(int (*fn)(struct file_id fid, > const struct share_mode_data *data, > void *private_data), > void *private_data); >-int share_entry_forall(int (*fn)(const struct share_mode_entry *, const char *, >+int share_entry_forall(int (*fn)(const struct share_mode_entry *, >+ const char *, const char *, > const char *, void *), > void *private_data); > bool share_mode_cleanup_disconnected(struct file_id id, >diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c >index 26ba0cb..69d28fb 100644 >--- a/source3/locking/share_mode_lock.c >+++ b/source3/locking/share_mode_lock.c >@@ -538,7 +538,9 @@ int share_mode_forall(int (*fn)(struct file_id fid, > > struct share_entry_forall_state { > int (*fn)(const struct share_mode_entry *e, >- const char *service_path, const char *base_name, >+ const char *service_path, >+ const char *base_name, >+ const char *stream_name, > void *private_data); > void *private_data; > }; >@@ -554,7 +556,9 @@ static int share_entry_traverse_fn(struct file_id fid, > int ret; > > ret = state->fn(&data->share_modes[i], >- data->servicepath, data->base_name, >+ data->servicepath, >+ data->base_name, >+ data->stream_name, > state->private_data); > if (ret != 0) { > return ret; >@@ -570,7 +574,8 @@ static int share_entry_traverse_fn(struct file_id fid, > ********************************************************************/ > > int share_entry_forall(int (*fn)(const struct share_mode_entry *, >- const char *, const char *, void *), >+ const char *, const char *, >+ const char *, void *), > void *private_data) > { > struct share_entry_forall_state state = { >diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c >index 483cafa..55d69ea 100644 >--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c >+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c >@@ -80,7 +80,9 @@ struct share_conn_stat { > ********************************************************************/ > > static int enum_file_fn(const struct share_mode_entry *e, >- const char *sharepath, const char *fname, >+ const char *sharepath, >+ const char *fname, >+ const char *sname, > void *private_data) > { > struct file_enum_count *fenum = >@@ -129,8 +131,9 @@ static int enum_file_fn(const struct share_mode_entry *e, > if ( strcmp( fname, "." ) == 0 ) { > fullpath = talloc_asprintf(fenum->ctx, "C:%s", sharepath ); > } else { >- fullpath = talloc_asprintf(fenum->ctx, "C:%s/%s", >- sharepath, fname ); >+ fullpath = talloc_asprintf(fenum->ctx, "C:%s/%s%s", >+ sharepath, fname, >+ sname ? sname : ""); > } > if (!fullpath) { > return 0; >@@ -829,7 +832,9 @@ static WERROR init_srv_sess_info_0(struct pipes_struct *p, > **********************************************************************/ > > static int count_sess_files_fn(const struct share_mode_entry *e, >- const char *sharepath, const char *fname, >+ const char *sharepath, >+ const char *fname, >+ const char *sname, > void *data) > { > struct sess_file_info *info = data; >@@ -954,7 +959,9 @@ static WERROR init_srv_sess_info_1(struct pipes_struct *p, > ********************************************************************/ > > static int share_file_fn(const struct share_mode_entry *e, >- const char *sharepath, const char *fname, >+ const char *sharepath, >+ const char *fname, >+ const char *sname, > void *data) > { > struct share_file_stat *sfs = data; >@@ -2697,7 +2704,9 @@ struct enum_file_close_state { > }; > > static int enum_file_close_fn(const struct share_mode_entry *e, >- const char *sharepath, const char *fname, >+ const char *sharepath, >+ const char *fname, >+ const char *sname, > void *private_data) > { > char msg[MSG_SMB_SHARE_MODE_ENTRY_SIZE]; >diff --git a/source3/utils/status.c b/source3/utils/status.c >index f8cbcf2..458871b 100644 >--- a/source3/utils/status.c >+++ b/source3/utils/status.c >@@ -118,6 +118,7 @@ static bool Ucrit_addPid( struct server_id pid ) > static int print_share_mode(const struct share_mode_entry *e, > const char *sharepath, > const char *fname, >+ const char *sname, > void *dummy) > { > static int count; >@@ -190,7 +191,10 @@ static int print_share_mode(const struct share_mode_entry *e, > d_printf("NONE "); > } > >- d_printf(" %s %s %s",sharepath, fname, time_to_asc((time_t)e->time.tv_sec)); >+ d_printf(" %s %s%s %s", >+ sharepath, fname, >+ sname ? sname : "", >+ time_to_asc((time_t)e->time.tv_sec)); > } > > return 0; >-- >2.6.0.rc2.230.g3dd15c0 >
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
Flags:
slow
:
review+
Actions:
View
Attachments on
bug 11550
: 11495