The Samba-Bugzilla – Attachment 12676 Details for
Bug 12429
Permission 0700 on private/msg.sock folder causes messaging not working properly on Solaris system
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am test fix for 4.4.x
0001-s3-lib-messaging-Solaris-Illumos-sendmsg-is-broken.patch (text/plain), 1.98 KB, created by
Jeremy Allison
on 2016-11-18 20:23:58 UTC
(
hide
)
Description:
git-am test fix for 4.4.x
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2016-11-18 20:23:58 UTC
Size:
1.98 KB
patch
obsolete
>From d299af626dae50820f51e453be5362cb66e6c21e Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 18 Nov 2016 12:16:58 -0800 >Subject: [PATCH] s3: lib: messaging: Solaris/Illumos sendmsg() is broken. > >Solaris/Illumos kernel should *NOT* be doing security checks on a >connect()'ed unix domain socket at sendmsg() time, only at connect() time. > >Ensure we never queue messages on this platform. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12429 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/lib/unix_msg/unix_msg.c | 21 +++++++++++++++++++++ > source3/wscript | 8 ++++++++ > 2 files changed, 29 insertions(+) > >diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c >index bcfef28..e090dd1 100644 >--- a/source3/lib/unix_msg/unix_msg.c >+++ b/source3/lib/unix_msg/unix_msg.c >@@ -660,6 +660,27 @@ static int unix_dgram_send(struct unix_dgram_ctx *ctx, > unix_dgram_send_queue_free(q); > return ret; > } >+ >+#if defined(BROKEN_SENDMSG) >+ /* >+ * Never queue messages on broken platforms. >+ */ >+ { >+ int finished_job = -1; >+ int sent_job = q->sock; >+ do { >+ finished_job = -1; >+ ret = pthreadpool_finished_jobs(ctx->send_pool, >+ &finished_job, >+ 1); >+ if (ret <= 0) { >+ unix_dgram_send_queue_free(q); >+ return ret; >+ } >+ } while (sent_job != finished_job); >+ } >+#endif >+ > return 0; > } > >diff --git a/source3/wscript b/source3/wscript >index cd63f74..d50a264 100644 >--- a/source3/wscript >+++ b/source3/wscript >@@ -1482,6 +1482,14 @@ main() { > conf.env['legacy_quota_libs'] = legacy_quota_libs > > # >+ # sendmsg() is broken on Solaris/Illumos. It checks permissions >+ # on a connected unix domain socket on every call, not only at >+ # connect time. See bug https://bugzilla.samba.org/show_bug.cgi?id=12429 >+ # >+ if (host_os.rfind('solaris') > -1): >+ conf.DEFINE('BROKEN_SENDMSG', '1') >+ >+ # > # cluster support (CTDB) > # > if not Options.options.with_cluster_support: >-- >2.8.0.rc3.226.g39d4020 >
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 12429
:
12669
|
12670
|
12675
| 12676