The Samba-Bugzilla – Attachment 2051 Details for
Bug 3920
winbind does not honor "winbind use default domain = Yes" for getent group and wbinfo -g
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
restore winbind default domain behavior for groups
look (text/plain), 2.72 KB, created by
Gerald (Jerry) Carter (dead mail address)
on 2006-07-20 12:52:03 UTC
(
hide
)
Description:
restore winbind default domain behavior for groups
Filename:
MIME Type:
Creator:
Gerald (Jerry) Carter (dead mail address)
Created:
2006-07-20 12:52:03 UTC
Size:
2.72 KB
patch
obsolete
>=== modified file 'source/nsswitch/winbindd_async.c' >--- source/nsswitch/winbindd_async.c >+++ source/nsswitch/winbindd_async.c >@@ -4,7 +4,7 @@ > Async helpers for blocking functions > > Copyright (C) Volker Lendecke 2005 >- Copyright (C) Volker Lendecke 2006 >+ Copyright (C) Gerald Carter 2006 > > The helpers always consist of three functions: > > >=== modified file 'source/nsswitch/winbindd_group.c' >--- source/nsswitch/winbindd_group.c >+++ source/nsswitch/winbindd_group.c >@@ -42,7 +42,7 @@ > { > fstring full_group_name; > >- fill_domain_username( full_group_name, dom_name, gr_name, False); >+ fill_domain_username( full_group_name, dom_name, gr_name, True ); > > gr->gr_gid = unix_gid; > >@@ -146,7 +146,7 @@ > > /* Append domain name */ > >- fill_domain_username(name, domain->name, the_name, False); >+ fill_domain_username(name, domain->name, the_name, True); > > len = strlen(name); > >@@ -752,7 +752,7 @@ > /* Fill in group entry */ > > fill_domain_username(domain_group_name, ent->domain_name, >- name_list[ent->sam_entry_index].acct_name, False); >+ name_list[ent->sam_entry_index].acct_name, True); > > result = fill_grent(&group_list[group_list_ndx], > ent->domain_name, >@@ -929,7 +929,7 @@ > groups.sam_entries)[i].acct_name; > fstring name; > >- fill_domain_username(name, domain->name, group_name, False); >+ fill_domain_username(name, domain->name, group_name, True); > /* Append to extra data */ > memcpy(&extra_data[extra_data_len], name, > strlen(name)); > >=== modified file 'source/nsswitch/winbindd_util.c' >--- source/nsswitch/winbindd_util.c >+++ source/nsswitch/winbindd_util.c >@@ -812,14 +812,28 @@ > > /* Is this a domain which we may assume no DOMAIN\ prefix? */ > >-static BOOL assume_domain(const char *domain) { >- if ((lp_winbind_use_default_domain() >- || lp_winbind_trusted_domains_only()) && >- strequal(lp_workgroup(), domain)) >+static BOOL assume_domain(const char *domain) >+{ >+ /* never assume the domain on a standalone server */ >+ >+ if ( lp_server_role() == ROLE_STANDALONE ) >+ return False; >+ >+ /* domain member servers may possibly assume for the domain name */ >+ >+ if ( lp_server_role() == ROLE_DOMAIN_MEMBER ) { >+ if ( !strequal(lp_workgroup(), domain) ) >+ return False; >+ >+ if ( lp_winbind_use_default_domain() || lp_winbind_trusted_domains_only() ) >+ return True; >+ } >+ >+ /* only left with a domain controller */ >+ >+ if ( strequal(get_global_sam_name(), domain) ) { > return True; >- >- if (strequal(get_global_sam_name(), domain)) >- return True; >+ } > > return False; > } >@@ -832,7 +846,7 @@ > > if ( !p ) { > fstrcpy(user, domuser); >- >+ > if ( assume_domain(lp_workgroup())) { > fstrcpy(domain, lp_workgroup()); > } else { >
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 3920
:
2031
| 2051