The Samba-Bugzilla – Attachment 4177 Details for
Bug 6386
Samba Panic triggered by Sophos Control Centre.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Better patch for 3.2 and 3.3 that covers all possible cases.
look (text/plain), 2.31 KB, created by
Jeremy Allison
on 2009-05-21 20:06:47 UTC
(
hide
)
Description:
Better patch for 3.2 and 3.3 that covers all possible cases.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-05-21 20:06:47 UTC
Size:
2.31 KB
patch
obsolete
>diff --git a/source/groupdb/mapping_ldb.c b/source/groupdb/mapping_ldb.c >index 68e5b4c..92b2934 100644 >--- a/source/groupdb/mapping_ldb.c >+++ b/source/groupdb/mapping_ldb.c >@@ -222,10 +222,10 @@ static bool get_group_map_from_sid(DOM_SID sid, GROUP_MAP *map) > if (dn == NULL) goto failed; > > ret = ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, NULL, &res); >- talloc_steal(dn, res); >- if (ret != LDB_SUCCESS || res->count != 1) { >+ if (ret != LDB_SUCCESS || res == NULL || res->count != 1) { > goto failed; > } >+ talloc_steal(dn, res); > > if (!msg_to_group_map(res->msgs[0], map)) goto failed; > >@@ -251,8 +251,8 @@ static bool get_group_map_from_gid(gid_t gid, GROUP_MAP *map) > if (expr == NULL) goto failed; > > ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res); >+ if (ret != LDB_SUCCESS || res == NULL || res->count != 1) goto failed; > talloc_steal(expr, res); >- if (ret != LDB_SUCCESS || res->count != 1) goto failed; > > if (!msg_to_group_map(res->msgs[0], map)) goto failed; > >@@ -277,8 +277,8 @@ static bool get_group_map_from_ntname(const char *name, GROUP_MAP *map) > if (expr == NULL) goto failed; > > ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res); >+ if (ret != LDB_SUCCESS || res == NULL || res->count != 1) goto failed; > talloc_steal(expr, res); >- if (ret != LDB_SUCCESS || res->count != 1) goto failed; > > if (!msg_to_group_map(res->msgs[0], map)) goto failed; > >@@ -343,7 +343,7 @@ static bool enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_ > > ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, expr, NULL, &res); > talloc_steal(tmp_ctx, res); >- if (ret != LDB_SUCCESS) goto failed; >+ if (ret != LDB_SUCCESS || res == NULL) goto failed; > > (*pp_rmap) = NULL; > *p_num_entries = 0; >@@ -396,7 +396,7 @@ static NTSTATUS one_alias_membership(const DOM_SID *member, > > ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, attrs, &res); > talloc_steal(expr, res); >- if (ret != LDB_SUCCESS) { >+ if (ret != LDB_SUCCESS || res == NULL) { > goto failed; > } > >@@ -517,7 +517,7 @@ static NTSTATUS enum_aliasmem(const DOM_SID *alias, DOM_SID **sids, size_t *num) > > ret = ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, attrs, &res); > talloc_steal(dn, res); >- if (ret == LDB_SUCCESS && res->count == 0) { >+ if (ret == LDB_SUCCESS && res && res->count == 0) { > talloc_free(dn); > return NT_STATUS_OK; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6386
:
4176
|
4177
|
4178
|
4179
|
4180