Changeset 1212

Show
Ignore:
Timestamp:
03/05/10 10:09:49 (5 months ago)
Author:
Gary
Message:

unxsBind bind.c experimental code now alpha approved.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/unxsBind/bind.c

    r1211 r1212  
    5050unsigned uGetZoneOwner(unsigned uZone);//local 
    5151 
    52 #define EXPERIMENTAL 
    53 #ifdef EXPERIMENTAL 
    54         unsigned uNamedCheckConf(char *cNSSet); 
    55         #warning "You are compiling with the EXPERIMENTAL define on. You may be including code:" 
    56         #warning "That is in progress, not properly tested, possibly buggy or that does not compile." 
    57         #warning "You have been warned!" 
    58 #endif 
     52unsigned uNamedCheckConf(char *cNSSet); 
    5953 
    6054 
     
    15031497                unsigned uGID=25; 
    15041498                unsigned uUID=25; 
    1505 #ifdef EXPERIMENTAL 
    15061499                char cZoneFile[512]={""}; 
    15071500                unsigned uZoneOwner=0; 
    1508 #endif 
    15091501                GetConfiguration("cuUID",cuUID,0); 
    15101502                if(cuUID[0]) sscanf(cuUID,"%u",&uUID); 
     
    15771569                        sprintf(gcQuery,"/usr/local/idns/named.d/master/%s/%c/%s", 
    15781570                                        field[12],field[0][0],field[0]); 
    1579 #ifdef EXPERIMENTAL 
    15801571                        sprintf(cZoneFile,"%.511s",gcQuery); 
    1581 #endif 
    15821572                        if(!uDebug) 
    15831573                        { 
     
    17191709                        mysql_free_result(res2); 
    17201710                        if(zfp && !uDebug) fclose(zfp); 
    1721 #ifdef EXPERIMENTAL 
    1722                         //Here's when this EXPERIMENTAL code starts to make sense. 
    1723                         //Does it? 
    1724                         //If defined, the software will run a named-checkzone for the zone 
    1725                         //In case an issue is found, a tLog record will be created in order 
    1726                         //to report to the user via interface func() procedure. 
    1727                         //The format of the tLog entry will be: 
    1728                         //tLog.uTablePK=tZone.uZone 
    1729                         //tLog.cTableName="tZone" 
    1730                         //tLog.cMessage="Zone with errors" 
    1731                         //tLog.uOwner will match the tClient.uClient value of the company that owns the zone 
    1732  
     1711 
     1712                        //Check with ISC tools and report to dashboard 
    17331713                        int iRetVal; 
    1734                         char cQuery[512]; 
     1714                        char cQuery[256]; 
    17351715 
    17361716                        uZoneOwner=uGetZoneOwner(uZone); 
     
    17491729                                printf("%s returned %d\n",cQuery,iRetVal); 
    17501730                        } 
    1751 #endif 
     1731 
    17521732                } 
    17531733                mysql_free_result(res); 
     
    21992179                //debug only 
    22002180                //printf("Reconfiguring slave server..."); 
    2201 #ifdef EXPERIMENTAL              
    22022181                if((uNamedCheckConf(cNameServer))) exit(1); //Exit without reloading the server 
    2203 #endif 
    22042182                if(cuControlPort[0]) 
    22052183                        sprintf(cCmd,"%s/rndc -c /etc/unxsbind-rndc.conf -p %s reconfig",gcBinDir,cuControlPort); 
     
    23362314        if(uReload) 
    23372315        { 
    2338 #ifdef EXPERIMENTAL 
    23392316                if((uNamedCheckConf(cNameServer))) exit(1); //Will exit without server reload or reconfig 
    2340 #endif 
    23412317                if(cuControlPort[0]) 
    23422318                        sprintf(cCmd,"%s/rndc -c /etc/unxsbind-rndc.conf -p %s reload",gcBinDir,cuControlPort); 
     
    23492325        else if(uReconfig) 
    23502326        { 
    2351 #ifdef EXPERIMENTAL 
    23522327                if((uNamedCheckConf(cNameServer))) exit(1); //Will exit without server reload or reconfig 
    2353 #endif 
    23542328                if(cuControlPort[0]) 
    23552329                        sprintf(cCmd,"%s/rndc -c /etc/unxsbind-rndc.conf -p %s reconfig",gcBinDir,cuControlPort); 
     
    33153289 
    33163290        GetConfiguration("cuControlPort",cuControlPort,0); 
    3317 #ifdef EXPERIMENTAL 
    33183291        if((uNamedCheckConf("ViewReloadZone() call"))) return(1); 
    3319 #endif 
    33203292        //Multiple view rndc reload 
    33213293        //Do we need to reload all views, when we might have only modified the internal view for example? 
     
    36923664 
    36933665 
    3694 #ifdef EXPERIMENTAL 
    36953666unsigned uNamedCheckConf(char *cNameServer) 
    36963667{ 
     
    37233694 
    37243695}//unsigned uNamedCheckConf(void) 
    3725 #endif 
     3696 
    37263697 
    37273698unsigned uGetOrganization(char *cLabel)