[Top][All Lists]

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

Re: Passive versus active translators

From: Igor Khavkine
Subject: Re: Passive versus active translators
Date: Thu, 21 Jun 2001 19:05:02 -0400
User-agent: Mutt/1.3.18i

On Thu, Jun 21, 2001 at 06:01:00PM -0500, Neal H Walfield wrote:
> Using settrans to start an active translators sets up a completely
> different enviornment than that created when a file system launches a
> passive translator.  There are three main differences:
>       o File descriptors
>               - settrans: stderr is the user's tty
>               - libfshelp: nothing
You're right this difference is justifiable.
>       o Current working directory
>               - settrans: user's current working directory
>               - libfshelp: the directory in which we find the
>                 translator.
In the case of settrans it is logical to set the cwd of the translator
to the user's current cwd like for any other program the user runs. And
as for the second case, there's not much chioce but to start the
translator in the directory of the node. And it also makes sense,
think relative symlinks.
>       o User ids
>               - settrans: The euid and egid of the user that lauched
>                 settrans.
>               - libfshelp: The uid and gid of the node.
The user might not always (unlike root) have the ability change
the euid and egid of a process to those of an arbitrary node.
So the translator has to be started with the priviliges of the
user. And if a passive translator is started up with the
priveleges of the user that wakes it up it, it would be impossible
to implement some things that translators do already. For example
a filesystem translator has to run with the priveleges of the
underlying node, otherwise it would be unable to write any data
to store-nodes which have root-only write permissions.
>       o emit a warning if the translator is a relative path, e.g.
>         `settrans foo bar'.
That's a reasonable suggestion.
>       o use fshelp_start_translator_long instead of
>         fshelp_start_translator and sets the uid and gid to that of
>         the underlying node.
Like I mentioned above that's not always possible unless you're root.
>       o set the current working directory of the translator to that of
>         the directory of the translator.
It is usually the case that a translator resides in a directory full
of binaries (like /hurd). If it expects to find any sort of data
files in its cwd, it will certainly not find them in there.

I think that the differences between the use of settrans and the
waking of a passive translators differ in natural and necessary
ways. The differences are akin to the startup of any program by
a user, as opposed to automatic startup of a background daemon.


reply via email to

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