After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590054 - [enh] import vpnc config files too
[enh] import vpnc config files too
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: VPN: vpnc
0.7.x
Other All
: Normal enhancement
: ---
Assigned To: Dan Williams
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-07-28 19:29 UTC by Eduard Sanchez Biete
Modified: 2013-08-12 16:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Eduard Sanchez Biete 2009-07-28 19:29:54 UTC
Please describe the problem:
Trying to import a valid conf file (running from command line with vpnc-connect cisco.conf, connects successfully with no error) popups an error saying:

The file 'E\Uffffffff could not be read or does not contain recognized VPN connection information

Error: does not look like a Cisco Compatible VPN (vpnc) VPN connection

On console you can see the following lines (I've masked the gateway):

** (nm-connection-editor:14019): WARNING **: Missing assignment in /etc/vpnc/cisco.conf:1: <IPSec gateway 62.xxx.xxx.28>

(nm-connection-editor:14019): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()

(nm-connection-editor:14019): Gdk-CRITICAL **: gdk_x11_xatom_to_atom_for_display: assertion `xatom != None' failed




Steps to reproduce:
1. Open nm-connection-editor
2. Select import
3. Choose the conf file


Actual results:
Popup with error message importing the file

Expected results:
Import the file successfully

Does this happen every time?
Yes

Other information:
Linux esbiete-desktop 2.6.31-4-generic #22-Ubuntu SMP Fri Jul 24 18:05:56 UTC 2009 x86_64 GNU/Linux

Architecture: amd64
Version: 0.7.1-0ubuntu2

conf file (masked):
IPSec gateway 62.xxx.xxx.28
IPSec ID XXXX
IPSec secret XXXXXXX
IKE Authmode psk
XAuth username XXXXXX

nm-system-settings.conf:
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false



NAT Traversal Mode cisco-udp
Comment 1 Erik Piehl Sylvén 2009-07-30 07:14:44 UTC
I also had a problem importing a .pcf file. In my case the problem went away when I opened the file and added a description. The lack of a string in the Description made the file fail on import. A reasonable solution to this would be to in case of missing description in the file default it to "default".
My file looks like this: 

[main]

Description=
Host=vpn.xxxxx.com

AuthType=1

GroupName=XXXXXXXXX
GroupPwd=

enc_GroupPwd=xxxxxxxxx

EnableISPConnect=0

ISPConnectType=0

ISPConnect=

ISPPhonebook=

ISPCommand=

Username=xxxxx\xxxxxx
SaveUserPassword=0

UserPassword=

enc_UserPassword=

NTDomain=

EnableBackup=0

BackupServer=

EnableMSLogon=1

MSLogonType=0

EnableNat=1

TunnelingMode=0

TcpTunnelingPort=10000

CertStore=0

CertName=

CertPath=

CertSubjectName=

CertSerialHash=00000000000000000000000000000000

SendCertChain=0

PeerTimeout=90

EnableLocalLAN=0
Comment 2 Dan Williams 2009-08-28 14:12:04 UTC
(In reply to comment #0)
> Please describe the problem:
> Trying to import a valid conf file (running from command line with vpnc-connect
> cisco.conf, connects successfully with no error) popups an error saying:
> 
> The file 'E\Uffffffff could not be read or does not contain recognized VPN
> connection information
> 
> Error: does not look like a Cisco Compatible VPN (vpnc) VPN connection
> 
> On console you can see the following lines (I've masked the gateway):
> 
> ** (nm-connection-editor:14019): WARNING **: Missing assignment in
> /etc/vpnc/cisco.conf:1: <IPSec gateway 62.xxx.xxx.28>
> 
> (nm-connection-editor:14019): Pango-WARNING **: Invalid UTF-8 string passed to
> pango_layout_set_text()
> 
> (nm-connection-editor:14019): Gdk-CRITICAL **:
> gdk_x11_xatom_to_atom_for_display: assertion `xatom != None' failed

So, the problem here is that you're not importing a Cisco .pcf file, you're trying to import a vpnc config file.  We should probably try to import that file format too just for kicks, but at the moment the import only handles .pcf files that contain configuration for Cisco's VPN client.
Comment 3 Dan Williams 2009-08-28 14:28:06 UTC
(In reply to comment #1)
> I also had a problem importing a .pcf file. In my case the problem went away
> when I opened the file and added a description. The lack of a string in the
> Description made the file fail on import. A reasonable solution to this would
> be to in case of missing description in the file default it to "default".
> My file looks like this: 

Hmm, what version of NetworkManager-vpnc?  I can't seem to reproduce this with current master...
Comment 4 Eduard Sanchez Biete 2009-08-28 17:49:34 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > Please describe the problem:
> > Trying to import a valid conf file (running from command line with vpnc-connect
> > cisco.conf, connects successfully with no error) popups an error saying:
> > 
> > The file 'E\Uffffffff could not be read or does not contain recognized VPN
> > connection information
> > 
> > Error: does not look like a Cisco Compatible VPN (vpnc) VPN connection
> 
> So, the problem here is that you're not importing a Cisco .pcf file, you're
> trying to import a vpnc config file.  We should probably try to import that
> file format too just for kicks, but at the moment the import only handles .pcf
> files that contain configuration for Cisco's VPN client.

Yes Dan, that's true. I assumed that NM was able to import vpnc conf files as it acts like a frontend for vpnc. It's correct to mark this not as a bug but as an enhancement request.

Thanks.
Comment 5 Erik Piehl Sylvén 2009-08-28 18:00:08 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > I also had a problem importing a .pcf file. In my case the problem went away
> > when I opened the file and added a description. The lack of a string in the
> > Description made the file fail on import. A reasonable solution to this would
> > be to in case of missing description in the file default it to "default".
> > My file looks like this: 
> 
> Hmm, what version of NetworkManager-vpnc?  I can't seem to reproduce this with
> current master...
I use the one that's currently in ubuntu 9.04, don't know what version right now since I'm singing a concert.  :)
Comment 6 Dan Williams 2009-08-28 20:17:00 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > (In reply to comment #1)
> > > I also had a problem importing a .pcf file. In my case the problem went away
> > > when I opened the file and added a description. The lack of a string in the
> > > Description made the file fail on import. A reasonable solution to this would
> > > be to in case of missing description in the file default it to "default".
> > > My file looks like this: 
> > 
> > Hmm, what version of NetworkManager-vpnc?  I can't seem to reproduce this with
> > current master...
> I use the one that's currently in ubuntu 9.04, don't know what version right
> now since I'm singing a concert.  :)

I looked into this, and it appears this bug was fixed on May 4 2009:

commit 1fb3ebbef18b621733b3dea00ff72d114fad80fc
Author: Lubomir Rintel <lkundrak@v3.sk>
Date:   Mon May 4 13:38:38 2009 -0400

    allow missing description in pcf file during import

You may wish to ask your distribution's NM maintainer to apply that patch.