Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Aug 1997 20:28:52 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        ru@ucb.crimea.ua, Tor.Egge@idi.ntnu.no
Cc:        freebsd-bugs@FreeBSD.ORG, torstenb@FreeBSD.ORG
Subject:   Re: CPSR #8: identd Denial of Service (fwd)
Message-ID:  <199708051028.UAA26192@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Index: libexec/identd/identd.c
>> ===================================================================
>> RCS file: /cvs/src/libexec/identd/identd.c,v
>> retrieving revision 1.4
>> retrieving revision 1.5
>> diff -r1.4 -r1.5
>> 2c2
>> < **    $Id: identd.c,v 1.4 1997/07/23 20:36:27 kstailey Exp $
>> ---
>> > **    $Id: identd.c,v 1.5 1997/07/29 07:49:31 deraadt Exp $
>> 180a181
>> >   int save_errno = errno;
>> 184a186
>> >   errno = save_errno;
>> 
>
>This patch causes the SIGCHLD handler to no longer clobber errno.
>While this is a bug fix, it should only affect the parent process
>and remove some bogus "main: select" error messages.

This should be fixed generally by preserving errno across all signal
handlers.  POSIX.1 requires that some syscalls are "safe" to call
in signal handlers, so they must not modify any global variables, at
least as the interrupted thread of execution can tell.  In [Free]BSD,
most syscalls don't modify any global variables except for errno.
Unfortunately, they all clobber errno.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708051028.UAA26192>