[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: [PATCH] Re: Test case for fakeroot-hurd failure with a socket

From: Samuel Thibault
Subject: Re: RFC: [PATCH] Re: Test case for fakeroot-hurd failure with a socket
Date: Wed, 13 May 2015 09:57:27 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Svante Signell, le Wed 13 May 2015 09:35:28 +0200, a écrit :
> Q: Why does it work without fakeroot-hurd?

You mean on a bare filesystem?

They use libdiskfs, which implements diskfs_S_file_set_translator, which
calls diskfs_set_translator, which is implemented by filesystems.

And the filesystems which don't use libdiskfs but libnetfs quite often
don't implement netfs_set_translator indeed, and then sockets can't be
made on them, but that's usually not a problem since that's /proc,
/dev/vcs, etc.

> +/* The user may define this function.  Attempt to set the passive
> +   translator record for FILE to ARGZ (of length ARGZLEN) for user
> +   CRED. */
> +error_t
> +netfs_set_translator (struct iouser *cred, struct node *np,
> +                   char *argz, size_t argzlen)
> +{
> +  return file_set_translator (netfs_node_netnode (np)->file,
> +                           FS_TRANS_EXCL|FS_TRANS_SET,
> +                           FS_TRANS_EXCL|FS_TRANS_SET, 0,
> +                           argz, argzlen,
> +                           MACH_PORT_NULL, MACH_MSG_TYPE_COPY_SEND);
> +}

Mmm, I don't think you want to set the active_flags parameter, see the
comment above: netfs_S_file_set_translator will have already set the
active translator thanks to its fshelp_set_active call, so only the
passive translator should be set here.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]