The Samba-Bugzilla – Attachment 16367 Details for
Bug 14579
DLZ plugin can give strange errors when missing sam.ldb
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch from master backported to 4.12 and 4.13
0001-Do-not-create-an-empty-DB-when-accessing-a-sam.ldb.patch (text/plain), 1.61 KB, created by
Andrew Bartlett
on 2020-12-11 10:09:24 UTC
(
hide
)
Description:
patch from master backported to 4.12 and 4.13
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2020-12-11 10:09:24 UTC
Size:
1.61 KB
patch
obsolete
>From cef180c56b12a4d422261a01878a3ef2ef310cd0 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Mon, 23 Nov 2020 19:35:37 +1300 >Subject: [PATCH] Do not create an empty DB when accessing a sam.ldb > >Samba already does this for samba-tool and doing this should make >our errors more sensible, particularly in BIND9 if not provisioned >with the correct --dns-backend=DLZ_BIND9 > >The old error was like: > > named[62954]: samba_dlz: Unable to get basedn for > /var/lib/samba/private/dns/sam.ldb > - NULL Base DN invalid for a base search. > >The new error will be like (in this case from the torture test): > Failed to connect to Failed to connect to > ldb:///home/abartlet/samba/st/chgdcpass/bind-dns/dns/sam.ldb: > Unable to open tdb '/home/abartlet/samba/st/chgdcpass/bind-dns/dns/sam.ldb': > No such file or directory: Operations error > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14579 > >Reviewed-by: Andreas Schneider <asn@samba.org> >Signed-off-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit d49e96bc45ea5e2d3364242dad36fe9094b7cc42) >--- > source4/dsdb/samdb/samdb.c | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c >index 10db0c50395..d5890dec03e 100644 >--- a/source4/dsdb/samdb/samdb.c >+++ b/source4/dsdb/samdb/samdb.c >@@ -63,6 +63,9 @@ int samdb_connect_url(TALLOC_CTX *mem_ctx, > *ldb_ret = NULL; > *errstring = NULL; > >+ /* We create sam.ldb in provision, and never anywhere else */ >+ flags |= LDB_FLG_DONT_CREATE_DB; >+ > if (remote_address == NULL) { > ldb = ldb_wrap_find(url, ev_ctx, lp_ctx, > session_info, NULL, flags); >-- >2.25.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:
abartlet
:
review?
(
gary
)
asn
:
review+
slow
:
review+
Actions:
View
Attachments on
bug 14579
: 16367