summaryrefslogtreecommitdiffstats
path: root/source/lib/username.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-06-23 05:10:07 +0000
committerGerald Carter <jerry@samba.org>2003-06-23 05:10:07 +0000
commit14f2cd139a22454571cea8475d3b7c5c2787d378 (patch)
treedd88eb061ff1a24e591373ab2d019ef12088748e /source/lib/username.c
parent82d3dd757be5c56fdeb97e66f64ec25d5e202614 (diff)
downloadsamba-14f2cd139a22454571cea8475d3b7c5c2787d378.tar.gz
samba-14f2cd139a22454571cea8475d3b7c5c2787d378.tar.xz
samba-14f2cd139a22454571cea8475d3b7c5c2787d378.zip
* set domain->last_status = NT_STATUS_SERVER_DISABLED on an ads_connect() failure
* Fix code to use winbind_rpc methods for trusted mixed mode or NT4 domains ( does no one ever test this? ) * add in LDAP code to get the sequence number for rpc based seqnum update. ( this is needed if the DC is upgraded and samba is not reconfigured to use security = ads; it's not pretty but it works (from app_head) ) * fix bug that caused us to enumerate domain local groups in domains other than our own
Diffstat (limited to 'source/lib/username.c')
-rw-r--r--source/lib/username.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/lib/username.c b/source/lib/username.c
index 8130b93c3f0..0005372a8f8 100644
--- a/source/lib/username.c
+++ b/source/lib/username.c
@@ -589,13 +589,14 @@ BOOL user_in_list(const char *user,const char **list, gid_t *groups, size_t n_gr
fstrcpy(domain, *list);
domain[PTR_DIFF(p, *list)] = 0;
- /* Check to see if name is a Windows group; Win2k native mode DCs
- will return domain local groups; while NT4 or mixed mode 2k DCs
- will not */
+ /* Check to see if name is a Windows group; Win2k native mode DCs
+ will return domain local groups; while NT4 or mixed mode 2k DCs
+ will not */
- if ( winbind_lookup_name(NULL, *list, &g_sid, &name_type)
- && ( name_type==SID_NAME_DOM_GRP || name_type==SID_NAME_ALIAS ) )
- {
+ if ( winbind_lookup_name(NULL, *list, &g_sid, &name_type)
+ && ( name_type==SID_NAME_DOM_GRP ||
+ (strequal(lp_workgroup(), domain) && name_type==SID_NAME_ALIAS) ) )
+ {
/* Check if user name is in the Windows group */
ret = user_in_winbind_group_list(user, *list, &winbind_answered);