[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2080-gf19c914

Günther Deschner gd at samba.org
Sat Jun 6 00:01:48 GMT 2009


The branch, master has been updated
       via  f19c9147a5f2222ce8c21d8e194ac7de1a0a196f (commit)
       via  0bf56f5cb31accabb6a3ba81c18217ae24793218 (commit)
      from  64a1f17aff1d17b74398fb270aac5768fd312cf6 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit f19c9147a5f2222ce8c21d8e194ac7de1a0a196f
Author: Günther Deschner <gd at samba.org>
Date:   Sat Jun 6 01:50:17 2009 +0200

    s3-winbindd: add some debug statements while tracking down a bug.
    
    Guenther

commit 0bf56f5cb31accabb6a3ba81c18217ae24793218
Author: Günther Deschner <gd at samba.org>
Date:   Sat Jun 6 01:14:04 2009 +0200

    nss_wrapper: rename nwrap_cache_{re,un}load as per metzes request.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 lib/nss_wrapper/nss_wrapper.c      |   20 ++++++++++----------
 source3/winbindd/winbindd_group.c  |   16 ++++++++++++++--
 source3/winbindd/winbindd_passdb.c |    6 ++++++
 3 files changed, 30 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/nss_wrapper/nss_wrapper.c b/lib/nss_wrapper/nss_wrapper.c
index 73ca6eb..ad0d8ba 100644
--- a/lib/nss_wrapper/nss_wrapper.c
+++ b/lib/nss_wrapper/nss_wrapper.c
@@ -632,7 +632,7 @@ failed:
 	return false;
 }
 
-static void nwrap_cache_unload(struct nwrap_cache *nwrap)
+static void nwrap_files_cache_unload(struct nwrap_cache *nwrap)
 {
 	nwrap->unload(nwrap);
 
@@ -641,7 +641,7 @@ static void nwrap_cache_unload(struct nwrap_cache *nwrap)
 	nwrap->buf = NULL;
 }
 
-static void nwrap_cache_reload(struct nwrap_cache *nwrap)
+static void nwrap_files_cache_reload(struct nwrap_cache *nwrap)
 {
 	struct stat st;
 	int ret;
@@ -692,13 +692,13 @@ reopen:
 
 	nwrap->st = st;
 
-	nwrap_cache_unload(nwrap);
+	nwrap_files_cache_unload(nwrap);
 
 	ok = nwrap_parse_file(nwrap);
 	if (!ok) {
 		NWRAP_ERROR(("%s: failed to reload %s\n",
 			     __location__, nwrap->path));
-		nwrap_cache_unload(nwrap);
+		nwrap_files_cache_unload(nwrap);
 	}
 	NWRAP_DEBUG(("%s: reloaded %s\n",
 		     __location__, nwrap->path));
@@ -1118,7 +1118,7 @@ static struct passwd *nwrap_files_getpwnam(struct nwrap_backend *b,
 {
 	int i;
 
-	nwrap_cache_reload(nwrap_pw_global.cache);
+	nwrap_files_cache_reload(nwrap_pw_global.cache);
 
 	for (i=0; i<nwrap_pw_global.num; i++) {
 		if (strcmp(nwrap_pw_global.list[i].pw_name, name) == 0) {
@@ -1159,7 +1159,7 @@ static struct passwd *nwrap_files_getpwuid(struct nwrap_backend *b,
 {
 	int i;
 
-	nwrap_cache_reload(nwrap_pw_global.cache);
+	nwrap_files_cache_reload(nwrap_pw_global.cache);
 
 	for (i=0; i<nwrap_pw_global.num; i++) {
 		if (nwrap_pw_global.list[i].pw_uid == uid) {
@@ -1206,7 +1206,7 @@ static struct passwd *nwrap_files_getpwent(struct nwrap_backend *b)
 	struct passwd *pw;
 
 	if (nwrap_pw_global.idx == 0) {
-		nwrap_cache_reload(nwrap_pw_global.cache);
+		nwrap_files_cache_reload(nwrap_pw_global.cache);
 	}
 
 	if (nwrap_pw_global.idx >= nwrap_pw_global.num) {
@@ -1258,7 +1258,7 @@ static struct group *nwrap_files_getgrnam(struct nwrap_backend *b,
 {
 	int i;
 
-	nwrap_cache_reload(nwrap_gr_global.cache);
+	nwrap_files_cache_reload(nwrap_gr_global.cache);
 
 	for (i=0; i<nwrap_gr_global.num; i++) {
 		if (strcmp(nwrap_gr_global.list[i].gr_name, name) == 0) {
@@ -1299,7 +1299,7 @@ static struct group *nwrap_files_getgrgid(struct nwrap_backend *b,
 {
 	int i;
 
-	nwrap_cache_reload(nwrap_gr_global.cache);
+	nwrap_files_cache_reload(nwrap_gr_global.cache);
 
 	for (i=0; i<nwrap_gr_global.num; i++) {
 		if (nwrap_gr_global.list[i].gr_gid == gid) {
@@ -1346,7 +1346,7 @@ static struct group *nwrap_files_getgrent(struct nwrap_backend *b)
 	struct group *gr;
 
 	if (nwrap_gr_global.idx == 0) {
-		nwrap_cache_reload(nwrap_gr_global.cache);
+		nwrap_files_cache_reload(nwrap_gr_global.cache);
 	}
 
 	if (nwrap_gr_global.idx >= nwrap_gr_global.num) {
diff --git a/source3/winbindd/winbindd_group.c b/source3/winbindd/winbindd_group.c
index 3273a28..913f631 100644
--- a/source3/winbindd/winbindd_group.c
+++ b/source3/winbindd/winbindd_group.c
@@ -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;
 }
diff --git a/source3/winbindd/winbindd_passdb.c b/source3/winbindd/winbindd_passdb.c
index 1a358b2..b18f0ff 100644
--- a/source3/winbindd/winbindd_passdb.c
+++ b/source3/winbindd/winbindd_passdb.c
@@ -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;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list