help-cfengine
[Top][All Lists]
Advanced

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

Re: netconfig not working


From: Mark . Burgess
Subject: Re: netconfig not working
Date: Thu, 21 Feb 2002 10:02:00 +0100 (MET)

The error code is handled by CfLog()


On 21 Feb, Adrian Phillips wrote:
>>>>>> "Alain" == Alain van Hoof <address@hidden> writes:
> 
>     Alain> Hoi, It looks like cfagent can't change the network
>     Alain> settings using netconfig in the action sequence on my Linux
>     Alain> 2.4.17 system. I get:
> 
>     Alain> permission to reconfigure netmask/broadcast denied (Yes,
>     Alain> i'm running it as root)
> 
>     Alain> this is my cfagent.conf:
> 
>     Alain> control: hostname = ( flat ) domain = ( dragon.xs4all.nl )
>     Alain> netmask = ( 255.255.254.0 ) actionsequence = ( netconfig )
>     Alain> broadcast: ones
> 
> In ifconf.c :-
> 
> if (ioctl(sk,SIOCSIFNETMASK, (caddr_t) &IFR) < 0) 
> 
> this is failing but no error code is written out unfortunately,
> 
> Try recompiling with the logging changed (untested) :-
> 
> if (ioctl(sk,SIOCSIFNETMASK, (caddr_t) &IFR) < 0) 
>    {
>    snprintf(OUTPUT,bufsize*2,"Permission to reconfigure netmask 
> denied,%s\n",strerror(error));
>    CfLog(cferror,OUTPUT,"ioctl");
>    }
> 
> and see what error is reported (or run under gdb if that is easier),
> 
> Sincerely,
> 
> Adrian Phillips
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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]