[Pkg-sysvinit-devel] Bug#492796: /sbin/bootlogd: findpty() fails to fail
Rob Leslie
rob at mars.org
Mon Jul 28 21:25:25 UTC 2008
Package: sysvinit
Version: 2.86.ds1-38+etchnhalf.1.1
Severity: normal
File: /sbin/bootlogd
Tags: patch
bootlogd's findpty() never returns an error value, even when it fails to find
a usable pty. Consequently bootlogd may carry on thinking it has found a valid
pty -- with slave named /dev/ttyzf -- but encounters "Bad file descriptor"
errors as soon as it tries to do anything with it.
The attached patch corrects this problem.
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.24-etchnhalf.1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages sysvinit depends on:
ii initscripts 2.86.ds1-38+etchnhalf.1 Scripts for initializing and shutt
ii libc6 2.3.6.ds1-13etch7 GNU C Library: Shared libraries
ii libselinux1 1.32-3 SELinux shared libraries
ii libsepol1 1.14-2 Security Enhanced Linux policy lib
ii sysv-rc 2.86.ds1-38+etchnhalf.1 System-V-like runlevel change mech
ii sysvinit-utils 2.86.ds1-38+etchnhalf.1 System-V-like utilities
sysvinit recommends no packages.
-- no debconf information
-------------- next part --------------
diff -ur sysvinit-2.86.ds1.orig/src/bootlogd.c sysvinit-2.86.ds1/src/bootlogd.c
--- sysvinit-2.86.ds1.orig/src/bootlogd.c 2004-06-09 05:47:45.000000000 -0700
+++ sysvinit-2.86.ds1/src/bootlogd.c 2008-07-28 13:56:02.000000000 -0700
@@ -167,7 +167,7 @@
}
if (found) break;
}
- if (found < 0) return -1;
+ if (!found) return -1;
if (name) strcpy(name, tty);
More information about the Pkg-sysvinit-devel
mailing list