[plug] getting DHCP results into system environment
Anthony J. Breeds-Taurima
tony at cantech.net.au
Mon Jul 29 16:49:49 WST 2002
On Mon, 29 Jul 2002, Craig Ringer wrote:
> I was wondering if anybody here has worked much with kernel-level
> autoconfiguration of network interfaces. I have everything working
> happily, but there doesn't seem to be a way to access the extra info in
> the DHCP reply from user-space. Ideally I'd like to be able to find
> things like the xdm server set in the dhcp reply as DHCP_XDM_SERVER in
> the environment.
>
> Using pump or dhcpcd doesn't seem to be the way to go, as I need env
> variables exported across the entire system. I'm trying to be able to do
> things like start X automatically on boot with "X -query
> $DHCP_XDM_SERVER" - that sort of thing.
>
> Ideas, anybody?
Unfortunatly the inKernel DHCP is very basic, What you want can't be done
without hacking the kernel.
Making the information available in the env of all processes would be somewhat
tricky. You could however have the DHCP server serv via tftp a file
which is automagically grabed early in the boot cycle. Then any procceess
can source the file to put the data in their own env.
nasty but it will work.
> There are possibly security ramifications to doing this, of course. With
> thin clients I have two choices, both somewhat nasty: use dhcp to set
> the configuration or do it in the nfs-mounted root dir. Both can be
> spoofed using a second DHCP server, so there isn't much to be done about
> it. In the end it does little harm though - the clients won't boot right
> , but no data will be compromised so I'm not too worried. I can just
> hunt down the guy with the laptop and have him executed...
Yours Tony
Jan 22-25 2003 Linux.Conf.AU http://linux.conf.au/
The Australian Linux Technical Conference!
More information about the plug
mailing list