On Sun, 23 Jul 2000 13:26:02 -0700,
  Nick Sayer <[EMAIL PROTECTED]> said:

Nick> Reversing that patch fixes it. Since the source for this is in contrib,
Nick> I presume we
Nick> need to send this back to ISC rather than patch it in our tree?

Nick> Tatsumi Hosokawa wrote:
>> -  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
>> -     [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
>> -    ifconfig $interface inet $new_ip_address $new_netmask_arg \
>> -                                       $new_broadcast_arg $medium
>> +  if [ "x$old_ip_address" = "x" ] || [ "x$old_ip_address" != "x$new_ip_address" ] 
>|| \
>> +     [ "x$reason" = "xBOUND" ] || [ "x$reason" = "xREBOOT" ]; then
>> +    ifconfig "$interface" inet "$new_ip_address" "$new_netmask_arg" \
>> +                                       "$new_broadcast_arg" "$medium"

Did you see this log?

On Thu, 20 Jul 2000 02:53:11 -0700 (PDT),
  "David E. O'Brien" <[EMAIL PROTECTED]> said:

David> obrien      2000/07/20 02:53:11 PDT

David>   Modified files:
David>     contrib/isc-dhcp/client/scripts freebsd 
David>   Log:
David>   safe shell quoting
David>   Obtained from: OpenBSD (rev 1.6)

And I have already suggested the following fix.

On Sun, 23 Jul 2000 18:53:55 +0900,
  Seigo Tanimura <[EMAIL PROTECTED]> said:

Seigo> 1.

Seigo> This breaks ifconfig(8) in dhclient-script(8) because our ifconfig(8)
Seigo> does not support both a parameter name and its argument to be in a
Seigo> single argument.

Seigo> What we need to do against dhclient-script(8) to prevent executing
Seigo> arbitrary commands include:

Seigo> - quoting the arguments from dhclient(8), and
Seigo> - intializing the internal variables.

Seigo> It should be a good idea to quote each argument from dhclient(8),
Seigo> followed by substituting the argument to an internal variable in a way
Seigo> like this:

Seigo> new_netmask_arg="netmask \"$new_subnet_mask\""

Seigo> Then we do not have to quote all of the variables in dhclient-script(8).

Seigo> 2.

Seigo> An argument of "" is passed to ifconfig(8) if the value of $medium is
Seigo> empty, making ifconfig(8) confused. This is because certain ethernet
Seigo> card drivers including ed(4) do not support configuring media
Seigo> types. Fortunately, the fix proposed in 1 allows us once again to
Seigo> remove quotations around the arguments of ifconfig(8).

I wonder if ifconfig(8) of OpenBSD supports providing both the name of
a parameter and its value in a single argument, and an ampty argument...
(eg ifconfig ed1 inet xxx.xxx.xxx.xxx "netmask yyy.yyy.yyy.yyy" "")


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to