[Samba] Query log?
Kees van Vloten
keesvanvloten at gmail.com
Fri Sep 29 17:05:08 UTC 2023
Hi Joachim,
This is the updated patch:
diff -ur a/lib/util/debug-classes/debug-classname-table.c
b/lib/util/debug-classes/debug-classname-table.c
--- a/lib/util/debug-classes/debug-classname-table.c 2023-05-14
21:26:04.982024200 +0200
+++ b/lib/util/debug-classes/debug-classname-table.c 2023-07-13
20:37:42.833016722 +0200
@@ -59,4 +59,5 @@
[DBGC_DSDB_TXN_AUDIT_JSON] = "dsdb_transaction_json_audit",
[DBGC_DSDB_GROUP_AUDIT] = "dsdb_group_audit",
[DBGC_DSDB_GROUP_AUDIT_JSON] = "dsdb_group_json_audit",
+ [DBGC_LDAP] = "ldap",
};
diff -ur a/lib/util/debug.h b/lib/util/debug.h
--- a/lib/util/debug.h 2023-05-14 21:26:04.982024200 +0200
+++ b/lib/util/debug.h 2023-07-13 20:36:00.195542472 +0200
@@ -98,6 +98,7 @@
#define DBGC_DSDB_TXN_AUDIT_JSON 35
#define DBGC_DSDB_GROUP_AUDIT 36
#define DBGC_DSDB_GROUP_AUDIT_JSON 37
+#define DBGC_LDAP 38
/* So you can define DBGC_CLASS before including debug.h */
#ifndef DBGC_CLASS
diff -ur a/source4/ldap_server/ldap_backend.c
b/source4/ldap_server/ldap_backend.c
--- a/source4/ldap_server/ldap_backend.c 2023-05-14
21:26:05.242037663 +0200
+++ b/source4/ldap_server/ldap_backend.c 2023-07-13
20:36:00.195542472 +0200
@@ -35,6 +35,9 @@
#include "libcli/ldap/ldap_proto.h"
#include "source4/auth/auth.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_LDAP
+
static int map_ldb_error(TALLOC_CTX *mem_ctx, int ldb_err,
const char *add_err_string, const char **errstring)
{
diff -ur a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c
--- a/source4/ldap_server/ldap_bind.c 2023-05-14 21:26:05.242037663 +0200
+++ b/source4/ldap_server/ldap_bind.c 2023-07-13 20:36:00.195542472 +0200
@@ -31,6 +31,9 @@
#include "../lib/util/tevent_ntstatus.h"
#include "lib/util/time_basic.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_LDAP
+
static char *ldapsrv_bind_error_msg(TALLOC_CTX *mem_ctx,
HRESULT hresult,
uint32_t DSID,
diff -ur a/source4/ldap_server/ldap_extended.c
b/source4/ldap_server/ldap_extended.c
--- a/source4/ldap_server/ldap_extended.c 2023-05-14
21:26:05.242037663 +0200
+++ b/source4/ldap_server/ldap_extended.c 2023-07-13
20:36:00.195542472 +0200
@@ -24,6 +24,9 @@
#include "samba/service_stream.h"
#include "../lib/util/tevent_ntstatus.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_LDAP
+
struct ldapsrv_starttls_postprocess_context {
struct ldapsrv_connection *conn;
};
diff -ur a/source4/ldap_server/ldap_server.c
b/source4/ldap_server/ldap_server.c
--- a/source4/ldap_server/ldap_server.c 2023-05-14 21:26:05.242037663
+0200
+++ b/source4/ldap_server/ldap_server.c 2023-07-13 20:36:00.195542472
+0200
@@ -51,6 +51,9 @@
#undef strcasecmp
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_LDAP
+
static void ldapsrv_terminate_connection_done(struct tevent_req *subreq);
/*
As said, it is tested against 4.18.6.
@Jeremy, has this made it into Gitlab already?
- Kees.
Op vr 29 sep. 2023 18:01 schreef Joachim Lindenberg via samba
<samba at lists.samba.org>:
Hi Kees,
with 4.18.6? Neither .6 nor .7 shows that as included:
It is not merged. I have a patch for 4.18.6 and I am sure it will work
on 4.18.7 as well :-)
It does mean that you have to compile Samba yourself to get it included.
- Kees.
https://www.samba.org/samba/history/samba-4.18.6.html
https://www.samba.org/samba/history/samba-4.18.7.html
Or are you referring to upcoming 4.18.8?
Thanks,
Joachim
-----Ursprüngliche Nachricht-----
Von: samba <samba-bounces at lists.samba.org> Im Auftrag von van Vloten
Kees via samba
Gesendet: Freitag, 29. September 2023 17:33
An: samba <samba at lists.samba.org>
Betreff: [Samba] Query log?
It is not merged yet.
I have recently updated it for recent releases and it is tested with
4.18.6.
I shared my changes with Jeremy to get them merged. I can share it
here if that helps you.
- Kees.
Op vr 29 sep. 2023 12:16 schreef Joachim Lindenberg via samba <
samba at lists.samba.org>:
> Hello,
>
> one of the apps I am using crashes when talking to samba 4.17+ but
> doesn´t crash when running against 4.16. The app is not written by
> myself, and a code snippet that the developer and I suspected tob e
> the culprit runs without any issues.
>
> I´d be interested in queries performed by that application and
> potential differences, and was searching for „samba query log“. I
got the hits:
>
> https://www.samba.org/samba/docs/using_samba/ch12.html
>
> https://www.spinics.net/lists/samba/msg161127.html
>
> but nothing current and official. Did that patch enter any release?
> What other options do exist?
>
> And anyone aware of changes between 4.17 and 4.16 that might cause a
> .NET application to fail?
>
> Thanks,
>
> Joachim
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
>
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
More information about the samba
mailing list