summaryrefslogtreecommitdiff
path: root/source3/passdb/passdb.c
diff options
context:
space:
mode:
authorSteven Danneman <steven.danneman@isilon.com>2009-02-12 13:01:45 -0800
committerSteven Danneman <steven.danneman@isilon.com>2009-02-12 13:55:44 -0800
commit5cd4b7b7c03df6e896186d985b6858a06aa40b3f (patch)
tree8aba35ab96a7efba2b35a7052f6a6e4e0050fe90 /source3/passdb/passdb.c
parentfeec49d5cd07a69991d1bc6dc6325ecda21a19a8 (diff)
downloadsamba-5cd4b7b7c03df6e896186d985b6858a06aa40b3f.tar.gz
s3: Added new parameter "map untrusted to domain"
When enabled this reverts smbd to the legacy domain remapping behavior when a user provides an untrusted domain This partially reverts d8c54fdd
Diffstat (limited to 'source3/passdb/passdb.c')
-rw-r--r--source3/passdb/passdb.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index c526a175f20..95e5deb36f1 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -27,6 +27,24 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB
+/******************************************************************
+ Get the default domain/netbios name to be used when
+ testing authentication.
+
+ LEGACY: this function provides the legacy domain mapping used with
+ the lp_map_untrusted_to_domain() parameter
+******************************************************************/
+
+const char *my_sam_name(void)
+{
+ /* Standalone servers can only use the local netbios name */
+ if ( lp_server_role() == ROLE_STANDALONE )
+ return global_myname();
+
+ /* Default to the DOMAIN name when not specified */
+ return lp_workgroup();
+}
+
/**********************************************************************
***********************************************************************/