tags 499036 patch
thanks

Attached is a NMUdiff to fix a Debian-specific patch which has not
been checked before release by the maintainer.

I will upload a NMU if the maintainer does not react under one day.

Cheers,
-- 
 .''`.   Aurélien GÉRÔME
: :'  :
`. `'`   Debian Developer
  `-     Unix Sys & Net Admin
diff -u vtun-3.0.2/debian/changelog vtun-3.0.2/debian/changelog
--- vtun-3.0.2/debian/changelog
+++ vtun-3.0.2/debian/changelog
@@ -1,3 +1,10 @@
+vtun (3.0.2-1.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * Fix openpty() wrong usage. (Closes: #499036)
+
+ -- Aurélien GÉRÔME <a...@debian.org>  Tue, 13 Jan 2009 19:32:10 +0100
+
 vtun (3.0.2-1) unstable; urgency=low
 
   * New upstream release, fixes incompatibilities with older clients.
diff -u vtun-3.0.2/debian/patches/05-unix98pty.patch 
vtun-3.0.2/debian/patches/05-unix98pty.patch
--- vtun-3.0.2/debian/patches/05-unix98pty.patch
+++ vtun-3.0.2/debian/patches/05-unix98pty.patch
@@ -4,10 +4,10 @@
 
 DP: Patch to allow the use of unix 98 pts
 
-Index: vtun/generic/pty_dev.c
+Index: vtun-3.0.2/generic/pty_dev.c
 ===================================================================
---- vtun.orig/generic/pty_dev.c
-+++ vtun/generic/pty_dev.c
+--- vtun-3.0.2.orig/generic/pty_dev.c  2009-01-13 19:36:05.000000000 +0100
++++ vtun-3.0.2/generic/pty_dev.c       2009-01-13 19:36:27.000000000 +0100
 @@ -31,6 +31,8 @@
  #include <string.h>
  #include <syslog.h>
@@ -17,16 +17,18 @@
  #include "vtun.h"
  #include "lib.h"
  
-@@ -57,31 +59,29 @@ int pty_open(char *sl_name)
+@@ -57,31 +59,29 @@
  
  #else
  
 -    char ptyname[] = "/dev/ptyXY";
 -    char ch[] = "pqrstuvwxyz";
 -    char digit[] = "0123456789abcdefghijklmnopqrstuv";
-+    char *ptyname;
++    char ptyname[1024];
      int  l, m;
 +    int master, slave;
++
++    /* This algorithm works for UNIX98 PTS */ 
  
 -    /* This algorithm should work for almost all standard Unices */   
 -    for(l=0; ch[l]; l++ ) {
@@ -36,8 +38,6 @@
 -              /* Open the master */
 -              if( (mr_fd=open(ptyname, O_RDWR)) < 0 )
 -                 continue;
-+    /* This algorithm works for UNIX98 PTS */ 
-+
 +    /* Open the master */
 +    mr_fd = openpty(&master, &slave, ptyname, NULL, NULL);
 +    if (mr_fd == -1)
@@ -66,10 +66,10 @@
  #endif
  }
  
-Index: vtun/Makefile.in
+Index: vtun-3.0.2/Makefile.in
 ===================================================================
---- vtun.orig/Makefile.in
-+++ vtun/Makefile.in
+--- vtun-3.0.2.orig/Makefile.in        2009-01-13 19:36:05.000000000 +0100
++++ vtun-3.0.2/Makefile.in     2009-01-13 19:36:05.000000000 +0100
 @@ -19,7 +19,7 @@
  #  
  CC = @CC@

Attachment: signature.asc
Description: Digital signature

Reply via email to