diff options
author | Gerald Carter <jerry@samba.org> | 2003-07-01 04:11:42 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-07-01 04:11:42 +0000 |
commit | 0362868fa73bc339d40625ec0adade05fb80a9a7 (patch) | |
tree | 17acecf9b626b64edac66b620af971c238ae9ea9 /source3/passdb | |
parent | db6ce132e360a42ea6843c81429be194662fce39 (diff) | |
download | samba-0362868fa73bc339d40625ec0adade05fb80a9a7.tar.gz samba-0362868fa73bc339d40625ec0adade05fb80a9a7.tar.bz2 samba-0362868fa73bc339d40625ec0adade05fb80a9a7.zip |
* revert change to get_global_sam_name()
* add get_default_sam_name() to be used by make_user_info_map()
* add comments describing get_*_sam_name()
(This used to be commit 90470366ea4bdb8021a3453c4bbeb29f009668c1)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/passdb.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index ee8ce64cf5..ece4a1e057 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -27,17 +27,38 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_PASSDB -const char *get_global_sam_name(void) +/****************************************************************** + get the default domain/netbios name to be used when + testing authentication. For example, if you connect + to a Windows member server using a bogus domain name, the + Windows box will map the BOGUS\user to DOMAIN\user. A + standalone box will map to WKS\user. +******************************************************************/ + +const char *get_default_sam_name(void) { /* 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 + /* Windows domain members default to the DOMAIN name when not specified */ return lp_workgroup(); } +/****************************************************************** + get the default domain/netbios name to be used when dealing + with our passdb list of accounts +******************************************************************/ + +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(); +} + /************************************************************ Fill the SAM_ACCOUNT with default values. ***********************************************************/ |