Index: socksys.c =================================================================== RCS file: /usr/CVS/ibcs/iBCSemul/socksys.c,v retrieving revision 1.40 diff -u -r1.40 socksys.c --- socksys.c 1995/07/31 12:28:22 1.40 +++ socksys.c 1995/08/04 13:04:03 @@ -699,9 +699,12 @@ current->pid, (unsigned long)filep); #endif if (MINOR(ino->i_rdev) == 1) { + /* Special - minor 1 is fake spx for X. */ + args[0] = AF_UNIX; + args[1] = SOCK_STREAM; + args[2] = 0; } else switch ((args[0] = ((MINOR(ino->i_rdev) >> 4) & 0x0f))) { - case 0: - /* Special - minor 1 is fake spx for X. */ + case AF_UNIX: args[0] = AF_UNIX; args[1] = SOCK_STREAM; args[2] = 0; Index: stream.c =================================================================== RCS file: /usr/CVS/ibcs/iBCSemul/stream.c,v retrieving revision 1.4 diff -u -r1.4 stream.c --- stream.c 1995/07/03 12:51:54 1.4 +++ stream.c 1995/08/08 10:33:39 @@ -49,14 +49,19 @@ fd = (int)get_fs_long(((unsigned long *)regs->esp) + 1); if (!current->FD[fd] - || !(ino = current->FD[fd]->f_inode) - || !ino->i_sock) + || !(ino = current->FD[fd]->f_inode)) return -EBADF; - /* Ignore the /dev/spx device used for local X connections. */ - if (MINOR(ino->i_rdev) == 1) + /* Ignore the /dev/spx device used for local X connections + * and /dev/null (aka /dev/X0R). + */ + if (MINOR(ino->i_rdev) == 1 + || (MAJOR(ino->i_rdev) == 1 && MINOR(ino->i_rdev) == 3)) return 0; + if (!ino->i_sock) + return -EBADF; + #ifdef EMU_XTI return timod_getmsg(fd, ino, regs); #else @@ -74,13 +79,18 @@ fd = (int)get_fs_long(((unsigned long *)regs->esp) + 1); if (!current->FD[fd] - || !(ino = current->FD[fd]->f_inode) - || !ino->i_sock) + || !(ino = current->FD[fd]->f_inode)) return -EBADF; - /* Ignore the /dev/spx device used for local X connections. */ - if (MINOR(ino->i_rdev) == 1) + /* Ignore the /dev/spx device used for local X connections + * and /dev/null (aka /dev/X0R). + */ + if (MINOR(ino->i_rdev) == 1 + || (MAJOR(ino->i_rdev) == 1 && MINOR(ino->i_rdev) == 3)) return 0; + + if (!ino->i_sock) + return -EBADF; #ifdef EMU_XTI return timod_putmsg(fd, ino, regs);