svn commit: samba r7577 - branches/SAMBA_3_0/source/passdb
trunk/source/passdb
jerry at samba.org
jerry at samba.org
Tue Jun 14 18:31:06 GMT 2005
Author: jerry
Date: 2005-06-14 18:31:06 +0000 (Tue, 14 Jun 2005)
New Revision: 7577
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7577
Log:
switching to macro for IS_DC
Modified:
branches/SAMBA_3_0/source/passdb/machine_sid.c
trunk/source/passdb/machine_sid.c
Changeset:
Modified: branches/SAMBA_3_0/source/passdb/machine_sid.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/machine_sid.c 2005-06-14 18:08:39 UTC (rev 7576)
+++ branches/SAMBA_3_0/source/passdb/machine_sid.c 2005-06-14 18:31:06 UTC (rev 7577)
@@ -80,23 +80,12 @@
{
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 @@
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 @@
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 @@
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);
Modified: trunk/source/passdb/machine_sid.c
===================================================================
--- trunk/source/passdb/machine_sid.c 2005-06-14 18:08:39 UTC (rev 7576)
+++ trunk/source/passdb/machine_sid.c 2005-06-14 18:31:06 UTC (rev 7577)
@@ -80,23 +80,12 @@
{
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 @@
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 @@
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 @@
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);
More information about the samba-cvs
mailing list