diff options
author | Michael Adam <obnox@samba.org> | 2016-01-21 12:40:33 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-01-22 01:55:09 +0100 |
commit | 8ff3257c4c129a941f50e78ede4905bae3712f33 (patch) | |
tree | 860e83e0e48dde4c19d88e555f3b0b2db7e68566 /source3/lib | |
parent | a929913cb1dd3fd94676c0b417a663c064961be9 (diff) | |
download | samba-8ff3257c4c129a941f50e78ede4905bae3712f33.tar.gz |
s3:passdb: move my_sam_name() from passdb to util_name.c
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util_names.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/lib/util_names.c b/source3/lib/util_names.c index 1392b488e0f..802df5d445d 100644 --- a/source3/lib/util_names.c +++ b/source3/lib/util_names.c @@ -171,3 +171,21 @@ const char *get_global_sam_name(void) return lp_netbios_name(); } + +/****************************************************************** + 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 lp_netbios_name(); + + /* Default to the DOMAIN name when not specified */ + return lp_workgroup(); +} |