diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-09 15:31:03 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-09 12:40:09 +0200 |
commit | 74eed8f3ed5c333728350df1d23a4318e9104909 (patch) | |
tree | c0e4d64d876400e711bf252b73f4bdb43f0e55c1 /source3/passdb | |
parent | 0e95311c235929e07fdcfd7153b91ae795a979b9 (diff) | |
download | samba-74eed8f3ed5c333728350df1d23a4318e9104909.tar.gz samba-74eed8f3ed5c333728350df1d23a4318e9104909.tar.bz2 samba-74eed8f3ed5c333728350df1d23a4318e9104909.zip |
s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.
Andrew Bartlett
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/machine_sid.c | 8 | ||||
-rw-r--r-- | source3/passdb/passdb.c | 8 |
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; |