summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rw-r--r--configure.ac2
-rw-r--r--network-manager-iodine.doap2
-rw-r--r--src/nm-iodine-service.c17
-rw-r--r--src/nm-iodine-service.h2
5 files changed, 19 insertions, 9 deletions
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..a7e43a7
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,5 @@
+=============
+Version 0.0.2
+=============
+* Pass the password via the environment
+* Chroot iodine
diff --git a/configure.ac b/configure.ac
index 0961d0b..eb42601 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ(2.52)
-AC_INIT(NetworkManager-iodine, 0.0.1, agx@sigxcpu.org, NetworkManager-iodine)
+AC_INIT(NetworkManager-iodine, 0.0.2, agx@sigxcpu.org, NetworkManager-iodine)
AM_INIT_AUTOMAKE([subdir-objects no-dist-gzip dist-xz])
AM_MAINTAINER_MODE
diff --git a/network-manager-iodine.doap b/network-manager-iodine.doap
index a24d8b9..a50b26d 100644
--- a/network-manager-iodine.doap
+++ b/network-manager-iodine.doap
@@ -10,6 +10,7 @@
<homepage rdf:resource="http://honk.sigxcpu.org/piki/projects//network-manager-iodine/" />
<category rdf:resource="http://api.gnome.org/doap-extensions#development" />
+ <download-page rdf:resource="http://download.gnome.org/sources/krb5-auth-dialog/" />
<maintainer>
<foaf:Person>
@@ -18,6 +19,5 @@
<gnome:userid>guidog</gnome:userid>
</foaf:Person>
</maintainer>
-
</Project>
diff --git a/src/nm-iodine-service.c b/src/nm-iodine-service.c
index 4c97581..ead8908 100644
--- a/src/nm-iodine-service.c
+++ b/src/nm-iodine-service.c
@@ -45,6 +45,9 @@
#include "nm-iodine-service.h"
#include "nm-utils.h"
+#define NM_IODINE_USER "nm-iodine"
+#define NM_IODINE_RUNDIR LOCALSTATEDIR "/run/" NM_IODINE_USER
+
G_DEFINE_TYPE (NMIODINEPlugin, nm_iodine_plugin, NM_TYPE_VPN_PLUGIN)
typedef struct {
@@ -458,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 */
@@ -468,17 +474,18 @@ 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);
} else
g_warning("Running as root user");
+ if (!g_mkdir_with_parents(NM_IODINE_RUNDIR, 700)) {
+ g_ptr_array_add (iodine_argv, (gpointer) "-t");
+ g_ptr_array_add (iodine_argv, (gpointer) NM_IODINE_RUNDIR);
+ } else
+ g_warning("Not running chrooted");
+
if (props_nameserver && strlen(props_nameserver))
g_ptr_array_add (iodine_argv, (gpointer) props_nameserver);
diff --git a/src/nm-iodine-service.h b/src/nm-iodine-service.h
index f82e282..48e2e46 100644
--- a/src/nm-iodine-service.h
+++ b/src/nm-iodine-service.h
@@ -52,6 +52,4 @@ GType nm_iodine_plugin_get_type (void);
NMIODINEPlugin *nm_iodine_plugin_new (void);
-#define NM_IODINE_USER "nm-iodine"
-
#endif /* NM_IODINE_PLUGIN_H */