summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_user.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-06-30 17:24:59 +0000
committerGerald Carter <jerry@samba.org>2003-06-30 17:24:59 +0000
commitf2659351017a8b2ec12548a3967cdf2767738e08 (patch)
treef552a2a0cea5192d7aa01af3daac2beb43eb9b50 /source3/nsswitch/winbindd_user.c
parent1d8cd8faf620cb068d740d8fad7968525d45e83a (diff)
downloadsamba-f2659351017a8b2ec12548a3967cdf2767738e08.tar.gz
samba-f2659351017a8b2ec12548a3967cdf2767738e08.tar.bz2
samba-f2659351017a8b2ec12548a3967cdf2767738e08.zip
* rename samstrict auth method to sam
* rename original sam auth method to sam_ignoredomain * remove samstrict_dc auth method (now covered by 'sam') * fix wbinfo -a '...' and getent passwd bugs when running winbindd on a samba PDC (reported by Volker) (This used to be commit 52166faee793d337e045d64f7cb27ea7ac895f60)
Diffstat (limited to 'source3/nsswitch/winbindd_user.c')
-rw-r--r--source3/nsswitch/winbindd_user.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c
index 518f335f27..9d9360a6fa 100644
--- a/source3/nsswitch/winbindd_user.c
+++ b/source3/nsswitch/winbindd_user.c
@@ -5,6 +5,7 @@
Copyright (C) Tim Potter 2000
Copyright (C) Jeremy Allison 2001.
+ Copyright (C) Gerald (Jerry) Carter 2003.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -118,9 +119,7 @@ enum winbindd_result winbindd_getpwnam(struct winbindd_cli_state *state)
/* don't handle our own domain if we are a DC. This code handles cases where
the account doesn't exist anywhere and gets passed on down the NSS layer */
- if ( ((lp_server_role() == ROLE_DOMAIN_PDC) || (lp_server_role()==ROLE_DOMAIN_BDC)) &&
- strequal(name_domain, lp_workgroup()) )
- {
+ if ( IS_DC_FOR_DOMAIN(domain->name) ) {
DEBUG(7,("winbindd_getpwnam: rejecting getpwnam() for %s\\%s since I am on the PDC for this domain\n",
name_domain, name_user));
return WINBINDD_ERROR;
@@ -296,6 +295,12 @@ enum winbindd_result winbindd_setpwent(struct winbindd_cli_state *state)
for(domain = domain_list(); domain != NULL; domain = domain->next) {
struct getent_state *domain_state;
+
+ /* don't add our domaina if we are a PDC */
+
+ if ( IS_DC_FOR_DOMAIN( domain->name ) )
+ continue;
+
/* Create a state record for this domain */
if ((domain_state = (struct getent_state *)