[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exit status of 0 from cfkey despite failure
From: |
Mark Burgess |
Subject: |
Re: Exit status of 0 from cfkey despite failure |
Date: |
Thu, 07 Apr 2005 21:26:56 +0200 |
Good idea
On Thu, 2005-04-07 at 12:51 -0400, Christian Pearce wrote:
> address@hidden sysnav]$ /opt/csw/sbin/cfkey
> Making a key pair for cfengine, please wait, this could take a minute...
> Ppen /var/sysnav/.cfagent/ppkeys/localhost.priv failed: Permission
> address@hidden sysnav]$ echo $?
> 0
>
> Perhaps these lines should be return 1;
>
> from cfkey.c:
>
> if (fd < 0)
> {
> printf("Ppen %s failed: %s.",CFPRIVKEYFILE,strerror(errno));
> return 0;
> }
>
> if ((fp = fdopen(fd, "w")) == NULL )
> {
> printf("fdopen %s failed: %s.",CFPRIVKEYFILE, strerror(errno));
> close(fd);
> return 0;
> }
>
> if (fd < 0)
> {
> printf("open %s failed: %s.",CFPUBKEYFILE,strerror(errno));
> return 0;
> }
>
> if ((fp = fdopen(fd, "w")) == NULL )
> {
> printf("fdopen %s failed: %s.",CFPUBKEYFILE, strerror(errno));
> close(fd);
> return 0;
> }
>
>
>
> _______________________________________________
> Bug-cfengine mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-cfengine