NetworkManager r3554 - in trunk/vpn-daemons/openvpn: . auth-dialog
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3554 - in trunk/vpn-daemons/openvpn: . auth-dialog
- Date: Thu, 10 Apr 2008 16:14:43 +0100 (BST)
Author: dcbw
Date: Thu Apr 10 16:14:43 2008
New Revision: 3554
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3554&view=rev
Log:
2008-04-10 Dan Williams <dcbw redhat com>
* vpn-daemons/openvpn/auth-dialog/main.c
- Fix up for connection ID; but needs more work to actually read the
keyring key from the right place
Modified:
trunk/vpn-daemons/openvpn/ChangeLog
trunk/vpn-daemons/openvpn/auth-dialog/main.c
Modified: trunk/vpn-daemons/openvpn/auth-dialog/main.c
==============================================================================
--- trunk/vpn-daemons/openvpn/auth-dialog/main.c (original)
+++ trunk/vpn-daemons/openvpn/auth-dialog/main.c Thu Apr 10 16:14:43 2008
@@ -37,6 +37,7 @@
#include "gnome-two-password-dialog.h"
typedef struct {
+ char *vpn_id;
char *vpn_name;
char *vpn_service;
@@ -47,6 +48,11 @@
char *certpass;
} PasswordsInfo;
+#define KEYRING_CID_TAG "connection-id"
+#define KEYRING_SN_TAG "setting-name"
+#define KEYRING_SK_TAG "setting-key"
+
+
static gboolean
lookup_pass (PasswordsInfo *info, gboolean *is_session)
{
@@ -339,17 +345,17 @@
int exit_status = 1;
static gboolean retry = FALSE;
static gchar *vpn_name = NULL;
+ static gchar *vpn_id = NULL;
static gchar *vpn_service = NULL;
- static gchar *vpn_id = NULL;
GOptionContext *context;
GnomeProgram *program = NULL;
int bytes_read;
GOptionEntry entries[] =
{
{ "reprompt", 'r', 0, G_OPTION_ARG_NONE, &retry, "Reprompt for passwords", NULL},
+ { "id", 'i', 0, G_OPTION_ARG_STRING, &vpn_id, "ID of VPN connection", NULL},
{ "name", 'n', 0, G_OPTION_ARG_STRING, &vpn_name, "Name of VPN connection", NULL},
{ "service", 's', 0, G_OPTION_ARG_STRING, &vpn_service, "VPN service type", NULL},
- { "id", 'i', 0, G_OPTION_ARG_STRING, &vpn_id, "VPN service id", NULL},
{ NULL }
};
char buf[1];
@@ -367,8 +373,8 @@
GNOME_PARAM_GOPTION_CONTEXT, context,
GNOME_PARAM_NONE);
- if (vpn_name == NULL || vpn_service == NULL) {
- fprintf (stderr, "Have to supply both name and service\n");
+ if (vpn_id == NULL || vpn_name == NULL || vpn_service == NULL) {
+ fprintf (stderr, "Have to supply ID, name, and service\n");
goto out;
}
@@ -378,6 +384,7 @@
}
memset (&info, 0, sizeof (PasswordsInfo));
+ info.vpn_id = vpn_id;
info.vpn_name = vpn_name;
info.vpn_service = vpn_service;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]