summaryrefslogtreecommitdiff
path: root/source3/passdb/machine_sid.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-09 15:31:03 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-09 12:40:09 +0200
commit74eed8f3ed5c333728350df1d23a4318e9104909 (patch)
treec0e4d64d876400e711bf252b73f4bdb43f0e55c1 /source3/passdb/machine_sid.c
parent0e95311c235929e07fdcfd7153b91ae795a979b9 (diff)
downloadsamba-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/machine_sid.c')
-rw-r--r--source3/passdb/machine_sid.c8
1 files changed, 4 insertions, 4 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;