svn commit: samba r16686 - in trunk/source: lib nsswitch
jra at samba.org
jra at samba.org
Thu Jun 29 18:01:20 GMT 2006
Author: jra
Date: 2006-06-29 18:01:20 +0000 (Thu, 29 Jun 2006)
New Revision: 16686
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16686
Log:
Fix bugs #3901, #3902, #3903 reported by jason at ncac.gwu.edu.
Jeremy
Modified:
trunk/source/lib/smbldap.c
trunk/source/nsswitch/winbindd_misc.c
trunk/source/nsswitch/winbindd_user.c
Changeset:
Modified: trunk/source/lib/smbldap.c
===================================================================
--- trunk/source/lib/smbldap.c 2006-06-29 17:11:14 UTC (rev 16685)
+++ trunk/source/lib/smbldap.c 2006-06-29 18:01:20 UTC (rev 16686)
@@ -325,7 +325,7 @@
return NULL;
}
- if (pull_utf8_talloc(mem_ctx, &result, values[0]) < 0) {
+ if (pull_utf8_talloc(mem_ctx, &result, values[0]) == (size_t)-1) {
DEBUG(10, ("pull_utf8_talloc failed\n"));
ldap_value_free(values);
return NULL;
Modified: trunk/source/nsswitch/winbindd_misc.c
===================================================================
--- trunk/source/nsswitch/winbindd_misc.c 2006-06-29 17:11:14 UTC (rev 16685)
+++ trunk/source/nsswitch/winbindd_misc.c 2006-06-29 18:01:20 UTC (rev 16686)
@@ -124,6 +124,12 @@
&num_domains, &names,
&alt_names, &sids);
+ if (!NT_STATUS_IS_OK(result)) {
+ DEBUG(3, ("winbindd_dual_list_trusted_domains: trusted_domains returned %s\n",
+ nt_errstr(result) ));
+ num_domains = 0;
+ }
+
extra_data = talloc_strdup(state->mem_ctx, "");
if (num_domains > 0)
Modified: trunk/source/nsswitch/winbindd_user.c
===================================================================
--- trunk/source/nsswitch/winbindd_user.c 2006-06-29 17:11:14 UTC (rev 16685)
+++ trunk/source/nsswitch/winbindd_user.c 2006-06-29 18:01:20 UTC (rev 16686)
@@ -516,7 +516,6 @@
uint32 num_entries;
WINBIND_USERINFO *info;
struct getpwent_user *name_list = NULL;
- BOOL result = False;
struct winbindd_domain *domain;
struct winbindd_methods *methods;
unsigned int i;
@@ -544,12 +543,18 @@
status = methods->query_user_list(domain, mem_ctx, &num_entries,
&info);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(10,("get_sam_user_entries: query_user_list failed with %s\n",
+ nt_errstr(status) ));
+ return False;
+ }
+
if (num_entries) {
name_list = SMB_REALLOC_ARRAY(name_list, struct getpwent_user, ent->num_sam_entries + num_entries);
if (!name_list) {
DEBUG(0,("get_sam_user_entries realloc failed.\n"));
- goto done;
+ return False;
}
}
@@ -594,11 +599,7 @@
ent->sam_entries = name_list;
ent->sam_entry_index = 0;
- result = ent->num_sam_entries > 0;
-
- done:
-
- return result;
+ return ent->num_sam_entries > 0;
}
/* Fetch next passwd entry from ntdom database */
@@ -749,6 +750,10 @@
status = methods->query_user_list(domain, state->mem_ctx,
&num_entries, &info);
+ if (!NT_STATUS_IS_OK(status)) {
+ continue;
+ }
+
if (num_entries == 0)
continue;
More information about the samba-cvs
mailing list