[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Fri Jun 25 04:54:37 MDT 2010
The branch, master has been updated
via 7cf0443... s3: Fix a winbind crash
via a9523f1... s3: Fix a winbind crash
from 5c98ccd... s4 python: Add unit tests related to PyLong/PyInt handling
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 7cf04431594e09043b3b53144fc8511d20b088ee
Author: Volker Lendecke <vl at samba.org>
Date: Fri Jun 25 11:47:30 2010 +0200
s3: Fix a winbind crash
nss_get_info_cached might deep inside sequence_number() invalidate the
ads_struct without telling its callers.
commit a9523f17ea2cd85a130e081f3a89cffbee1fdc06
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 22 15:59:44 2010 +0200
s3: Fix a winbind crash
nss_get_info_cached might have invalidated "ads" deep inside.
-----------------------------------------------------------------------
Summary of changes:
source3/winbindd/winbindd_ads.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c
index faa4d8e..00b53a2 100644
--- a/source3/winbindd/winbindd_ads.c
+++ b/source3/winbindd/winbindd_ads.c
@@ -549,15 +549,30 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
info->acct_name = ads_pull_username(ads, mem_ctx, msg);
- nss_get_info_cached( domain, sid, mem_ctx, ads, msg,
+ status = nss_get_info_cached( domain, sid, mem_ctx, ads, msg,
&info->homedir, &info->shell, &info->full_name,
&gid);
info->primary_gid = gid;
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(1, ("nss_get_info_cached failed: %s\n",
+ nt_errstr(status)));
+ goto done;
+ }
if (info->full_name == NULL) {
info->full_name = ads_pull_string(ads, mem_ctx, msg, "name");
}
+ /*
+ * We have to re-fetch ads from the domain,
+ * nss_get_info_cached might have invalidated it.
+ */
+ ads = ads_cached_connection(domain);
+ if (ads == NULL) {
+ domain->last_status = NT_STATUS_SERVER_DISABLED;
+ goto done;
+ }
+
if (!ads_pull_uint32(ads, msg, "primaryGroupID", &group_rid)) {
DEBUG(1,("No primary group for %s !?\n",
sid_string_dbg(sid)));
--
Samba Shared Repository
More information about the samba-cvs
mailing list