summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trans/Makefile5
-rw-r--r--trans/ifsock.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/trans/Makefile b/trans/Makefile
index e74a8692..a2942820 100644
--- a/trans/Makefile
+++ b/trans/Makefile
@@ -37,6 +37,11 @@ password-MIGSFLAGS=\
"-DIO_DESTRUCTOR=trivfs_end_using_protid (trivfs_protid_t)" \
"-DPASSWORD_IMPORTS=import \"../libtrivfs/mig-decls.h\";"
+ifsock-MIGSFLAGS=\
+ "-DFILE_INTRAN=trivfs_protid_t trivfs_begin_using_protid (io_t)" \
+ "-DFILE_DESTRUCTOR=trivfs_end_using_protid (trivfs_protid_t)" \
+ "-DIFSOCK_IMPORTS=import \"../libtrivfs/mig-decls.h\";"
+
include ../Makeconf
vpath elfcore.c $(top_srcdir)/exec
diff --git a/trans/ifsock.c b/trans/ifsock.c
index 092bb40d..4ed65898 100644
--- a/trans/ifsock.c
+++ b/trans/ifsock.c
@@ -131,15 +131,15 @@ trivfs_goaway (struct trivfs_control *fsys, int flags)
}
error_t
-S_ifsock_getsockaddr (file_t sockfile,
+S_ifsock_getsockaddr (struct trivfs_protid *cred,
mach_port_t *address)
{
- struct trivfs_protid *cred = ports_lookup_port (port_bucket, sockfile,
- node_class);
int perms;
error_t err;
- if (!cred)
+ if (!cred
+ || cred->pi.bucket != port_bucket
+ || cred->pi.class != node_class)
return EOPNOTSUPP;
err = file_check_access (cred->realnode, &perms);
@@ -148,6 +148,5 @@ S_ifsock_getsockaddr (file_t sockfile,
if (!err)
*address = address_port;
- ports_port_deref (cred);
return err;
}