public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* Cluster Project branch, master, updated. cluster-2.99.00-24-gd502ffd
@ 2008-05-07  9:21 fabbione
  0 siblings, 0 replies; only message in thread
From: fabbione @ 2008-05-07  9:21 UTC (permalink / raw)
  To: cluster-cvs, cluster-devel

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=d502ffd9b0b02bdc8140973d757eb55bd5d8f7c5

The branch, master has been updated
       via  d502ffd9b0b02bdc8140973d757eb55bd5d8f7c5 (commit)
      from  db35b82b2d5dd4091f9c368d8f7d8b36ad965f78 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d502ffd9b0b02bdc8140973d757eb55bd5d8f7c5
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
Date:   Wed May 7 11:20:57 2008 +0200

    [MISC] Fix even more build errors with Fedora default build options
    
    ... and more to come
    
    Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>

-----------------------------------------------------------------------

Summary of changes:
 dlm/libdlm/libdlm.c               |    6 +++++-
 fence/agents/rackswitch/do_rack.c |   20 ++++++++++++++++----
 fence/fenced/main.c               |    5 ++++-
 fence/libfence/agent.c            |    9 ++++++---
 4 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/dlm/libdlm/libdlm.c b/dlm/libdlm/libdlm.c
index a23eddc..375cd51 100644
--- a/dlm/libdlm/libdlm.c
+++ b/dlm/libdlm/libdlm.c
@@ -370,6 +370,7 @@ static int create_control_device(void)
     int saved_errno = 0;
     mode_t oldmode;
     int done = 0;
+    int rv;
 
     /* Make sure the parent directory exists */
     oldmode = umask(0);
@@ -386,7 +387,10 @@ static int create_control_device(void)
 
     while (!feof(pmisc))
     {
-	fscanf(pmisc, "%d %s\n", &minor, name);
+	
+	rv = fscanf(pmisc, "%d %s\n", &minor, name);
+	if ((rv == EOF) || (rv != 2))
+		break;
 	if (strcmp(name, DLM_CONTROL_DEV) == 0)
 	{
 	    status = mknod(DLM_CTL_DEVICE_NAME, S_IFCHR | 0600, makedev(MISC_MAJOR, minor));
diff --git a/fence/agents/rackswitch/do_rack.c b/fence/agents/rackswitch/do_rack.c
index f7e0349..7c7362f 100644
--- a/fence/agents/rackswitch/do_rack.c
+++ b/fence/agents/rackswitch/do_rack.c
@@ -452,7 +452,10 @@ int main(int argc, char **argv)
   }
   writebuf[sizeof(char)+(strlen(username))+1+(strlen(password))+1] ='\n';
      
-  write(sock,writebuf,sizeof(char)+strlen(username)+strlen(password)+2);
+  if(write(sock,writebuf,sizeof(char)+strlen(username)+strlen(password)+2) < 0) {
+    fprintf(stderr,"failed to write to socket\n");
+    exit(DID_FAILURE);
+  }
    
   /********************************************
    ***
@@ -478,7 +481,10 @@ int main(int argc, char **argv)
  
  writebuf[0] = configuration_request;
  writebuf[1] = config_general;
- write(sock,writebuf,2*(sizeof(char)));
+ if(write(sock,writebuf,2*(sizeof(char))) < 0) {
+   fprintf(stderr,"failed to write to socket\n");
+   exit(DID_FAILURE);
+ }
 
  /********************************************
    ***
@@ -630,7 +636,10 @@ int main(int argc, char **argv)
  writebuf[(pnumb*5)+3] = (char)(pnumb);
  writebuf[(pnumb*5)+4] = action_offon;
 
- write(sock,writebuf,(pnumb*5)+5);
+ if(write(sock,writebuf,(pnumb*5)+5) < 0) {
+   fprintf(stderr,"failed to write to socket\n");
+   exit(DID_FAILURE);
+ }
  if(verbose_flag){
    printf("%s: sending action frame to switch:\n",name);
    for(i=0;i<(pnumb*5)+5;i++) 
@@ -647,7 +656,10 @@ int main(int argc, char **argv)
  writebuf[0] = configuration_request;
  writebuf[1] = boardnum;
  
- write(sock,writebuf,2*(sizeof(char)));
+ if(write(sock,writebuf,2*(sizeof(char))) < 0) {
+   fprintf(stderr,"failed to write to socket\n");
+   exit(DID_FAILURE);
+ }
  if(verbose_flag){
    printf("%s: sending Request Configuration Frame from switch:\n",name);
    printf("0x%.2x 0x%.2x\n",writebuf[0],writebuf[1]);
diff --git a/fence/fenced/main.c b/fence/fenced/main.c
index a94bb85..2201bcc 100644
--- a/fence/fenced/main.c
+++ b/fence/fenced/main.c
@@ -872,7 +872,10 @@ int main(int argc, char **argv)
 			perror("main: cannot fork");
 			exit(EXIT_FAILURE);
 		}
-		chdir("/");
+		if(chdir("/") < 0) {
+			perror("main: unable to chdir");
+			exit(EXIT_FAILURE);
+		}
 		umask(0);
 		openlog("fenced", LOG_PID, LOG_DAEMON);
 	}
diff --git a/fence/libfence/agent.c b/fence/libfence/agent.c
index de8ce11..cc1508a 100644
--- a/fence/libfence/agent.c
+++ b/fence/libfence/agent.c
@@ -99,11 +99,14 @@ static int run_agent(char *agent, char *args)
 		/* child */
 
 		close(1);
-		dup(cw_fd);
+		if (dup(cw_fd) < 0)
+			goto fail;
 		close(2);
-		dup(cw_fd);
+		if (dup(cw_fd) < 0)
+			goto fail;
 		close(0);
-		dup(cr_fd);
+		if (dup(cr_fd) < 0)
+			goto fail;
 		/* keep cw_fd open so parent can report all errors. */
 		close(pr_fd);
 		close(cr_fd);


hooks/post-receive
--
Cluster Project


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

only message in thread, other threads:[~2008-05-07  9:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-07  9:21 Cluster Project branch, master, updated. cluster-2.99.00-24-gd502ffd fabbione

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).