summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2002-08-21 20:50:42 +0000
committerVolker Lendecke <vlendec@samba.org>2002-08-21 20:50:42 +0000
commit37b46432d4d64dc7ddf836dce3917451e62abbeb (patch)
tree9fca077f05f59aae6917ca3bf1fb5c3c671612c9
parent16caf06f6026f8104f4a6701993cbd560e2cd74d (diff)
downloadsamba-37b46432d4d64dc7ddf836dce3917451e62abbeb.tar.gz
samba-37b46432d4d64dc7ddf836dce3917451e62abbeb.tar.bz2
samba-37b46432d4d64dc7ddf836dce3917451e62abbeb.zip
Replaced reference to global_myworkgroup by calls to lp_workgroup().
pdbedit failed to initialize global_myworkgroup, wo we could end up having a SID for SECRETS/SID/ in secrets.tdb. Volker (This used to be commit 8c96ab4bc05e55e119c1b44779fe14d3ab6c5f35)
-rw-r--r--source3/passdb/machine_sid.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/passdb/machine_sid.c b/source3/passdb/machine_sid.c
index e1f7dec2a9..e1a1de83a6 100644
--- a/source3/passdb/machine_sid.c
+++ b/source3/passdb/machine_sid.c
@@ -80,7 +80,6 @@ static BOOL pdb_generate_sam_sid(void)
{
char *fname = NULL;
extern pstring global_myname;
- extern fstring global_myworkgroup;
BOOL is_dc = False;
if(global_sam_sid==NULL)
@@ -106,11 +105,11 @@ static BOOL pdb_generate_sam_sid(void)
if (!is_dc)
return True;
- if (!secrets_fetch_domain_sid(global_myworkgroup, &domain_sid)) {
+ if (!secrets_fetch_domain_sid(lp_workgroup(), &domain_sid)) {
/* No domain sid and we're a pdc/bdc. Store it */
- if (!secrets_store_domain_sid(global_myworkgroup, global_sam_sid)) {
+ if (!secrets_store_domain_sid(lp_workgroup(), global_sam_sid)) {
DEBUG(0,("pdb_generate_sam_sid: Can't store domain SID as a pdc/bdc.\n"));
return False;
}
@@ -122,7 +121,7 @@ static BOOL pdb_generate_sam_sid(void)
/* Domain name sid doesn't match global sam sid. Re-store global sam sid as domain sid. */
DEBUG(0,("pdb_generate_sam_sid: Mismatched SIDs as a pdc/bdc.\n"));
- if (!secrets_store_domain_sid(global_myworkgroup, global_sam_sid)) {
+ if (!secrets_store_domain_sid(lp_workgroup(), global_sam_sid)) {
DEBUG(0,("pdb_generate_sam_sid: Can't re-store domain SID as a pdc/bdc.\n"));
return False;
}
@@ -145,7 +144,7 @@ static BOOL pdb_generate_sam_sid(void)
}
unlink(fname);
if (is_dc) {
- if (!secrets_store_domain_sid(global_myworkgroup, global_sam_sid)) {
+ if (!secrets_store_domain_sid(lp_workgroup(), global_sam_sid)) {
DEBUG(0,("pdb_generate_sam_sid: Failed to store domain SID from file.\n"));
SAFE_FREE(fname);
return False;
@@ -168,7 +167,7 @@ static BOOL pdb_generate_sam_sid(void)
return False;
}
if (is_dc) {
- if (!secrets_store_domain_sid(global_myworkgroup, global_sam_sid)) {
+ if (!secrets_store_domain_sid(lp_workgroup(), global_sam_sid)) {
DEBUG(0,("pdb_generate_sam_sid: Failed to store generated domain SID.\n"));
return False;
}