summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-03-27 22:22:31 +0200
committerGuido Günther <agx@sigxcpu.org>2012-03-27 22:24:47 +0200
commit1b0175fe02c7226e7538cfa2764b6eecb1c1c338 (patch)
tree18d9816ae2204228c7ba2c6aa5eac0434811c6af /debian
parentddf432a6c1702283497af3876b88cf2ae297e86d (diff)
Check password write result
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/0001-Check-password-write-result.patch34
-rw-r--r--debian/patches/series1
2 files changed, 35 insertions, 0 deletions
diff --git a/debian/patches/0001-Check-password-write-result.patch b/debian/patches/0001-Check-password-write-result.patch
new file mode 100644
index 0000000..265e023
--- /dev/null
+++ b/debian/patches/0001-Check-password-write-result.patch
@@ -0,0 +1,34 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Tue, 27 Mar 2012 22:19:07 +0200
+Subject: Check password write result
+
+---
+ src/nm-iodine-service.c | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/nm-iodine-service.c b/src/nm-iodine-service.c
+index 03012f8..0520f5e 100644
+--- a/src/nm-iodine-service.c
++++ b/src/nm-iodine-service.c
+@@ -440,14 +440,19 @@ static void
+ send_password(gint fd, NMSettingVPN *s_vpn)
+ {
+ const char *passwd;
++ ssize_t ret;
+
+ passwd = nm_setting_vpn_get_secret (s_vpn, NM_IODINE_KEY_PASSWORD);
+ /* Don't send an empty password since this makes iodine block */
+ if (!passwd || !strlen(passwd))
+ passwd = "<none>";
+
+- write (fd, passwd, strlen(passwd));
+- write (fd, "\n", 1);
++ ret = write (fd, passwd, strlen(passwd));
++ if (ret < 0)
++ g_warning("Password write failed");
++ ret = write (fd, "\n", 1);
++ if (ret < 0)
++ g_warning("Password write failed");
+ }
+
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2777090
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Check-password-write-result.patch