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:
parent
a929913cb1
commit
8ff3257c4c
@ -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,
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
***********************************************************************/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user