The Samba-Bugzilla – Attachment 16772 Details for
Bug 14787
net conf list crashes when run as normal user
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.13, 4.14 and 4.15 cherry-picked from master
bug14787-v413,v414,v415.patch (text/plain), 2.68 KB, created by
Ralph Böhme
on 2021-09-05 13:42:12 UTC
(
hide
)
Description:
Patch for 4.13, 4.14 and 4.15 cherry-picked from master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2021-09-05 13:42:12 UTC
Size:
2.68 KB
patch
obsolete
>From ce406eb31e051d199218c9bf6c872bc5e1349cfb Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Sat, 7 Aug 2021 10:51:38 +0000 >Subject: [PATCH 1/2] s3/lib/dbwrap: check if global_messaging_context() > succeeded > >The subsequent messaging_ctdb_connection() will fail an assert if messaging is >not up and running, maybe it's a bit better to add a check if >global_messaging_context() actually succeeded. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14787 > >Signed-off-by: Ralph Boehme <slow@samba.org> >Reviewed-by: Andreas Schneider <asn@samba.org> >(cherry picked from commit fd19cae8d2f21977d8285efd3f29e2b480d241e9) >--- > source3/lib/dbwrap/dbwrap_open.c | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c >index 1d8c40af75e..52c8a94aeff 100644 >--- a/source3/lib/dbwrap/dbwrap_open.c >+++ b/source3/lib/dbwrap/dbwrap_open.c >@@ -149,6 +149,10 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx, > * to be initialized. > */ > msg_ctx = global_messaging_context(); >+ if (msg_ctx == NULL) { >+ DBG_ERR("Failed to initialize messaging\n"); >+ return NULL; >+ } > > conn = messaging_ctdb_connection(); > if (conn == NULL) { >-- >2.31.1 > > >From 621370db7b570a048b53f5eda62fd0c932e5fc39 Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Sat, 7 Aug 2021 10:52:28 +0000 >Subject: [PATCH 2/2] registry: check for running as root in clustering mode >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14787 >RN: net conf list crashes when run as normal user > >Signed-off-by: Ralph Boehme <slow@samba.org> >Reviewed-by: Andreas Schneider <asn@samba.org> > >Autobuild-User(master): Ralph Böhme <slow@samba.org> >Autobuild-Date(master): Tue Aug 17 11:23:15 UTC 2021 on sn-devel-184 > >(cherry picked from commit 4809f4a6ee971bcd9767839c729b636b7582fc02) >--- > source3/registry/reg_backend_db.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c >index c870dc57ed6..423b310fe8a 100644 >--- a/source3/registry/reg_backend_db.c >+++ b/source3/registry/reg_backend_db.c >@@ -733,6 +733,15 @@ WERROR regdb_init(void) > return WERR_OK; > } > >+ /* >+ * Clustered Samba can only work as root because we need messaging to >+ * talk to ctdb which only works as root. >+ */ >+ if (lp_clustering() && geteuid() != 0) { >+ DBG_ERR("Cluster mode requires running as root.\n"); >+ return WERR_ACCESS_DENIED; >+ } >+ > db_path = state_path(talloc_tos(), "registry.tdb"); > if (db_path == NULL) { > return WERR_NOT_ENOUGH_MEMORY; >-- >2.31.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
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 14787
: 16772