Bug 8077
Summary: | wvdial incorrectly builds pppd'd argv | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Christian Hechelmann <drdisk> |
Component: | wvdial | Assignee: | Nalin Dahyabhai <nalin> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2000-01-18 15:36:34 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Christian Hechelmann
1999-12-31 00:53:05 UTC
Since createattachment.cgi always fails with "no file provided or file emtpy" here we go: --- wvdial-1.40/wvdial/wvdialer.cc.braindamage Fri Dec 31 00:36:37 1999 +++ wvdial-1.40/wvdial/wvdialer.cc Fri Dec 31 00:51:53 1999 @@ -595,6 +595,7 @@ /************************/ { WvString addr_colon( "%s:", options.force_addr ); + int i; char const *argv[] = { options.where_pppd, @@ -605,12 +606,28 @@ "-detach", "user", options.login, options.force_addr[0] ? (const char *)addr_colon : "noipdefault", - remote_name ? "remotename" : NULL, - remote_name ? remote_name : NULL, - options.new_pppd ? "call" : NULL, - options.new_pppd ? "wvdial" : NULL, + NULL, + NULL, + NULL, + NULL, NULL }; + + /* XXX FIXME: This is a gross hack but works */ + /* The older method did _not_ work since exec*() argv */ + /* parsing stops on the first NULL, so pppd never gets */ + /* "call wvdial" as arguemnts when no remote_name is */ + /* provided. Someone speaking C++ should have a look at this */ + i = 8; + if(remote_name) { + argv[i++] = "remotename"; + argv[i++] = remote_name; + } + + if(options.new_pppd) { + argv[i++] = "call"; + argv[i++] = "wvdial"; + } if( !chat_mode && (access( options.where_pppd, X_OK ) != 0) ) { err( "Unable to run %s.\n", options.where_pppd ); This should be fixed in wvdial-1.41-1, which is now in Raw Hide. |