summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-06-30 20:45:14 +0000
committerGerald Carter <jerry@samba.org>2003-06-30 20:45:14 +0000
commite359dbcedb53b03df79140c30ecfdfdbcb904595 (patch)
tree8d477ea151c844936e561822256321bff580c588 /source3/passdb
parenta32ae05744e8e065bc4be56e93875c29182bb760 (diff)
downloadsamba-e359dbcedb53b03df79140c30ecfdfdbcb904595.tar.gz
samba-e359dbcedb53b03df79140c30ecfdfdbcb904595.tar.bz2
samba-e359dbcedb53b03df79140c30ecfdfdbcb904595.zip
* cleanup more DC name resolution issues in check_*domain_security()
* is_trusted_domain() is broken without winbind. Still working on this. * get_global_sam_name() should return the workgroup name unless we are a standalone server (verified by volker) * Get_Pwnam() should always fall back to the username (minus domain name) even if it is not our workgroup so that TRUSTEDOMAIN\user can logon if 'user' exists in the local list of accounts (on domain members w/o winbind) Tested using Samba PDC with trusts (running winbindd) and a Samba 3.0 domain member not running winbindd. notes: make_user_info_map() is slightly broken now due to the fact that is_trusted_domain() only works with winbindd. disabled checks temporarily until I can sort this out. (This used to be commit e1d6094d066d4c16ab73075caba40a1ae6c56b1e)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/passdb.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index ac3875e181..ee8ce64cf5 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -29,10 +29,13 @@
const char *get_global_sam_name(void)
{
- if ((lp_server_role() == ROLE_DOMAIN_PDC) || (lp_server_role() == ROLE_DOMAIN_BDC)) {
- return lp_workgroup();
- }
- return global_myname();
+ /* standalone servers can only use the local netbios name */
+ if ( lp_server_role() == ROLE_STANDALONE )
+ return global_myname();
+
+ /* Windows domain members default to the DOMAIN
+ name when not specified */
+ return lp_workgroup();
}
/************************************************************