help-cfengine
[Top][All Lists]
Advanced

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

Re: Permission to reconfigure netmask denied


From: Alan Sparks
Subject: Re: Permission to reconfigure netmask denied
Date: Tue, 12 Dec 2000 15:08:52 -0700

I think I have the solution, albeit not well tested yet.  The code
around line 267 of ifconf.c needs a bit of enhancement for Solaris.

  memset(&IFR, 0, sizeof(IFR));
  strncpy(IFR.ifr_name,vifdev,sizeof(IFR.ifr_name));
  netmask.sin_addr.s_addr = inet_network(vnetmask);
  netmask.sin_family = AF_INET;
  IFR.ifr_addr = *((struct sockaddr *) &netmask);  

The important part is the AF_INET line.  A small test case extracted
from the relevent code failed with the same "bad address" error, until
this was included.  Then the netmask ioctl call succeeded just fine.

-Alan


Mark.Burgess@iu.hio.no wrote:
> 
> On 12 Dec, Alan Sparks wrote:
> > A cfengine (1.6.0a3) running on a Solaris 2.7 machine... I have a line
> > in the configuration like:
> >
> > interfaces:
> >         "hme0"  netmask=255.255.255.0 broadcast=ones
> >
> > The cfengine run yields the following result:
> >
> > Found netmask: 255.255.255.192
> > cfengine:email21: The netmask is incorrectly configured, resetting...
> > Found broadcast address: 208.169.17.191
> > cfengine:email21: Broadcast address was 208.169.17.191 (should be
> > bit-type one) Resetting interface...
> > cfengine:email21: Permission to reconfigure netmask denied.
> > cfengine:email21: ioctl: Bad address
> > Trying to set broad to 208.169.17.255 = 208.169.17.255
> > cfengine:email21: Permission to reconfigure broadcast denied.
> > cfengine:email21: ioctl: Bad address
> >
> > Is there a problem with cfengine?  Why can't it reset the netmask?  It's
> > running as root.
> >
> > Thanks in advance.
> > -Alan
> >
> 
> For some undiscernable reason, this stopped working as of solaris
> 2.6, and on a coujple of other platforms too. I do not yet know how to
> diagnose or fix this, so please ignore this for now and work around....
> 
> M
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Work: +47 22453272            Email:  Mark.Burgess@iu.hio.no
> Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine

-- 
Alan Sparks, Sr. UNIX Administrator     asparks@quris.com
Quris, Inc.                             (720) 836-2058



reply via email to

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