summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-02-08 18:26:34 +0100
committerGuido Günther <agx@sigxcpu.org>2012-02-08 18:37:17 +0100
commitf6118a889011bc9ebfa1e3bdd6aeec0969d2e986 (patch)
treecc6f11b4818a80be34196eadcdf7666fc29d9542 /src
parent97172005b2f3a30c1158c852b566a67f0ad3ec99 (diff)
Pass the password via the environment
instead of the command line.
Diffstat (limited to 'src')
-rw-r--r--src/nm-iodine-service.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nm-iodine-service.c b/src/nm-iodine-service.c
index 14f20f3..ead8908 100644
--- a/src/nm-iodine-service.c
+++ b/src/nm-iodine-service.c
@@ -461,6 +461,9 @@ nm_iodine_start_iodine_binary(NMIODINEPlugin *plugin,
passwd = nm_setting_vpn_get_secret (s_vpn, NM_IODINE_KEY_PASSWORD);
+ if (passwd && strlen(passwd))
+ g_setenv("IODINE_PASS", passwd, TRUE);
+
iodine_argv = g_ptr_array_new ();
g_ptr_array_add (iodine_argv, (gpointer) (*iodine_binary));
/* Run in foreground */
@@ -471,11 +474,6 @@ nm_iodine_start_iodine_binary(NMIODINEPlugin *plugin,
g_ptr_array_add (iodine_argv, (gpointer) props_fragsize);
}
- if (passwd && strlen(passwd)) {
- g_ptr_array_add (iodine_argv, (gpointer) "-P");
- g_ptr_array_add (iodine_argv, (gpointer) passwd);
- }
-
if (has_user(NM_IODINE_USER)) {
g_ptr_array_add (iodine_argv, (gpointer) "-u");
g_ptr_array_add (iodine_argv, (gpointer) NM_IODINE_USER);