bug-cfengine
[Top][All Lists]
Advanced

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

Re: Cfengine 2.1.10 shellcommands umask=0 complain about error when umas


From: Mark . Burgess
Subject: Re: Cfengine 2.1.10 shellcommands umask=0 complain about error when umaskis set to 0.
Date: Tue, 24 Aug 2004 08:44:09 +0200 (MEST)

Thanks

On 20 Aug, François LANGE. wrote:
> 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.
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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