1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

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>
This commit is contained in:
Michael Adam 2016-01-21 12:40:33 +01:00 committed by Jeremy Allison
parent a929913cb1
commit 8ff3257c4c
4 changed files with 19 additions and 19 deletions

View File

@ -688,7 +688,6 @@ bool login_cache_delentry(const struct samu *sampass);
/* The following definitions come from passdb/passdb.c */
const char *my_sam_name(void);
struct samu *samu_new( TALLOC_CTX *ctx );
NTSTATUS samu_set_unix(struct samu *user, const struct passwd *pwd);
NTSTATUS samu_alloc_rid_unix(struct pdb_methods *methods,

View File

@ -328,6 +328,7 @@ struct passwd *Get_Pwnam_alloc(TALLOC_CTX *mem_ctx, const char *user);
/* The following definitions come from lib/util_names.c */
const char *get_global_sam_name(void);
const char *my_sam_name(void);
/* The following definitions come from lib/util.c */

View File

@ -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();
}

View File

@ -36,24 +36,6 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB
/******************************************************************
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();
}
/**********************************************************************
***********************************************************************/