The Samba-Bugzilla – Attachment 1884 Details for
Bug 3741
Unix groups do no longer work with valid users
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch checked in with r15360
3741.diff (text/plain), 1.35 KB, created by
Volker Lendecke
on 2006-04-30 09:35:31 UTC
(
hide
)
Description:
Patch checked in with r15360
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2006-04-30 09:35:31 UTC
Size:
1.35 KB
patch
obsolete
>Index: passdb/lookup_sid.c >=================================================================== >--- passdb/lookup_sid.c (Revision 15357) >+++ passdb/lookup_sid.c (Arbeitskopie) >@@ -128,11 +128,30 @@ > * the expansion of group names coming in from smb.conf > */ > >- if ((flags & LOOKUP_NAME_GROUP) && >- (lookup_unix_group_name(name, &sid))) { >- domain = talloc_strdup(tmp_ctx, unix_groups_domain_name()); >- type = SID_NAME_DOM_GRP; >- goto ok; >+ if (flags & LOOKUP_NAME_GROUP) { >+ struct group *grp; >+ >+ /* If we are using the smbpasswd backend, we need to use the >+ * algorithmic mapping for the unix group we find. This is >+ * necessary because when creating the NT token from the unix >+ * gid list we got from initgroups() we use gid_to_sid() that >+ * uses algorithmic mapping if pdb_rid_algorithm() is true. */ >+ >+ if (pdb_rid_algorithm() && ((grp = getgrnam(name)) != NULL) && >+ (grp->gr_gid < max_algorithmic_gid())) { >+ domain = talloc_strdup(tmp_ctx, get_global_sam_name()); >+ sid_compose(&sid, get_global_sam_sid(), >+ pdb_gid_to_group_rid(grp->gr_gid)); >+ type = SID_NAME_DOM_GRP; >+ goto ok; >+ } >+ >+ if (lookup_unix_group_name(name, &sid)) { >+ domain = talloc_strdup(tmp_ctx, >+ unix_groups_domain_name()); >+ type = SID_NAME_DOM_GRP; >+ goto ok; >+ } > } > > /* Now the guesswork begins, we haven't been given an explicit
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 3741
:
1882
|
1883
| 1884