summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-05-16 00:31:51 +0000
committerTim Potter <tpot@samba.org>2003-05-16 00:31:51 +0000
commit6ab6a2e6af3b49c8353e8834eda7e4caf3461fc1 (patch)
treecc36ec6c622bf28a743a1ec0d0ea5b2a67ee02a4 /source3/passdb
parent13686d6772a235e209e14ca4edddb39a02a0e1d4 (diff)
downloadsamba-6ab6a2e6af3b49c8353e8834eda7e4caf3461fc1.tar.gz
samba-6ab6a2e6af3b49c8353e8834eda7e4caf3461fc1.tar.bz2
samba-6ab6a2e6af3b49c8353e8834eda7e4caf3461fc1.zip
Merge get_global_sam_name() from 3.0 to fix compile breakage.
(This used to be commit bc71d7a4ab70339cfd815a57448cbd8762d5ce38)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/passdb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index ccfc9a1693..1add2bfa7f 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -27,6 +27,14 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB
+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();
+}
+
/*
* This is set on startup - it defines the SID for this
* machine, and therefore the SAM database for which it is