summaryrefslogtreecommitdiff
path: root/source3/lib/util_names.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-05-26 11:11:08 +1000
committerStefan Metzmacher <metze@samba.org>2010-05-28 18:08:28 +0200
commitd266f8fdf17e5583d419c2b4bd9daf30acebfd6b (patch)
tree2df42ca769a29f5d8bdc79aa0b1763511967c475 /source3/lib/util_names.c
parent539ef13bfe950c7c512a4bdafd9a846c04ba5be4 (diff)
downloadsamba-d266f8fdf17e5583d419c2b4bd9daf30acebfd6b.tar.gz
samba-d266f8fdf17e5583d419c2b4bd9daf30acebfd6b.tar.bz2
samba-d266f8fdf17e5583d419c2b4bd9daf30acebfd6b.zip
s3:lib s3:lib move get_global_sam_name to util_names.c
This doesn't really belong in util_sid.c, and has much more in common with the other functions in util_names.c Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/lib/util_names.c')
-rw-r--r--source3/lib/util_names.c13
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 );