The Samba-Bugzilla – Attachment 12675 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.96 KB, created by
Jeremy Allison
on 2016-11-18 20:19:38 UTC
(
hide
)
Description:
git-am test fix for 4.4.x
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2016-11-18 20:19:38 UTC
Size:
1.96 KB
patch
obsolete
>From 5208fc6279f18b11bcc07a7fbfc54bf968a8fd19 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 | 20 ++++++++++++++++++++ > source3/wscript | 8 ++++++++ > 2 files changed, 28 insertions(+) > >diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c >index bcfef28..720610e 100644 >--- a/source3/lib/unix_msg/unix_msg.c >+++ b/source3/lib/unix_msg/unix_msg.c >@@ -660,6 +660,26 @@ 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; >+ 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 (q->sock != 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