2007-12-07 Dan Williams <dcbw@redhat.com>

Patches from Casey Harkins <caseyharkins@gmail.com>

	* src/nm-openvpn-service-openvpn-helper.c
		- (parse_addr_list): fix off-by-one error

	* src/nm-openvpn-service.c
		- (nm_openvpn_start_openvpn_binary): don't let openvpn stomp all over
			the routing table since NM manages that

	* auth-dialog/main.c
	  src/nm-openvpn-service.h
	  src/nm-openvpn-service.c
		- Don't require a certificate password



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3158 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2007-12-08 00:09:08 +00:00
parent bc309840db
commit f04ce4d66d
5 changed files with 25 additions and 2 deletions

View file

@ -1,3 +1,19 @@
2007-12-07 Dan Williams <dcbw@redhat.com>
Patches from Casey Harkins <caseyharkins@gmail.com>
* src/nm-openvpn-service-openvpn-helper.c
- (parse_addr_list): fix off-by-one error
* src/nm-openvpn-service.c
- (nm_openvpn_start_openvpn_binary): don't let openvpn stomp all over
the routing table since NM manages that
* auth-dialog/main.c
src/nm-openvpn-service.h
src/nm-openvpn-service.c
- Don't require a certificate password
2007-12-05 Dan Williams <dcbw@redhat.com>
Patch from Casey Harkins <caseyharkins@gmail.com>

View file

@ -386,8 +386,10 @@ main (int argc, char *argv[])
exit_status = 0;
if (!info.need_password && !info.need_certpass)
if (!info.need_password && !info.need_certpass) {
printf ("%s\n%s\n\n\n", NM_OPENVPN_KEY_NOSECRET, "true");
goto out;
}
if (get_passwords (&info, retry)) {
if (info.need_password)

View file

@ -166,7 +166,7 @@ parse_addr_list (GValue *value_array, const char *str)
g_strfreev (split);
if (!value_array && array->len > 1) {
if (!value_array && array->len > 0) {
value_array = g_slice_new0 (GValue);
g_value_init (value_array, DBUS_TYPE_G_UINT_ARRAY);
g_value_set_boxed (value_array, array);

View file

@ -101,6 +101,7 @@ static ValidProperty valid_properties[] = {
{ NM_OPENVPN_KEY_USERNAME, G_TYPE_STRING },
{ NM_OPENVPN_KEY_PASSWORD, G_TYPE_STRING },
{ NM_OPENVPN_KEY_CERTPASS, G_TYPE_STRING },
{ NM_OPENVPN_KEY_NOSECRET, G_TYPE_STRING },
{ NULL, G_TYPE_NONE }
};
@ -462,6 +463,9 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin, GHashTable *properties
/* Query on the management socket for user/pass */
g_ptr_array_add (openvpn_argv, (gpointer) "--management-query-passwords");
/* do not let openvpn setup routes, NM will handle it */
g_ptr_array_add (openvpn_argv, (gpointer) "--route-noexec");
/* Now append configuration options which are dependent on the configuration type */
switch (connection_type) {
case NM_OPENVPN_CONTYPE_X509:

View file

@ -66,6 +66,7 @@
#define NM_OPENVPN_KEY_PASSWORD "password"
#define NM_OPENVPN_KEY_CERTPASS "cert-pass"
#define NM_OPENVPN_KEY_NOSECRET "no-secret"
typedef struct {
NMVPNPlugin parent;