[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/rgmanager/src/clulib clulog.c msg_socket.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	rmccabe sourceware org	2007-10-29 17:52:53

Modified files:
	rgmanager/src/clulib: clulog.c msg_socket.c 

Log message:
	Fix format string bugs

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/clulog.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.5.2.1&r2=1.5.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/msg_socket.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1&r2=1.1.2.1

--- cluster/rgmanager/src/clulib/clulog.c	2007/05/10 16:23:43	1.5.2.1
+++ cluster/rgmanager/src/clulib/clulog.c	2007/10/29 17:52:52	1.5.2.2
@@ -20,7 +20,7 @@
 /** @file
  * Library routines for communicating with the logging daemon.
  *
- *  $Id: clulog.c,v 1.5.2.1 2007/05/10 16:23:43 lhh Exp $
+ *  $Id: clulog.c,v 1.5.2.2 2007/10/29 17:52:52 rmccabe Exp $
  *
  *  Author: Jeff Moyer <moyer missioncriticallinux com>
  */
@@ -50,7 +50,7 @@
 #include <string.h>
 
 
-static const char *version __attribute__ ((unused)) = "$Revision: 1.5.2.1 $";
+static const char *version __attribute__ ((unused)) = "$Revision: 1.5.2.2 $";
 
 #ifdef DEBUG
 #include <assert.h>
@@ -283,7 +283,7 @@
 		fprintf(stdout, "%s", printmsg);
 	}
 
-	syslog(severity, logmsg);
+	syslog(severity, "%s", logmsg);
 
 	pthread_mutex_unlock(&log_mutex);
 
--- cluster/rgmanager/src/clulib/msg_socket.c	2006/07/11 23:52:41	1.1
+++ cluster/rgmanager/src/clulib/msg_socket.c	2007/10/29 17:52:52	1.1.2.1
@@ -44,7 +44,7 @@
 
 	memset(&sun, 0, sizeof(sun));
 	sun.sun_family = PF_LOCAL;
-	snprintf(sun.sun_path, sizeof(sun.sun_path), RGMGR_SOCK);
+	snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", RGMGR_SOCK);
 
 	sock = socket(PF_LOCAL, SOCK_STREAM, 0);
 	if (sock < 0) {
@@ -362,7 +362,7 @@
 	unlink(RGMGR_SOCK);
 	om = umask(077);
 	su.sun_family = PF_LOCAL;
-	snprintf(su.sun_path, sizeof(su.sun_path), path);
+	snprintf(su.sun_path, sizeof(su.sun_path), "%s", path);
 
 	if (bind(sock, &su, sizeof(su)) < 0) {
 		umask(om);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]