Bug 10873

Summary: VPN config do not work if the name contains spaces
Product: Mageia Reporter: Diep Pham Van <imeo>
Component: RPM PackagesAssignee: Colin Guthrie <mageia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: mageia, thierry.vignaud
Version: 3Keywords: Junior_job, PATCH
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: initscripts CVE:
Status comment:

Description Diep Pham Van 2013-07-29 10:11:35 CEST
Description of problem:
While the VPN configuration program in MCC allow to name the VPN connection with space, if you do that, the VPN connection will fail.

For example:
If I name the VPN connection: Admicro SysAdmin, the connection will fail. The log said:

    Jul 28 09:41:14 mageiabox.localdomain drakvpn[18568]: modified file /etc/sysconfig/network-scripts/vpn.d/openvpn/Admicro SysAdmin.conf
    Jul 28 09:41:15 mageiabox.localdomain drakvpn[18568]: running: vpn-start openvpn Admicro SysAdmin
    Jul 28 09:41:15 mageiabox.localdomain openvpn[19324]: Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/sysconfig/network-scripts/vpn.d/openvpn/Admicro

The problem is the way drakvpn call vpn-start command, If my guest is correctly, sound round the VPN name with ' will solve the problem.

Version-Release number of selected component (if applicable):
drakx-net-text-1.24-1.mga3

How reproducible:
Always.

Steps to Reproduce:
1. Create new VPN connection using MCC with space character in the name.
2. Try to connect.

Reproducible: 

Steps to Reproduce:
Manuel Hiebel 2013-07-29 20:18:30 CEST

Keywords: (none) => Junior_job
CC: (none) => mageia, thierry.vignaud
Source RPM: (none) => drakx-net

Comment 1 Thierry Vignaud 2013-12-28 17:14:57 CET
Colin you just need to patch /etc/sysconfig/network-scripts/ifup.d/vpn so that it calls:
        /usr/sbin/vpn-start $VPN_TYPE "$VPN_NAME"

instead of:
        /usr/sbin/vpn-start $VPN_TYPE $VPN_NAME

Keywords: (none) => PATCH
Assignee: bugsquad => mageia
Source RPM: drakx-net => initscripts

Comment 2 Mageia Robot 2013-12-28 17:40:09 CET
commit df41bbfe7ba1873c9f851303474177c3ea69e039
Author: Colin Guthrie <colin@...>
Date:   Sat Dec 28 16:40:02 2013 +0000

    vpn: Ensure the VPN name is properly quoted (mga#10873)
---
 Commit Link:
   http://gitweb.mageia.org/software/forks/initscripts/commit/?id=df41bbfe7ba1873c9f851303474177c3ea69e039
Comment 3 Colin Guthrie 2013-12-28 17:54:50 CET
Should be fixed in git, packaged patched and freeze push requested, so should be fixed. Please reopen if the problem persists after updating.

Status: NEW => RESOLVED
Resolution: (none) => FIXED