Package: vpnc
Version: 0.5.1r254-1
Severity: normal
Tags: patch

pcf2vpnc generates one space too many on the Domain line. This makes the
authentication fail.
Indeed vpnc is strict on spaces in its file format: "Note that all
strings start exactly one space after the keyword string" (README.gz file).

For instance the following pcf file 
---------------------------
[main]
Host=1.2.3.4
AuthType=1
GroupName=VPN
GroupPwd=
Username=john
UserPassword=
enc_UserPassword=
NTDomain=MyDomain
DHGroup=2
---------------------------

produces the following Domain line :
"Domain  MyDomain"

Here is a patch that fixes the problem (and may require rewriting by a
perl expert) :

---------------------------
--- /usr/share/vpnc/pcf2vpnc    2007-10-18 10:50:26.000000000 +0200
+++ pcf2vpnc    2007-12-16 16:33:51.000000000 +0100
@@ -80,9 +80,15 @@
 sub writeVPNC($) {
     my ($config) = @_;
     my $text = "## generated by pcf2vpnc\n";
+    my $itemname;
     foreach my $section (keys %$config) {
        foreach my $item (keys %{ $config->{$section} }) {
-           $text .= "$section $item ".$config->{$section}{$item}."\n";
+           if (! $item eq "") {
+               $itemname = " $item";
+           } else {
+               $itemname = "";
+           }
+           $text .= "$section$itemname ".$config->{$section}{$item}."\n";
        }
     }
     unless (defined $config->{Xauth}) {
-----------------------------

Regards,


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'oldstable'), (500, 'testing'), (500, 
'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-686 (SMP w/1 CPU core)
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) (ignored: 
LC_ALL set to [EMAIL PROTECTED])
Shell: /bin/sh linked to /bin/bash

Versions of packages vpnc depends on:
ii  libc6                         2.7-4      GNU C Library: Shared libraries
ii  libgcrypt11                   1.2.4-2    LGPL Crypto library - runtime libr

Versions of packages vpnc recommends:
ii  iproute                       20070313-1 Professional tools to control the 
ii  resolvconf                    1.37       nameserver information handler

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to