summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-05-18 15:09:21 +0000
committerSimo Sorce <idra@samba.org>2002-05-18 15:09:21 +0000
commit2a02a76913a91c9882868b73c72ba2e8d2be764d (patch)
tree4f1f0bc22e790381cf655ea6ce592660db1f2d52 /source3/passdb
parentf9d2db36f36abc39a9a905a69b0f2e0182d0caca (diff)
downloadsamba-2a02a76913a91c9882868b73c72ba2e8d2be764d.tar.gz
samba-2a02a76913a91c9882868b73c72ba2e8d2be764d.tar.bz2
samba-2a02a76913a91c9882868b73c72ba2e8d2be764d.zip
so here it is the code to introduce seriously debugggging classes.
this is a first step only passdb stuff has beein "classized". - so what can you do? set debug level to: 1 poasdb:10 that will make all the code run at debug level 1 except the code in passdb/* files that will run at level 10 TODO: fix the man page - also smbcontrol has this nice feature so smbcontrol smbd debug 3 passdb:5 will set every smbd to have a default log level of 3 while passdb stuff will be at level 5 and so no.. minor cosmetic fix to pdbedit is there too (This used to be commit be5c3b3f5781ddc002ffcc98df04ab024dcef4ca)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/machine_sid.c2
-rw-r--r--source3/passdb/passdb.c3
-rw-r--r--source3/passdb/passgrp.c3
-rw-r--r--source3/passdb/pdb_get_set.c3
-rw-r--r--source3/passdb/pdb_interface.c3
-rw-r--r--source3/passdb/pdb_ldap.c3
-rw-r--r--source3/passdb/pdb_plugin.c3
-rw-r--r--source3/passdb/pdb_smbpasswd.c2
-rw-r--r--source3/passdb/pdb_tdb.c25
-rw-r--r--source3/passdb/secrets.c3
10 files changed, 48 insertions, 2 deletions
diff --git a/source3/passdb/machine_sid.c b/source3/passdb/machine_sid.c
index 6436a2cd05..0b4a4ffeba 100644
--- a/source3/passdb/machine_sid.c
+++ b/source3/passdb/machine_sid.c
@@ -22,6 +22,8 @@
#include "includes.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_PASSDB
/****************************************************************************
Read a SID from a file. This is for compatibility with the old MACHINE.SID
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index edae00389e..32d6731a9e 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -23,6 +23,9 @@
#include "includes.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_PASSDB
+
/*
* This is set on startup - it defines the SID for this
* machine, and therefore the SAM database for which it is
diff --git a/source3/passdb/passgrp.c b/source3/passdb/passgrp.c
index d7ed965648..f73591793f 100644
--- a/source3/passdb/passgrp.c
+++ b/source3/passdb/passgrp.c
@@ -21,6 +21,9 @@
#include "includes.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_PASSDB
+
/*
* NOTE. All these functions are abstracted into a structure
* that points to the correct function for the selected database. JRA.
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c
index 372b332a45..5ed54a9857 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -23,6 +23,9 @@
#include "includes.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_PASSDB
+
/**
* @todo Redefine this to NULL, but this changes the API becouse
* much of samba assumes that the pdb_get...() funtions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 6488decf94..e44d1f8bb4 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -21,6 +21,9 @@
#include "includes.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_PASSDB
+
/** List of various built-in passdb modules */
const struct pdb_init_function_entry builtin_pdb_init_functions[] = {
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index e10dc73d0b..46b464a588 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -24,6 +24,9 @@
#include "includes.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_PASSDB
+
#ifdef HAVE_LDAP
/* TODO:
* persistent connections: if using NSS LDAP, many connections are made
diff --git a/source3/passdb/pdb_plugin.c b/source3/passdb/pdb_plugin.c
index 1de61abd5f..f7ab2b90e2 100644
--- a/source3/passdb/pdb_plugin.c
+++ b/source3/passdb/pdb_plugin.c
@@ -21,6 +21,9 @@
#include "includes.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_PASSDB
+
NTSTATUS pdb_init_plugin(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, const char *location)
{
void * dl_handle;
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index e2050627e1..f6214220ea 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -23,6 +23,8 @@
#include "includes.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_PASSDB
/*
smb_passwd is analogous to sam_passwd used everywhere
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 46120c3ccc..37101c39c9 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -2,7 +2,7 @@
* Unix SMB/CIFS implementation.
* SMB parameters and setup
* Copyright (C) Andrew Tridgell 1992-1998
- * Copyright (C) Simo Sorce 2000
+ * Copyright (C) Simo Sorce 2000-2002
* Copyright (C) Gerald Carter 2000
* Copyright (C) Jeremy Allison 2001
* Copyright (C) Andrew Bartlett 2002
@@ -24,6 +24,19 @@
#include "includes.h"
+#if 0 /* when made a module use this */
+
+static int tdbsam_debug_level = DBGC_ALL;
+#undef DBGC_CLASS
+#define DBGC_CLASS tdbsam_debug_level
+
+#else
+
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_PASSDB
+
+#endif
+
#ifdef WITH_TDB_SAM
#define PDB_VERSION "20010830"
@@ -880,6 +893,14 @@ NTSTATUS pdb_init_tdbsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, con
NTSTATUS nt_status;
struct tdbsam_privates *tdb_state;
+#if 0 /* when made a module use this */
+ tdbsam_debug_level = debug_add_class("tdbsam");
+ if(tdbsam_debug_level == -1) {
+ tdbsam_debug_level = DBGC_ALL;
+ DEBUG(0, ("tdbsam: Couldn't register custom debugging class!\n"));
+ }
+#endif
+
if (!NT_STATUS_IS_OK(nt_status = make_pdb_methods(pdb_context->mem_ctx, pdb_method))) {
return nt_status;
}
@@ -934,7 +955,7 @@ NTSTATUS pdb_init_tdbsam_nua(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method,
(*pdb_method)->name = "tdbsam_nua";
tdb_state = (*pdb_method)->private_data;
-
+
tdb_state->permit_non_unix_accounts = True;
if (!lp_non_unix_account_range(&low_nua_uid, &high_nua_uid)) {
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index 32d4b42611..43fc3604a0 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -24,6 +24,9 @@
#include "includes.h"
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_PASSDB
+
static TDB_CONTEXT *tdb;
/* open up the secrets database */