--- dtach-0.8.orig/Makefile.in +++ dtach-0.8/Makefile.in @@ -21,7 +21,7 @@ rm -f dtach $(OBJ) dtach-$(VERSION).tar.gz distclean: clean - rm -f config.h Makefile config.log config.status config.cache + rm -f config.h Makefile config.log config.status config.cache config.guess config.sub tar: mkdir dtach-$(VERSION) --- dtach-0.8.orig/attach.c +++ dtach-0.8/attach.c @@ -237,12 +237,16 @@ /* stdin activity */ if (n > 0 && FD_ISSET(0, &readfds)) { + ssize_t l; + pkt.type = MSG_PUSH; memset(pkt.u.buf, 0, sizeof(pkt.u.buf)); - pkt.len = read(0, pkt.u.buf, sizeof(pkt.u.buf)); + l = read(0, pkt.u.buf, sizeof(pkt.u.buf)); - if (pkt.len <= 0) + if (l <= 0) exit(1); + + pkt.len = l; process_kbd(s, &pkt); n--; } --- dtach-0.8.orig/debian/changelog +++ dtach-0.8/debian/changelog @@ -0,0 +1,33 @@ +dtach (0.8-2.1) unstable; urgency=high + + * Non-maintainer upload by the Security Team. + * Fix CVE-2012-3368: properly handle close request (Closes: #625302). + + -- Luk Claes Mon, 02 Jul 2012 01:53:44 +0200 + +dtach (0.8-2) unstable; urgency=low + + * Updated to Policy version 3.8.1 + * Updated watch file to version 3 + * Updated debhelper version to 7 + * Converted debian/{changelog,control} to UTF-8 + * Fixed lintian warning dh-clean-k-is-deprecated + + -- Stefan Völkel Mon, 30 Mar 2009 15:07:02 +0200 + +dtach (0.8-1) unstable; urgency=low + + * New upstream release (Closes: #438335) + * Updated to Policy version 3.7.3 + * New maintainer email address + * New description (Closes: #391580) + + -- Stefan Voelkel Thu, 31 Jan 2008 14:55:58 +0100 + +dtach (0.7-1) unstable; urgency=low + + * New upstream release + * Initial Release (Closes: #251196). + + -- Stefan Voelkel Mon, 5 Jul 2004 12:09:12 +0200 + --- dtach-0.8.orig/debian/rules +++ dtach-0.8/debian/rules @@ -0,0 +1,106 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +config.status: configure + dh_testdir + # Add here commands to configure the package. + CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info + + +build: build-stamp + +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) distclean +#ifneq "$(wildcard /usr/share/misc/config.sub)" "" +# cp -f /usr/share/misc/config.sub config.sub +#endif +#ifneq "$(wildcard /usr/share/misc/config.guess)" "" +# cp -f /usr/share/misc/config.guess config.guess +#endif + + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + +# $(MAKE) install prefix=$(CURDIR)/debian/dtach/usr + install -o root -g root -m 0755 -D dtach $(CURDIR)/debian/dtach/usr/bin/dtach + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs +# dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman dtach.1 + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- dtach-0.8.orig/debian/docs +++ dtach-0.8/debian/docs @@ -0,0 +1 @@ +README --- dtach-0.8.orig/debian/compat +++ dtach-0.8/debian/compat @@ -0,0 +1 @@ +7 --- dtach-0.8.orig/debian/watch +++ dtach-0.8/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/dtach/dtach-(.+)\.tar\.gz --- dtach-0.8.orig/debian/control +++ dtach-0.8/debian/control @@ -0,0 +1,24 @@ +Source: dtach +Section: misc +Priority: optional +Maintainer: Stefan Völkel +Build-Depends: debhelper (>= 7.2.7) +Standards-Version: 3.8.1 + +Package: dtach +Architecture: any +Depends: ${shlibs:Depends} +Description: emulates the detach/attach feature of screen + dtach is a tiny program that emulates the detach feature of screen, + allowing you to run a program in an environment that is protected from + the controlling terminal and attach to it later. dtach does not keep + track of the contents of the screen, and thus works best with programs + that know how to redraw themselves. + . + dtach does not, however, have the other features of screen, such as its + support of multiple terminals or its terminal emulation support. This + makes dtach extremely tiny compared to screen, making it more easily + audited for bugs and security holes, and also allows it to fit in + environments where space is limited, such as on rescue disks. + . +Homepage: http://dtach.sourceforge.net/ --- dtach-0.8.orig/debian/copyright +++ dtach-0.8/debian/copyright @@ -0,0 +1,11 @@ +This package was debianized by Stefan Voelkel +Mon, 14 Jun 2004 21:56:25 +0000. + +It was downloaded from http://dtach.sf.net + +Upstream Author: Ned T. Crigler + +Copyright: (C) 2004-2008 Ned T. Crigler + +This software is released under the GPL v2. On Debian systems the license can be +found under /usr/share/common-licenses.