summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/machine_sid.c8
-rw-r--r--source3/passdb/passdb.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/source3/passdb/machine_sid.c b/source3/passdb/machine_sid.c
index 8fd5103164..6d4cf237c7 100644
--- a/source3/passdb/machine_sid.c
+++ b/source3/passdb/machine_sid.c
@@ -97,7 +97,7 @@ static struct dom_sid *pdb_generate_sam_sid(void)
}
}
- if (secrets_fetch_domain_sid(global_myname(), sam_sid)) {
+ if (secrets_fetch_domain_sid(lp_netbios_name(), sam_sid)) {
/* We got our sid. If not a pdc/bdc, we're done. */
if ( !IS_DC )
@@ -120,7 +120,7 @@ static struct dom_sid *pdb_generate_sam_sid(void)
/* Domain name sid doesn't match global sam sid. Re-store domain sid as 'local' sid. */
DEBUG(0,("pdb_generate_sam_sid: Mismatched SIDs as a pdc/bdc.\n"));
- if (!secrets_store_domain_sid(global_myname(), &domain_sid)) {
+ if (!secrets_store_domain_sid(lp_netbios_name(), &domain_sid)) {
DEBUG(0,("pdb_generate_sam_sid: Can't re-store domain SID for local sid as PDC/BDC.\n"));
SAFE_FREE(sam_sid);
return NULL;
@@ -139,7 +139,7 @@ static struct dom_sid *pdb_generate_sam_sid(void)
if (read_sid_from_file(fname, sam_sid)) {
/* remember it for future reference and unlink the old MACHINE.SID */
- if (!secrets_store_domain_sid(global_myname(), sam_sid)) {
+ if (!secrets_store_domain_sid(lp_netbios_name(), sam_sid)) {
DEBUG(0,("pdb_generate_sam_sid: Failed to store SID from file.\n"));
SAFE_FREE(fname);
SAFE_FREE(sam_sid);
@@ -166,7 +166,7 @@ static struct dom_sid *pdb_generate_sam_sid(void)
generate one and save it */
generate_random_sid(sam_sid);
- if (!secrets_store_domain_sid(global_myname(), sam_sid)) {
+ if (!secrets_store_domain_sid(lp_netbios_name(), sam_sid)) {
DEBUG(0,("pdb_generate_sam_sid: Failed to store generated machine SID.\n"));
SAFE_FREE(sam_sid);
return NULL;
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index fcdaf272c8..5116396cd1 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -46,7 +46,7 @@ const char *my_sam_name(void)
{
/* Standalone servers can only use the local netbios name */
if ( lp_server_role() == ROLE_STANDALONE )
- return global_myname();
+ return lp_netbios_name();
/* Default to the DOMAIN name when not specified */
return lp_workgroup();
@@ -149,7 +149,7 @@ static int count_commas(const char *str)
static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *pwd, bool create)
{
const char *guest_account = lp_guestaccount();
- const char *domain = global_myname();
+ const char *domain = lp_netbios_name();
char *fullname;
uint32_t urid;
@@ -2355,7 +2355,7 @@ bool get_trust_pw_clear(const char *domain, char **ret_pwd,
if (pwd != NULL) {
*ret_pwd = pwd;
if (account_name != NULL) {
- *account_name = global_myname();
+ *account_name = lp_netbios_name();
}
return true;
@@ -2393,7 +2393,7 @@ bool get_trust_pw_hash(const char *domain, uint8_t ret_pwd[16],
channel))
{
if (account_name != NULL) {
- *account_name = global_myname();
+ *account_name = lp_netbios_name();
}
return true;