[mythtv-users] Elevating privileges for network handling (was: Re: new YouTube plugin for MythTV)
pharon at gmail.com
Tue Nov 13 17:56:28 UTC 2007
I am involved obviously, but only for packaging, uploading and other
The announcement came a little earlier than should have been I guess. I
think some of the programmers involved in the project will be following
So to modify resolv.conf what do you do ? Also the system calls you
mention will not survive a reboot right? So you need a way to set the
stuff in a persistent manner.
Thanks for your time.
> Ah, that is interesting. I am not sure if you are involved with that
> project or not, but here is some info you can use or pass on. I am
> sending it here on the myth list just in case someone here may find this
> useful also.
> In that case you need CAP_NET_ADMIN. You can change ip address with
> ioctl SIOCSIFADDR, netmask with SIOCSIFNETMASK. There are others for
> setting other settings. Not sure if there is one for DNS servers
> though. In the one project where I change DNS servers I cheat and
> modify the resolv.conf file directly.
> For gateway and routing stuff you may need to mess with netlink. I
> haven't delved very far into this though. Here is how you open a socket
> to the netlink layer: fd = socket(AF_NETLINK, SOCK_DGRAM,
> NETLINK_ROUTE). Then you need to do your netlink requests (man
> netlink). You should be able to find more detailed info on all the
> above on google.
More information about the mythtv-users