The Samba-Bugzilla – Attachment 11115 Details for
Bug 11303
OS X clients crash when copying file with resource fork to server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Sort stream names in vfs_streams_depot
copy-to-samba-sorted-streams.patch (text/plain), 1.83 KB, created by
Ralph Böhme
on 2015-06-01 10:28:47 UTC
(
hide
)
Description:
Sort stream names in vfs_streams_depot
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2015-06-01 10:28:47 UTC
Size:
1.83 KB
patch
obsolete
>From 20d38a91e38805cf0460db23b33dfe55ca87f6b1 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Mon, 1 Jun 2015 12:16:45 +0200 >Subject: [PATCH] ... stream_depot_sort_streams... BUG #11303 > >--- > source3/modules/vfs_streams_depot.c | 44 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 44 insertions(+) > >diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c >index 5964852..aec1c6c 100644 >--- a/source3/modules/vfs_streams_depot.c >+++ b/source3/modules/vfs_streams_depot.c >@@ -838,6 +838,48 @@ static bool collect_one_stream(const char *dirname, > return ret; > } > >+static int stream_depot_sort_streams(struct stream_struct *s1, >+ struct stream_struct *s2) >+{ >+ size_t len1 = (s1->name != NULL) ? strlen(s1->name): 0; >+ size_t len2 = (s2->name != NULL) ? strlen(s2->name): 0; >+ char _n1[len1+3]; >+ char _n2[len2+3]; >+ char *n1 = _n1; >+ char *n2 = _n2; >+ char *p; >+ >+ memset(_n1, 0, len1+3); >+ memset(_n2, 0, len2+3); >+ >+//::$DATA '' >+//:stream:$DATA 'stream' >+ >+ if (s1->name != NULL) { >+ memcpy(_n1, s1->name, len1); >+ if (n1[0] == ':') { >+ n1++; >+ } >+ p = strchr_m(n1, ':'); >+ if (p != NULL) { >+ p[0] = '\0'; >+ } >+ } >+ >+ if (s2->name != NULL) { >+ memcpy(_n2, s2->name, len2); >+ if (n2[0] == ':') { >+ n2++; >+ } >+ p = strchr_m(n2, ':'); >+ if (p != NULL) { >+ p[0] = '\0'; >+ } >+ } >+ >+ return strcasecmp_m(n1, n2); >+} >+ > static NTSTATUS streams_depot_streaminfo(vfs_handle_struct *handle, > struct files_struct *fsp, > const char *fname, >@@ -906,6 +948,8 @@ static NTSTATUS streams_depot_streaminfo(vfs_handle_struct *handle, > *pstreams = state.streams; > status = SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, pnum_streams, pstreams); > >+ TYPESAFE_QSORT(*pstreams, *pnum_streams, stream_depot_sort_streams); >+ > out: > TALLOC_FREE(smb_fname_base); > return status; >-- >2.1.0 >
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 11303
:
11105
|
11106
|
11107
|
11108
|
11109
|
11114
| 11115 |
11116