diff options
Diffstat (limited to 'source3/lib/util_names.c')
-rw-r--r-- | source3/lib/util_names.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/lib/util_names.c b/source3/lib/util_names.c index 1ad9cd317c..bd6e5c1202 100644 --- a/source3/lib/util_names.c +++ b/source3/lib/util_names.c @@ -65,6 +65,19 @@ const char *lp_workgroup(void) return smb_myworkgroup; } +/****************************************************************** + 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 (IS_DC) { + return lp_workgroup(); + } + return global_myname(); +} + void gfree_netbios_names(void) { SAFE_FREE( smb_myname ); |