bug-cfengine
[Top][All Lists]
Advanced

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

Cfengine 2.1.10 shellcommands umask=0 complain about error when umaskis


From: François LANGE.
Subject: Cfengine 2.1.10 shellcommands umask=0 complain about error when umaskis set to 0.
Date: Fri, 20 Aug 2004 15:46:03 +0200
User-agent: Internet Messaging Program (IMP) 3.2.1

Hi,

In the shellcommands section when the umask is set to 0, the program complain 
about the fact that the value is less than 0.

Could you change the following lines of code.

if (num<0) -- insteda of if (num <= 0)

src/install.c

/*
Close to the line Ligne 4044
*/

void HandleUmask(char *value)
{ int num = -1;
Debug("HandleUmask(%s)",value);
sscanf(value,"%o",&num);
if (num<=0)
{
yyerror("umask value must be an octal number >= zero");
}
UMASK = (mode_t) num;
}



void HandleUmask(char *value)
{ int num = -1;
Debug("HandleUmask(%s)",value);
if((sscanf(value,"%o",&num)==1)
{
yyerror("umask value must be an octal number >= zero");
}
UMASK = (mode_t) num;
}


Best regards François.

-- 
François LANGE.









reply via email to

[Prev in Thread] Current Thread [Next in Thread]