Re: ptrace broken on latest CURRENT ?

From: Craig Rodrigues <rodrigc_at_crodrigues.org>
Date: Sat, 27 Nov 2004 19:30:36 -0500
On Fri, Nov 26, 2004 at 09:05:25PM +0300, Vladimir Grebenschikov wrote:
> Hi
> 
> % truss ls
> truss: PIOCBIS: Inappropriate ioctl for device

I'm seeing this too.  This patch seems to work for me,
but I don't know if it is correct or not.


--- sys_generic.c.orig	Sat Nov 27 19:14:39 2004
+++ sys_generic.c	Sat Nov 27 19:17:09 2004
_at__at_ -503,7 +503,7 _at__at_
         if ((size > IOCPARM_MAX) ||
             ((com & (IOC_VOID  | IOC_IN | IOC_OUT)) == 0) ||
             ((com & IOC_VOID) && size > 0) ||
-            ((com & (IOC_IN | IOC_OUT)) && size == 0)) {
+            ((com & IOC_OUT) && size == 0)) {
                 fdrop(fp, td);
                 return (ENOTTY);
         }



-- 
Craig Rodrigues        
http://crodrigues.org
rodrigc_at_crodrigues.org
Received on Sat Nov 27 2004 - 23:30:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:23 UTC