Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70440 - net-dialup/ppp's ip-up/ip-down don't handle empty parameters correctly
Summary: net-dialup/ppp's ip-up/ip-down don't handle empty parameters correctly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-08 02:44 UTC by Mathias Kegelmann
Modified: 2004-11-09 09:52 UTC (History)
1 user (show)

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 Mathias Kegelmann 2004-11-08 02:44:27 UTC
The scipts /etc/ppp/ip-up and /etc/ppp/ip-down of the net-dialup/ppp-2.4.2-r7 package don't handle empty parameters correctly when calling /etc/ppp/ip-up.local and /etc/ppp/ip-down, respectively.  Since the variables $1, $2, ... are not quoted, empty parameters are "lost" and the .local scripts cannot rely on the contents of the arguments.  

This is easily fixed by changing the last line in ip-up to

[ -f /etc/ppp/ip-up.local ] && . /etc/ppp/ip-up.local "$1" "$2" "$3" "$4" "$5" "$6"

i.e. putting ".." around the arguments, and similarly for /ip-down.

Reproducible: Always
Steps to Reproduce:
1. emerge net-dialup/ppp-2.4.2-r7
2. inspect /etc/ppp/ip-up and /etc/ppp/ip-down
Actual Results:  
Whether you actually experience any problems or not depends on your ip-up.local
and ip-down.local scripts and the details of the ppp connection.  In my case, $2
(tty-device) is typically "" and hence the local and remote IP addresses end up
in the wrong argument.


This bug is similar to bug #23526 which concerned the same scripts but from
another package (isdn4k-utils).
Comment 1 Alin Năstac (RETIRED) gentoo-dev 2004-11-09 09:52:02 UTC
solved in -r8. thanks.