Package: vpnc
Version: 0.5.3r550-2
Severity: normal
Tags: patch pending

Dear maintainers,

I've prepared an NMU for vpnc (versioned as 0.5.3r550-2ubuntu1). The
debdiff output is below.

Regards.
Dan Lenski

diff -Nru vpnc-0.5.3r550/debian/changelog vpnc-0.5.3r550/debian/changelog
--- vpnc-0.5.3r550/debian/changelog     2014-10-05 13:56:57.000000000 -0700
+++ vpnc-0.5.3r550/debian/changelog     2016-08-11 00:31:37.000000000 -0700
@@ -1,3 +1,13 @@
+vpnc (0.5.3r550-2ubuntu1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * add Mihai Maties dpd_big-endian.patch
+    Closes: LP: #700767
+  * add Dan Lenski's restore_original_cwd_after_vpnc_main_loop.patch
+    Closes: LP: #1612100
+
+ -- Daniel Lenski <dlen...@gmail.com>  Wed, 10 Aug 2016 23:45:53 -0700
+
 vpnc (0.5.3r550-2) unstable; urgency=medium
 
   * Enable PIE and BINDNOW hardening as suggested by Markus
diff -Nru vpnc-0.5.3r550/debian/patches/dpd_big-endian.patch 
vpnc-0.5.3r550/debian/patches/dpd_big-endian.patch
--- vpnc-0.5.3r550/debian/patches/dpd_big-endian.patch  1969-12-31 
16:00:00.000000000 -0800
+++ vpnc-0.5.3r550/debian/patches/dpd_big-endian.patch  2016-08-11 
00:26:56.000000000 -0700
@@ -0,0 +1,27 @@
+Author: Mihai Maties <mi...@xcyb.org>
+Subject: Dead Peer Detection fix
+Date: Tue Dec 28 11:09:26 CET 2010
+Origin: 
http://lists.unix-ag.uni-kl.de/pipermail/vpnc-devel/2010-December/003492.html
+
+diff --git a/vpnc.c b/vpnc.c
+index a0c211b..8ec5041 100644
+--- a/vpnc.c
++++ b/vpnc.c
+@@ -796,7 +796,9 @@ void dpd_ike(struct sa_block *s)
+               */
+               s->ike.dpd_attempts = 6;
+               s->ike.dpd_sent = time(NULL);
++              s->ike.dpd_seqno = ntohl(s->ike.dpd_seqno);
+               s->ike.dpd_seqno++;
++              s->ike.dpd_seqno = htonl(s->ike.dpd_seqno);
+               send_dpd(s, 0, s->ike.dpd_seqno);
+       } else {
+               /* Our last dpd request has not yet been acked.  If it's been
+@@ -1589,6 +1591,7 @@ static void do_phase1_am_packet2(struct sa_block *s, 
const char *shared_key)
+                                       if (s->ike.dpd_idle != 0) {
+                                               
gcry_create_nonce(&s->ike.dpd_seqno, sizeof(s->ike.dpd_seqno));
+                                               s->ike.dpd_seqno &= 0x7FFFFFFF;
++                                              s->ike.dpd_seqno = 
htonl(s->ike.dpd_seqno);
+                                               s->ike.dpd_seqno_ack = 
s->ike.dpd_seqno;
+                                               s->ike.do_dpd = 1;
+                                               DEBUG(2, printf("peer is DPD 
capable (RFC3706)\n"));
diff -Nru 
vpnc-0.5.3r550/debian/patches/restore_original_cwd_after_vpnc_main_loop.patch 
vpnc-0.5.3r550/debian/patches/restore_original_cwd_after_vpnc_main_loop.patch
--- 
vpnc-0.5.3r550/debian/patches/restore_original_cwd_after_vpnc_main_loop.patch   
    1969-12-31 16:00:00.000000000 -0800
+++ 
vpnc-0.5.3r550/debian/patches/restore_original_cwd_after_vpnc_main_loop.patch   
    2016-08-11 00:30:47.000000000 -0700
@@ -0,0 +1,47 @@
+From: Dan Lenski <dlen...@gmail.com>
+Subject: restore original cwd after vpnc_main_loop()
+Date: Sun Aug 7 02:01:07 CEST 2016
+Origin: 
http://lists.unix-ag.uni-kl.de/pipermail/vpnc-devel/2016-August/004200.html
+
+Index: vpnc-debian.git/tunip.c
+===================================================================
+--- vpnc-debian.git.orig/tunip.c
++++ vpnc-debian.git/tunip.c
+@@ -53,6 +53,7 @@
+  *
+  */
+ 
++#define _GNU_SOURCE
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <errno.h>
+@@ -985,6 +986,7 @@ void vpnc_doit(struct sa_block *s)
+       struct encap_method meth;
+ 
+       const char *pidfile = config[CONFIG_PID_FILE];
++      char *cwd;
+ 
+       switch (s->ipsec.encap_mode) {
+               case IPSEC_ENCAP_TUNNEL:
+@@ -1038,6 +1040,10 @@ void vpnc_doit(struct sa_block *s)
+       signal(SIGINT, killit);
+       signal(SIGTERM, killit);
+ 
++      /* save cwd */
++      cwd = get_current_dir_name();
++      assert(cwd != NULL);
++
+       chdir("/");
+ 
+       if (!opt_nd) {
+@@ -1067,6 +1073,10 @@ void vpnc_doit(struct sa_block *s)
+ 
+       vpnc_main_loop(s);
+ 
++      /* restore cwd */
++      chdir(cwd);
++      free(cwd);
++
+       if (pidfile)
+               unlink(pidfile); /* ignore errors */
+ }
diff -Nru vpnc-0.5.3r550/debian/patches/series 
vpnc-0.5.3r550/debian/patches/series
--- vpnc-0.5.3r550/debian/patches/series        2014-10-05 13:53:15.000000000 
-0700
+++ vpnc-0.5.3r550/debian/patches/series        2016-08-11 00:30:47.000000000 
-0700
@@ -1,3 +1,5 @@
 use-separate-vpnc-script.patch
 fix_makefile_VERSION.patch
 vpnc_typo.patch
+dpd_big-endian.patch
+restore_original_cwd_after_vpnc_main_loop.patch
diff -Nru vpnc-0.5.3r550/debian/.pc/.quilt_patches 
vpnc-0.5.3r550/debian/.pc/.quilt_patches
--- vpnc-0.5.3r550/debian/.pc/.quilt_patches    1969-12-31 16:00:00.000000000 
-0800
+++ vpnc-0.5.3r550/debian/.pc/.quilt_patches    2016-08-10 22:40:07.000000000 
-0700
@@ -0,0 +1 @@
+patches
diff -Nru vpnc-0.5.3r550/debian/.pc/.quilt_series 
vpnc-0.5.3r550/debian/.pc/.quilt_series
--- vpnc-0.5.3r550/debian/.pc/.quilt_series     1969-12-31 16:00:00.000000000 
-0800
+++ vpnc-0.5.3r550/debian/.pc/.quilt_series     2016-08-10 22:40:07.000000000 
-0700
@@ -0,0 +1 @@
+series
diff -Nru vpnc-0.5.3r550/debian/.pc/.version vpnc-0.5.3r550/debian/.pc/.version
--- vpnc-0.5.3r550/debian/.pc/.version  1969-12-31 16:00:00.000000000 -0800
+++ vpnc-0.5.3r550/debian/.pc/.version  2016-08-10 22:40:07.000000000 -0700
@@ -0,0 +1 @@
+2

Reply via email to