The Samba-Bugzilla – Attachment 7575 Details for
Bug 8952
setgroups being passed a -1 group is causing crashes.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 3.6
sidhistory-3.6.diff (text/plain), 2.25 KB, created by
Ira Cooper
on 2012-05-21 21:28:53 UTC
(
hide
)
Description:
patch for 3.6
Filename:
MIME Type:
Creator:
Ira Cooper
Created:
2012-05-21 21:28:53 UTC
Size:
2.25 KB
patch
obsolete
>diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c >index a904da4..4ac3702 100644 >--- a/source3/auth/auth_util.c >+++ b/source3/auth/auth_util.c >@@ -505,6 +505,10 @@ NTSTATUS create_local_token(struct auth_serversupplied_info *server_info) > sid_string_dbg(&t->sids[i]))); > continue; > } >+ if (ids[i].id.gid == (uint32_t)(-1)) { >+ DEBUG(3, ("Artifical GID -1, skipping.\n")); >+ continue; >+ } > if (!add_gid_to_array_unique(server_info, ids[i].id.gid, > &server_info->utok.groups, > &server_info->utok.ngroups)) { >diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c >index cf15f03..da4ad23 100644 >--- a/source3/winbindd/idmap_ad.c >+++ b/source3/winbindd/idmap_ad.c >@@ -517,6 +517,7 @@ static NTSTATUS idmap_ad_sids_to_unixids(struct idmap_domain *dom, struct id_map > "objectSid", > NULL, /* attr_uidnumber */ > NULL, /* attr_gidnumber */ >+ "sIDHistory", > NULL }; > LDAPMessage *res = NULL; > LDAPMessage *entry = NULL; >@@ -577,7 +578,7 @@ again: > ids[idx]->status = ID_UNKNOWN; > > sidstr = ldap_encode_ndr_dom_sid(talloc_tos(), ids[idx]->sid); >- filter = talloc_asprintf_append_buffer(filter, "(objectSid=%s)", sidstr); >+ filter = talloc_asprintf_append_buffer(filter, "(objectSid=%s)(sIDHistory=%s)", sidstr, sidstr); > > TALLOC_FREE(sidstr); > CHECK_ALLOC_DONE(filter); >@@ -624,8 +625,17 @@ again: > > map = find_map_by_sid(&ids[bidx], &sid); > if (!map) { >- DEBUG(2, ("WARNING: couldn't match result with requested SID\n")); >- continue; >+ if (!ads_pull_sid(ctx->ads, entry, >+ "sIDHistory", &sid)) { >+ DEBUG(2, ("WARNING: couldn't match result with requested SID\n")); >+ DEBUG(10, ("No history SID in entry\n")); >+ continue; >+ } >+ map = find_map_by_sid(&ids[bidx], &sid); >+ if(!map) { >+ DEBUG(2, ("WARNING: couldn't match result with requested SID\n")); >+ continue; >+ } > } > > /* get type */ >@@ -857,7 +867,7 @@ static NTSTATUS nss_ad_get_info( struct nss_domain_entry *e, > attrs[3] = ctx->ad_schema->posix_gidnumber_attr; > > sidstr = ldap_encode_ndr_dom_sid(mem_ctx, sid); >- filter = talloc_asprintf(mem_ctx, "(objectSid=%s)", sidstr); >+ filter = talloc_asprintf(mem_ctx, "(|(objectSid=%s)(sIDHistory=%s))", sidstr,sidstr); > TALLOC_FREE(sidstr); > > if (!filter) {
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 8952
:
7575
|
7576
|
7577
|
7578
|
7579
|
7580
|
7586
|
7587
|
7590
|
7591
|
7592
|
7593