diff src/sm-archive.cpp @ 2:32b57406b656

initial version
author carl
date Fri, 10 Mar 2006 10:47:12 -0800
parents 616666e2f34c
children 01268466f0dc
line wrap: on
line diff
--- a/src/sm-archive.cpp	Fri Mar 10 10:35:25 2006 -0800
+++ b/src/sm-archive.cpp	Fri Mar 10 10:47:12 2006 -0800
@@ -55,7 +55,7 @@
 
 #include "includes.h"
 
-static char* dnsbl_version="$Id$";
+static char* smarchive_version="$Id$";
 
 
 extern "C" {
@@ -123,7 +123,7 @@
 	if (use_syslog) {
 		pthread_mutex_lock(&syslog_mutex);
 			if (!syslog_opened) {
-				openlog("dnsbl", LOG_PID, LOG_MAIL);
+				openlog("sm-archive", LOG_PID, LOG_MAIL);
 				syslog_opened = true;
 			}
 			syslog(LOG_NOTICE, "%s", text);
@@ -254,7 +254,7 @@
 		snprintf(buf, sizeof(buf), "loading configuration generation %d", newc->generation);
 		my_syslog(buf);
 	}
-	if (load_conf(*newc, "dnsbl.conf")) {
+	if (load_conf(*newc, "sm-archive.conf")) {
 		newc->load_time = time(NULL);
 		return newc;
 	}
@@ -298,7 +298,7 @@
 			else {
 				// failed to load new config
 				my_syslog("failed to load new configuration");
-				system("echo 'failed to load new dnsbl configuration from /etc/dnsbl' | mail -s 'error in /etc/dnsbl configuration' root");
+				system("echo 'failed to load new sm-archive configuration from /etc/sm-archive' | mail -s 'error in /etc/sm-archive configuration' root");
 				// update the load time on the current config to prevent complaining every 3 minutes
 				dc.load_time = time(NULL);
 			}
@@ -448,7 +448,7 @@
 	}
 
 	// write the pid
-	const char *pidpath = "/var/run/dnsbl.pid";
+	const char *pidpath = "/var/run/sm-archive.pid";
 	unlink(pidpath);
 	FILE *f = fopen(pidpath, "w");
 	if (f) {
@@ -476,10 +476,10 @@
 	struct passwd *pw = getpwnam("sm-archive");
 	if (pw) {
 		if (setgid(pw->pw_gid) == -1) {
-			my_syslog("failed to switch to group dnsbl");
+			my_syslog("failed to switch to group sm-archive");
 		}
 		if (setuid(pw->pw_uid) == -1) {
-			my_syslog("failed to switch to user dnsbl");
+			my_syslog("failed to switch to user sm-archive");
 		}
 	}