Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23526 - isdn4k-utils' /etc/ppp/ip-up doesn't handle empty parameters correctly
Summary: isdn4k-utils' /etc/ppp/ip-up doesn't handle empty parameters correctly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal
Assignee: Heinrich Wendel (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-26 06:06 UTC by Raimund Specht
Modified: 2003-10-30 08:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raimund Specht 2003-06-26 06:06:33 UTC
isdn4k-utils' script /etc/ppp/ip-up calls /etc/ppp/ip-up.<interface> and appends
the parameters it was called with (interface name, speed, ip addresses etc.).
It does this by doing:
[ -s $0.$1 ] && . $0.$1 $*

But this should be:
[ -s $0.$1 ] && . $0.$1 "$@"

The first version does not pass empty parameters to the called scripts correctly
(because of the $*, man bash). As a result, these scripts can get confused as
the position of the parameters changes. E.g., the local IP address is no longer
in $4 but in $3 if one of the previous parameters was empty. Those empty
parameters sometimes occur when using other PPP daemons (like pppd for
modem/DSL) together with ipppd.

The second example solves this problem by enclosing every parameter in quotes
and therefore preserving empty parameters.

Reproducible: Always
Steps to Reproduce:
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2003-10-30 08:27:07 UTC
thx, fixed :D