public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* master - cman: exit if configuration check fails.
@ 2008-08-01 10:56 Christine Caulfield
  0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2008-08-01 10:56 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=eabafb0bb7676fbe9275afaf1c66db1ca65411e0
Commit:        eabafb0bb7676fbe9275afaf1c66db1ca65411e0
Parent:        e5885fd588a0608ddf00ad03ee3289a1b0c9f656
Author:        Christine Caulfield <ccaulfie@redhat.com>
AuthorDate:    Fri Aug 1 11:13:03 2008 +0100
Committer:     Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Fri Aug 1 11:13:03 2008 +0100

cman: exit if configuration check fails.

The error return from read_cman_config wasn't being
checked, so configuration errors could cause
segfaults later on in startup.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
 cman/daemon/ais.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/cman/daemon/ais.c b/cman/daemon/ais.c
index d38b1eb..c73e507 100644
--- a/cman/daemon/ais.c
+++ b/cman/daemon/ais.c
@@ -167,7 +167,10 @@ static int cman_exec_init_fn(struct objdb_iface_ver0 *objdb)
 	P_DAEMON(CMAN_NAME " starting");
 
 	/* Open local sockets and initialise I/O queues */
-	read_cman_config(objdb, &config_version);
+	if (read_cman_config(objdb, &config_version)) {
+		/* An error message will have been written to cman_pipe */
+		exit(9);
+	}
 	cman_init();
 
 	/* Let cman_tool know we are running and our PID */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-08-01 10:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-01 10:56 master - cman: exit if configuration check fails Christine Caulfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).