update to dtach-0.9
This commit is contained in:
parent
a56eb3ca93
commit
3c4ef84d50
@ -1,8 +1,7 @@
|
||||
# $OpenBSD: Makefile,v 1.9 2014/01/01 20:46:28 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.10 2016/08/17 14:02:48 jasper Exp $
|
||||
|
||||
COMMENT= tiny program emulating the detach feature of screen
|
||||
DISTNAME= dtach-0.8
|
||||
REVISION= 1
|
||||
DISTNAME= dtach-0.9
|
||||
CATEGORIES= misc
|
||||
|
||||
HOMEPAGE= http://dtach.sourceforge.net/
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (dtach-0.8.tar.gz) = FmFOvd+KsoEdPcDn8ynH3oiSmsapYy1MtK73/hG48qk=
|
||||
SIZE (dtach-0.8.tar.gz) = 55472
|
||||
SHA256 (dtach-0.9.tar.gz) = Mun9aSPFU8RD+rTsnB+V2D+ke3cebh2vsBjFZykUkvM=
|
||||
SIZE (dtach-0.9.tar.gz) = 60608
|
||||
|
@ -1,14 +1,7 @@
|
||||
$OpenBSD: patch-attach_c,v 1.2 2012/07/18 11:15:30 jasper Exp $
|
||||
|
||||
Last chunk:
|
||||
Security fix for CVE-2012-3368
|
||||
Memory portion (random stack data) disclosure to the client by unclean client disconnect
|
||||
|
||||
Patch from upstream CVS.
|
||||
|
||||
--- attach.c.orig Thu Jan 31 06:59:54 2008
|
||||
+++ attach.c Wed Jul 18 13:13:39 2012
|
||||
@@ -56,7 +56,7 @@ connect_socket(char *name)
|
||||
$OpenBSD: patch-attach_c,v 1.3 2016/08/17 14:02:48 jasper Exp $
|
||||
--- attach.c.orig Mon May 9 03:34:34 2016
|
||||
+++ attach.c Wed Aug 17 16:00:11 2016
|
||||
@@ -62,7 +62,7 @@ connect_socket(char *name)
|
||||
if (s < 0)
|
||||
return -1;
|
||||
sockun.sun_family = AF_UNIX;
|
||||
@ -17,21 +10,3 @@ Patch from upstream CVS.
|
||||
if (connect(s, (struct sockaddr*)&sockun, sizeof(sockun)) < 0)
|
||||
{
|
||||
close(s);
|
||||
@@ -237,12 +237,15 @@ attach_main(int noerror)
|
||||
/* stdin activity */
|
||||
if (n > 0 && FD_ISSET(0, &readfds))
|
||||
{
|
||||
+ ssize_t len;
|
||||
+
|
||||
pkt.type = MSG_PUSH;
|
||||
memset(pkt.u.buf, 0, sizeof(pkt.u.buf));
|
||||
- pkt.len = read(0, pkt.u.buf, sizeof(pkt.u.buf));
|
||||
+ len = read(0, pkt.u.buf, sizeof(pkt.u.buf));
|
||||
|
||||
- if (pkt.len <= 0)
|
||||
+ if (len <= 0)
|
||||
exit(1);
|
||||
+ pkt.len = len;
|
||||
process_kbd(s, &pkt);
|
||||
n--;
|
||||
}
|
||||
|
@ -1,22 +1,7 @@
|
||||
$OpenBSD: patch-master_c,v 1.2 2012/07/18 11:15:30 jasper Exp $
|
||||
|
||||
Last chunk:
|
||||
Security fix for CVE-2012-3368
|
||||
Memory portion (random stack data) disclosure to the client by unclean client disconnect
|
||||
|
||||
Patch from upstream CVS.
|
||||
|
||||
--- master.c.orig Thu Jan 31 06:59:54 2008
|
||||
+++ master.c Wed Jul 18 13:14:08 2012
|
||||
@@ -17,6 +17,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "dtach.h"
|
||||
+#define HAVE_OPENPTY
|
||||
|
||||
/* The pty struct - The pty information is stored here. */
|
||||
struct pty
|
||||
@@ -189,7 +190,7 @@ create_socket(char *name)
|
||||
$OpenBSD: patch-master_c,v 1.3 2016/08/17 14:02:48 jasper Exp $
|
||||
--- master.c.orig Mon May 9 03:34:34 2016
|
||||
+++ master.c Wed Aug 17 16:00:11 2016
|
||||
@@ -195,7 +196,7 @@ create_socket(char *name)
|
||||
if (s < 0)
|
||||
return -1;
|
||||
sockun.sun_family = AF_UNIX;
|
||||
@ -25,15 +10,3 @@ Patch from upstream CVS.
|
||||
if (bind(s, (struct sockaddr*)&sockun, sizeof(sockun)) < 0)
|
||||
{
|
||||
close(s);
|
||||
@@ -351,7 +352,10 @@ client_activity(struct client *p)
|
||||
|
||||
/* Push out data to the program. */
|
||||
if (pkt.type == MSG_PUSH)
|
||||
- write(the_pty.fd, pkt.u.buf, pkt.len);
|
||||
+ {
|
||||
+ if (pkt.len <= sizeof(pkt.u.buf))
|
||||
+ write(the_pty.fd, pkt.u.buf, pkt.len);
|
||||
+ }
|
||||
|
||||
/* Attach or detach from the program. */
|
||||
else if (pkt.type == MSG_ATTACH)
|
||||
|
@ -1,3 +1,3 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2006/03/05 17:05:36 niallo Exp $
|
||||
bin/dtach
|
||||
@comment $OpenBSD: PLIST,v 1.2 2016/08/17 14:02:48 jasper Exp $
|
||||
@bin bin/dtach
|
||||
@man man/man1/dtach.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user