help-cfengine
[Top][All Lists]
Advanced

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

Re: netconfig not working


From: Adrian Phillips
Subject: Re: netconfig not working
Date: 21 Feb 2002 09:49:05 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

>>>>> "Alain" == Alain van Hoof <alain@dragon.xs4all.nl> 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

-- 
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]



reply via email to

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