[Opendnssec-commits] [svn.opendnssec.org/svn/dnssec] r6196 - branches/OpenDNSSEC-1.3 branches/OpenDNSSEC-1.3/enforcer/common trunk/OpenDNSSEC trunk/OpenDNSSEC/enforcer/common

jerry at opendnssec.org jerry at opendnssec.org
Fri Mar 2 11:35:19 CET 2012


Author: jerry
Date: 2012-03-02 11:35:18 +0100 (Fri, 02 Mar 2012)
New Revision: 6196

Modified:
   branches/OpenDNSSEC-1.3/NEWS
   branches/OpenDNSSEC-1.3/enforcer/common/daemon_util.c
   trunk/OpenDNSSEC/NEWS
   trunk/OpenDNSSEC/enforcer/common/daemon_util.c
Log:
OPENDNSSEC-225: Fix problem with pid found when not existing.

Modified: branches/OpenDNSSEC-1.3/NEWS
===================================================================
--- branches/OpenDNSSEC-1.3/NEWS	2012-03-01 08:34:55 UTC (rev 6195)
+++ branches/OpenDNSSEC-1.3/NEWS	2012-03-02 10:35:18 UTC (rev 6196)
@@ -17,6 +17,7 @@
   if you are affected by the bug. You first need to go unsigned, then do the
   upgrade, and finally sign your zone again. SoftHSM and other HSM:s will not
   produce data with leading zeroes and the bug will thus not affect you.
+* OPEDNSSEC-225: Fix problem with pid found when not existing.
 
 
 OpenDNSSEC 1.3.6 - 2012-02-17

Modified: branches/OpenDNSSEC-1.3/enforcer/common/daemon_util.c
===================================================================
--- branches/OpenDNSSEC-1.3/enforcer/common/daemon_util.c	2012-03-01 08:34:55 UTC (rev 6195)
+++ branches/OpenDNSSEC-1.3/enforcer/common/daemon_util.c	2012-03-02 10:35:18 UTC (rev 6196)
@@ -384,14 +384,15 @@
             return -1;
         }
     }
+	else {
+		if (S_ISREG(stat_ret.st_mode)) {
+			/* The file exists already */
+			log_msg(config, LOG_ERR, "pidfile %s already exists. If no ods-enforcerd process is running, a previous instance didn't shutdown cleanly, please remove this file and try again.",
+						config->pidfile);
+			exit(1);
+		}
+	}
 
-    if (S_ISREG(stat_ret.st_mode)) {
-        /* The file exists already */
-		log_msg(config, LOG_ERR, "pidfile %s already exists. If no ods-enforcerd process is running, a previous instance didn't shutdown cleanly, please remove this file and try again.",
-                    config->pidfile);
-		exit(1);
-    } 
-
 	/* All good, carry on */
     snprintf(pidbuf, sizeof(pidbuf), "%lu\n", (unsigned long) config->pid);
 

Modified: trunk/OpenDNSSEC/NEWS
===================================================================
--- trunk/OpenDNSSEC/NEWS	2012-03-01 08:34:55 UTC (rev 6195)
+++ trunk/OpenDNSSEC/NEWS	2012-03-02 10:35:18 UTC (rev 6196)
@@ -43,6 +43,7 @@
 * ods-ksmutil: "update kasp" now reflects changes in policy descriptions.
 * ods-ksmutil: Policy descriptions now have special characters quoted.
 * ods-ksmutil: Fix typo in policy export with NSEC3.
+* OPEDNSSEC-225: Fix problem with pid found when not existing.
 
 
 OpenDNSSEC 1.3.6 - 2012-02-17

Modified: trunk/OpenDNSSEC/enforcer/common/daemon_util.c
===================================================================
--- trunk/OpenDNSSEC/enforcer/common/daemon_util.c	2012-03-01 08:34:55 UTC (rev 6195)
+++ trunk/OpenDNSSEC/enforcer/common/daemon_util.c	2012-03-02 10:35:18 UTC (rev 6196)
@@ -383,15 +383,16 @@
 					config->pidfile, strerror(errno));                                      
 			return -1;                                                                      
 		}                                                                                   
-	}                                                                                       
+	}
+	else {
+		if (S_ISREG(stat_ret.st_mode)) {
+			/* The file exists already */
+			log_msg(config, LOG_ERR, "pidfile %s already exists. If no ods-enforcerd process is running, a previous instance didn't shutdown cleanly, please remove this file and try again.",
+					config->pidfile);
+			exit(1);
+		}
+	}
 
-	if (S_ISREG(stat_ret.st_mode)) {                                                        
-		/* The file exists already */                                                       
-		log_msg(config, LOG_ERR, "pidfile %s already exists. If no ods-enforcerd process is running, a previous instance didn't shutdown cleanly, please remove this file and try again.",                                                                                     
-				config->pidfile);                                                       
-		exit(1);                                                                     
-	}                                                                                       
-
 	/* All good, carry on */
     snprintf(pidbuf, sizeof(pidbuf), "%lu\n", (unsigned long) config->pid);
 




More information about the Opendnssec-commits mailing list