Changeset 1212
- Timestamp:
- 03/05/10 10:09:49 (5 months ago)
- Files:
-
- 1 modified
-
trunk/unxsBind/bind.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/unxsBind/bind.c
r1211 r1212 50 50 unsigned uGetZoneOwner(unsigned uZone);//local 51 51 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 52 unsigned uNamedCheckConf(char *cNSSet); 59 53 60 54 … … 1503 1497 unsigned uGID=25; 1504 1498 unsigned uUID=25; 1505 #ifdef EXPERIMENTAL1506 1499 char cZoneFile[512]={""}; 1507 1500 unsigned uZoneOwner=0; 1508 #endif1509 1501 GetConfiguration("cuUID",cuUID,0); 1510 1502 if(cuUID[0]) sscanf(cuUID,"%u",&uUID); … … 1577 1569 sprintf(gcQuery,"/usr/local/idns/named.d/master/%s/%c/%s", 1578 1570 field[12],field[0][0],field[0]); 1579 #ifdef EXPERIMENTAL1580 1571 sprintf(cZoneFile,"%.511s",gcQuery); 1581 #endif1582 1572 if(!uDebug) 1583 1573 { … … 1719 1709 mysql_free_result(res2); 1720 1710 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 1733 1713 int iRetVal; 1734 char cQuery[ 512];1714 char cQuery[256]; 1735 1715 1736 1716 uZoneOwner=uGetZoneOwner(uZone); … … 1749 1729 printf("%s returned %d\n",cQuery,iRetVal); 1750 1730 } 1751 #endif 1731 1752 1732 } 1753 1733 mysql_free_result(res); … … 2199 2179 //debug only 2200 2180 //printf("Reconfiguring slave server..."); 2201 #ifdef EXPERIMENTAL2202 2181 if((uNamedCheckConf(cNameServer))) exit(1); //Exit without reloading the server 2203 #endif2204 2182 if(cuControlPort[0]) 2205 2183 sprintf(cCmd,"%s/rndc -c /etc/unxsbind-rndc.conf -p %s reconfig",gcBinDir,cuControlPort); … … 2336 2314 if(uReload) 2337 2315 { 2338 #ifdef EXPERIMENTAL2339 2316 if((uNamedCheckConf(cNameServer))) exit(1); //Will exit without server reload or reconfig 2340 #endif2341 2317 if(cuControlPort[0]) 2342 2318 sprintf(cCmd,"%s/rndc -c /etc/unxsbind-rndc.conf -p %s reload",gcBinDir,cuControlPort); … … 2349 2325 else if(uReconfig) 2350 2326 { 2351 #ifdef EXPERIMENTAL2352 2327 if((uNamedCheckConf(cNameServer))) exit(1); //Will exit without server reload or reconfig 2353 #endif2354 2328 if(cuControlPort[0]) 2355 2329 sprintf(cCmd,"%s/rndc -c /etc/unxsbind-rndc.conf -p %s reconfig",gcBinDir,cuControlPort); … … 3315 3289 3316 3290 GetConfiguration("cuControlPort",cuControlPort,0); 3317 #ifdef EXPERIMENTAL3318 3291 if((uNamedCheckConf("ViewReloadZone() call"))) return(1); 3319 #endif3320 3292 //Multiple view rndc reload 3321 3293 //Do we need to reload all views, when we might have only modified the internal view for example? … … 3692 3664 3693 3665 3694 #ifdef EXPERIMENTAL3695 3666 unsigned uNamedCheckConf(char *cNameServer) 3696 3667 { … … 3723 3694 3724 3695 }//unsigned uNamedCheckConf(void) 3725 #endif 3696 3726 3697 3727 3698 unsigned uGetOrganization(char *cLabel)
