diff options
-rw-r--r-- | source3/passdb/passdb.c | 8 |
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 |