From 0da2914ac9d9321cca2d402b2c505881e436c725 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 20 Mar 2016 22:27:44 +0100 Subject: pflocal: Add support for access() on pipes bash's '<(' helper creates a pipe and gives /dev/fd/63 to the program, and gcc would then run access() on it. So we actually need to support at least some FS operations on pipes. * pflocal/fs.c: New file. * pflocal/mig-mutate.h (FILE_INTRAN, FILE_INTRAN_PAYLOAD, FILE_DESTRUCTOR, FILE_IMPORTS): New macros. * pflocal/sserver.c: Include "fs_S.h". (sock_demuxer): Call fs_server_routine. * pflocal/Makefile (SRCS): Add fs.c. (MIGSTUBS): Add fsServer.o. --- pflocal/sserver.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pflocal/sserver.c') diff --git a/pflocal/sserver.c b/pflocal/sserver.c index 7df69a41..e500a75f 100644 --- a/pflocal/sserver.c +++ b/pflocal/sserver.c @@ -33,6 +33,7 @@ static int sock_server_active = 0; static pthread_spinlock_t sock_server_active_lock = PTHREAD_SPINLOCK_INITIALIZER; #include "io_S.h" +#include "fs_S.h" #include "socket_S.h" #include "../libports/interrupt_S.h" #include "../libports/notify_S.h" @@ -43,6 +44,7 @@ sock_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp) { mig_routine_t routine; if ((routine = io_server_routine (inp)) || + (routine = fs_server_routine (inp)) || (routine = socket_server_routine (inp)) || (routine = ports_interrupt_server_routine (inp)) || (routine = ports_notify_server_routine (inp))) -- cgit v1.2.3