summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-06-14 18:31:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:14 -0500
commit3c47e65e93aac97d263e1373f85e92a97f3d5aab (patch)
treefc6b8ee389f277e01816748fe47f954fe93931d6 /source3
parent023ac1031b0057ee752cf2d3a8de3d6e0d4b1802 (diff)
downloadsamba-3c47e65e93aac97d263e1373f85e92a97f3d5aab.tar.gz
samba-3c47e65e93aac97d263e1373f85e92a97f3d5aab.tar.bz2
samba-3c47e65e93aac97d263e1373f85e92a97f3d5aab.zip
r7577: switching to macro for IS_DC
(This used to be commit e6df9a7ac74a4e4f8de15fc01799bf42dfdd530c)
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/machine_sid.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/source3/passdb/machine_sid.c b/source3/passdb/machine_sid.c
index ecc7d291f6..87ec27d34e 100644
--- a/source3/passdb/machine_sid.c
+++ b/source3/passdb/machine_sid.c
@@ -80,23 +80,12 @@ static DOM_SID *pdb_generate_sam_sid(void)
{
DOM_SID domain_sid;
char *fname = NULL;
- BOOL is_dc = False;
DOM_SID *sam_sid;
if(!(sam_sid=SMB_MALLOC_P(DOM_SID)))
return NULL;
-
- switch (lp_server_role()) {
- case ROLE_DOMAIN_PDC:
- case ROLE_DOMAIN_BDC:
- is_dc = True;
- break;
- default:
- is_dc = False;
- break;
- }
- if (is_dc) {
+ if ( IS_DC ) {
if (secrets_fetch_domain_sid(lp_workgroup(), &domain_sid)) {
sid_copy(sam_sid, &domain_sid);
return sam_sid;
@@ -106,7 +95,7 @@ static DOM_SID *pdb_generate_sam_sid(void)
if (secrets_fetch_domain_sid(global_myname(), sam_sid)) {
/* We got our sid. If not a pdc/bdc, we're done. */
- if (!is_dc)
+ if ( !IS_DC )
return sam_sid;
if (!secrets_fetch_domain_sid(lp_workgroup(), &domain_sid)) {
@@ -150,7 +139,7 @@ static DOM_SID *pdb_generate_sam_sid(void)
return NULL;
}
unlink(fname);
- if (is_dc) {
+ if ( !IS_DC ) {
if (!secrets_store_domain_sid(lp_workgroup(), sam_sid)) {
DEBUG(0,("pdb_generate_sam_sid: Failed to store domain SID from file.\n"));
SAFE_FREE(fname);
@@ -175,7 +164,7 @@ static DOM_SID *pdb_generate_sam_sid(void)
SAFE_FREE(sam_sid);
return NULL;
}
- if (is_dc) {
+ if ( IS_DC ) {
if (!secrets_store_domain_sid(lp_workgroup(), sam_sid)) {
DEBUG(0,("pdb_generate_sam_sid: Failed to store generated domain SID.\n"));
SAFE_FREE(sam_sid);