summaryrefslogtreecommitdiff
path: root/source3/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
commit81d8eefc0d7620d5835b991d28bafe3d4f30eee2 (patch)
tree4502a265a52f3916a302ff23ddca31d70b6b18f1 /source3/lib/username.c
parent5f1ff72f7d314d4bb9762ac11398188719507bc4 (diff)
downloadsamba-81d8eefc0d7620d5835b991d28bafe3d4f30eee2.tar.gz
samba-81d8eefc0d7620d5835b991d28bafe3d4f30eee2.tar.bz2
samba-81d8eefc0d7620d5835b991d28bafe3d4f30eee2.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 (This used to be commit 14f2cd139a22454571cea8475d3b7c5c2787d378)
Diffstat (limited to 'source3/lib/username.c')
-rw-r--r--source3/lib/username.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/lib/username.c b/source3/lib/username.c
index 8130b93c3f..0005372a8f 100644
--- a/source3/lib/username.c
+++ b/source3/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);