From eaa4ee9bc07b0a2d412c7a73103f404b10d81dda Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 9 Sep 2002 21:38:42 +0000 Subject: Use SAM debug class in skeleton - patch from metze Shouldn't we use dynamic debug classes here? (This used to be commit db0f742e0ea619e69457f15cdb3740ae7c85cebd) --- examples/sam/sam_skel.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'examples') diff --git a/examples/sam/sam_skel.c b/examples/sam/sam_skel.c index 5dae5a5843..a3b8f13391 100644 --- a/examples/sam/sam_skel.c +++ b/examples/sam/sam_skel.c @@ -21,7 +21,7 @@ #include "includes.h" -static int sam_skel_debug_level = DBGC_ALL; +static int sam_skel_debug_level = DBGC_SAM; #undef DBGC_CLASS #define DBGC_CLASS sam_skel_debug_level @@ -189,7 +189,7 @@ NTSTATUS sam_skel_get_groups_of_sid(const SAM_METHODS *sam_method, const NT_USER return NT_STATUS_NOT_IMPLEMENTED; } -NTSTATUS sam_init(const SAM_CONTEXT *sam_context, SAM_METHODS **sam_method, const char *location) +NTSTATUS sam_init(const SAM_CONTEXT *sam_context, SAM_METHODS **sam_method, const DOM_SID *domain, const char *module_params) { NTSTATUS nt_status; @@ -245,13 +245,14 @@ NTSTATUS sam_init(const SAM_CONTEXT *sam_context, SAM_METHODS **sam_method, cons sam_skel_debug_level = debug_add_class("sam_skel"); if (sam_skel_debug_level == -1) { - sam_skel_debug_level = DBGC_ALL; + sam_skel_debug_level = DBGC_SAM; DEBUG(0, ("sam_skel: Couldn't register custom debugging class!\n")); - } else DEBUG(0, ("sam_skel: Debug class number of 'sam_skel': %d\n", sam_skel_debug_level)); + } else DEBUG(2, ("sam_skel: Debug class number of 'sam_skel': %d\n", sam_skel_debug_level)); - DEBUG(0, ("Initializing sam_skel\n")); - if (location) - DEBUG(10, ("Location: %s\n", location)); + if(module_params) + DEBUG(0, ("Starting 'sam_skel' with parameters '%s' for domain %s\n", module_params, sid_string_static(domain))); + else + DEBUG(0, ("Starting 'sam_skel' for domain %s without paramters\n", sid_string_static(domain))); return NT_STATUS_OK; } -- cgit