s3-winbindd: add some debug statements while tracking down a bug.
authorGünther Deschner <gd@samba.org>
Fri, 5 Jun 2009 23:50:17 +0000 (01:50 +0200)
committerGünther Deschner <gd@samba.org>
Sat, 6 Jun 2009 00:00:36 +0000 (02:00 +0200)
Guenther

source3/winbindd/winbindd_group.c
source3/winbindd/winbindd_passdb.c

index 3273a288e253af0923f00044f3f53578c4e743f9..913f63112f44100522eeaf6f13282392b13ce3ba 100644 (file)
@@ -460,6 +460,8 @@ static NTSTATUS expand_groups( TALLOC_CTX *ctx,
        *new_glist = NULL;
        *n_new_glist = 0;
 
+       DEBUG(10,("expand_groups:\n"));
+
        for ( i=0; i<n_glist; i++ ) {
                tmp_ctx = talloc_new( ctx );
 
@@ -469,8 +471,12 @@ static NTSTATUS expand_groups( TALLOC_CTX *ctx,
                                                     &glist[i], &num_names,
                                                     &sid_mem, &names,
                                                     &name_types);
-               if ( !NT_STATUS_IS_OK(status) )
+               if (!NT_STATUS_IS_OK(status)) {
+                       DEBUG(10,("expand_groups: lookup_groupmem for "
+                               "sid %s failed with: %s\n",
+                               sid_string_dbg(&glist[i]), nt_errstr(status)));
                        goto out;
+               }
 
                /* Separate users and groups into two lists */
 
@@ -514,6 +520,11 @@ static NTSTATUS expand_groups( TALLOC_CTX *ctx,
  out:
        TALLOC_FREE( tmp_ctx );
 
+       if (!NT_STATUS_IS_OK(status)) {
+               DEBUG(10,("expand_groups: returning with %s\n",
+                       nt_errstr(status)));
+       }
+
        return status;
 }
 
@@ -726,7 +737,8 @@ done:
 
        talloc_destroy(mem_ctx);
 
-       DEBUG(10, ("fill_grent_mem returning %d\n", result));
+       DEBUG(10,("fill_grent_mem returning %s\n",
+               result == true ? "true" : "false"));
 
        return result;
 }
index 1a358b2b440ce6621c1d7cdebe37d09f5868afae..b18f0ff5957472ef73b30e20c88686d0e63e3ada 100644 (file)
@@ -412,6 +412,9 @@ static NTSTATUS builtin_lookup_groupmem(struct winbindd_domain *domain,
                                DOM_SID **sid_mem, char ***names,
                                uint32 **name_types)
 {
+       DEBUG(10,("passdb: lookup_groupmem (builtin) %s sid=%s\n", domain->name,
+                 sid_string_dbg(group_sid)));
+
        *num_names = 0;
        *sid_mem = NULL;
        *names = NULL;
@@ -571,6 +574,9 @@ static NTSTATUS sam_lookup_groupmem(struct winbindd_domain *domain,
        struct lsa_name_info *lsa_names;
        TALLOC_CTX *tmp_ctx;
 
+       DEBUG(10,("passdb: lookup_groupmem (sam) %s sid=%s\n", domain->name,
+                 sid_string_dbg(group_sid)));
+
        if (!sid_check_is_in_our_domain(group_sid)) {
                /* There's no groups, only aliases in BUILTIN */
                return NT_STATUS_NO_SUCH_GROUP;