Index: hurd-0.6/trans/fakeroot.c =================================================================== --- hurd-0.6.orig/trans/fakeroot.c +++ hurd-0.6/trans/fakeroot.c @@ -450,6 +450,39 @@ netfs_S_dir_lookup (struct protid *dirus return err; } +/* The user must define this function. Attempt to turn locked node NP + (user USER) into a socket with target NAME. */ +error_t +netfs_S_file_set_translator (struct protid *user, + int passive_flags, int active_flags, + int killtrans_flags, char *passive, + mach_msg_type_number_t passivelen, + mach_port_t active) +{ + struct node *np; + + if (!user) + return EOPNOTSUPP; + + if (!(passive_flags & FS_TRANS_SET) && !(active_flags & FS_TRANS_SET)) + return 0; + + if (passivelen && passive[passivelen - 1]) + return EINVAL; + + np = user->po->np; + + char trans[sizeof _HURD_IFSOCK + passivelen]; + memcpy (trans, _HURD_IFSOCK, sizeof _HURD_IFSOCK); + memcpy (&trans[sizeof _HURD_IFSOCK], passive, passivelen); + return file_set_translator (netfs_node_netnode (np)->file, + FS_TRANS_EXCL|FS_TRANS_SET, + FS_TRANS_EXCL|FS_TRANS_SET, 0, + trans, sizeof trans, + MACH_PORT_NULL, MACH_MSG_TYPE_COPY_SEND); +} + + /* These callbacks are used only by the standard netfs_S_dir_lookup, which we do not use. But the shared library requires us to define them. */ error_t