changeset 9:640f620a55cf V2.1.3

Bugfixes for floating remote and debian upgrade
author Ivo Smits <Ivo@UCIS.nl>
date Wed, 20 Oct 2010 21:08:03 +0200
parents 6d86596d8884
children 1e4ba8d8ffc2
files debian/static/DEBIAN/postinst debian/static/DEBIAN/prerm src/common.c version
diffstat 4 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/debian/static/DEBIAN/postinst	Thu Oct 14 02:15:55 2010 +0200
+++ b/debian/static/DEBIAN/postinst	Wed Oct 20 21:08:03 2010 +0200
@@ -1,4 +1,6 @@
 #!/bin/sh
 if [ "$1" = "configure" ]; then
-	/usr/sbin/useradd -d /nonexistent -N -r -s /bin/false quicktun
+	if ! getent passwd quicktun >/dev/null; then
+		/usr/sbin/useradd -d /nonexistent -N -r -s /bin/false -g nogroup quicktun
+	fi
 fi
--- a/debian/static/DEBIAN/prerm	Thu Oct 14 02:15:55 2010 +0200
+++ b/debian/static/DEBIAN/prerm	Wed Oct 20 21:08:03 2010 +0200
@@ -1,4 +1,4 @@
 #!/bin/sh
-if [ "$1" = "upgrade" -o "$1" = "remove" ]; then
+if [ "$1" = "remove" ]; then
 	/usr/sbin/userdel quicktun
 fi
--- a/src/common.c	Thu Oct 14 02:15:55 2010 +0200
+++ b/src/common.c	Wed Oct 20 21:08:03 2010 +0200
@@ -206,8 +206,8 @@
 		else if (fds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) return errorexit("poll error on tap device");
 		else if (fds[1].revents & (POLLHUP | POLLNVAL)) return errorexit("poll error on udp socket");
 		if (fds[0].revents & POLLIN) {
+			len = read(ttfd, buffer_raw + p->offset_raw, p->buffersize_raw);
 			if (session.remote_float == 0 || session.remote_float == 2) {
-				len = read(ttfd, buffer_raw + p->offset_raw, p->buffersize_raw);
 				len = p->encode(&session, buffer_raw, buffer_enc, len);
 				if (len < 0) return len;
 				if (session.remote_float == 0) {
--- a/version	Thu Oct 14 02:15:55 2010 +0200
+++ b/version	Wed Oct 20 21:08:03 2010 +0200
@@ -1,1 +1,1 @@
-2.1.2
+2.1.3