summaryrefslogtreecommitdiff
path: root/trans/ifsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'trans/ifsock.c')
-rw-r--r--trans/ifsock.c9
1 files changed, 4 insertions, 5 deletions
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;
}