Geoffrey Lee wrote:
> On Sun, Aug 26, 2001 at 10:25:48AM +0400, Borsenkow Andrej wrote:
>
>>It is even no more ridiculous. The problem exists since 7.2 at least and
>>was reported in Bugzilla and in cooker and nobody ever seems to care.
>>
>>-andrej
>>
>
>
> Do you have a suggested fix?
>
>
Here is a trivial one-liner patch that enables CHAP. It turned out, we
just need to list it in choices - everyhing else is already there :-) It
is against drakxtools-1.1.7-9mdk
Unfortunately, draknet does not allow me to configure pulse/tone dialing
(tone is hardcode) that makes it pretty useless for me (and for almost
evrybody in Russia for that matter). So the attached patch hopefully
helps others but does not help me much :( Also I modified modem only - I
guess, ISDN and other cases may need modification as well. I do not have
them and cannot test them.
-andrej
--- usr/lib/libDrakX/any.pm.no-chap Fri Aug 24 04:34:03 2001
+++ usr/lib/libDrakX/any.pm Sun Aug 26 14:26:39 2001
@@ -405,7 +405,7 @@
my %toreplace;
$toreplace{$_} = $modem->{$_} foreach qw(connection phone login passwd auth
domain dns1 dns2);
- $toreplace{kpppauth} = ${{ 'Script-based' => 0, 'PAP' => 1, 'Terminal-based' =>
2, }}{$modem->{auth}};
+ $toreplace{kpppauth} = ${{ 'Script-based' => 0, 'PAP' => 1, 'Terminal-based' =>
+2, 'CHAP' => 3 }}{$modem->{auth}};
$toreplace{phone} =~ s/\D//g;
$toreplace{dnsserver} = join ',', map { $modem->{$_} } "dns1", "dns2";
$toreplace{dnsserver} .= $toreplace{dnsserver} && ',';
@@ -416,7 +416,7 @@
$toreplace{connection} ||= 'DialupConnection';
$toreplace{domain} ||= 'localdomain';
$toreplace{intf} ||= 'ppp0';
- $toreplace{papname} = $modem->{auth} eq 'PAP' && $toreplace{login};
+ $toreplace{papname} = ( $modem->{auth} eq 'PAP' or $modem->{auth} eq 'CHAP' ) &&
+$toreplace{login};
#- build ifcfg-ppp0.
my $ifcfg = "$prefix/etc/sysconfig/network-scripts/ifcfg-ppp0";
@@ -489,7 +489,7 @@
close CHAT;
chmod 0600, $chat;
- if ($modem->{auth} eq 'PAP') {
+ if ($modem->{auth} eq 'PAP' or $modem->{auth} eq 'CHAP') {
#- need to create a secrets file for the connection.
my $secrets = "$prefix/etc/ppp/" . lc($modem->{auth}) . "-secrets";
my @l = cat_($secrets);
--- usr/lib/libDrakX/network/modem.pm.no-chap Fri Aug 24 04:34:03 2001
+++ usr/lib/libDrakX/network/modem.pm Sun Aug 26 14:27:19 2001
@@ -44,7 +44,7 @@
{ label => _("Phone number"), val => \$modem->{phone} },
{ label => _("Login ID"), val => \$modem->{login} },
{ label => _("Password"), val => \$modem->{passwd}, hidden => 1 },
-{ label => _("Authentication"), val => \$modem->{auth}, list => [ __("PAP"),
__("Terminal-based"), __("Script-based") ] },
+{ label => _("Authentication"), val => \$modem->{auth}, list => [ __("PAP"),
+__("Terminal-based"), __("Script-based"), __("CHAP") ] },
{ label => _("Domain name"), val => \$modem->{domain} },
{ label => _("First DNS Server (optional)"), val => \$modem->{dns1} },
{ label => _("Second DNS Server (optional)"), val => \$modem->{dns2} },
--- usr/sbin/draknet.no-chap Fri Aug 24 04:34:03 2001
+++ usr/sbin/draknet Sun Aug 26 18:15:05 2001
@@ -590,7 +590,7 @@
[_("Phone number"), \$cnx->{phone} ],
[_("Login ID"), \$cnx->{login} ],
[_("Password"), \$cnx->{passwd} ],
- [_("Authentication"), \$cnx->{auth}, [ _("PAP"),
_("Terminal-based"), _("Script-based") ] ],
+ [_("Authentication"), \$cnx->{auth}, [ _("PAP"),
+_("Terminal-based"), _("Script-based"), _("CHAP") ] ],
[_("Domain name"), \$cnx->{domain} ],
[_("First DNS Server (optional)"), \$cnx->{dns1} ],
[_("Second DNS Server (optional)"), \$cnx->{dns2} ],