From: Hans Reiser <reiser@namesys.com>
To: George Beshers <gbeshers@comcast.net>
Cc: ReiserFS List <reiserfs-list@namesys.com>
Subject: Re: viewprinting: what format should views be stored in?
Date: Tue, 17 Aug 2004 19:22:24 -0700 [thread overview]
Message-ID: <4122BD60.2090601@namesys.com> (raw)
In-Reply-To: <412298E1.4080100@comcast.net>
George Beshers wrote:
>
> First, rereading my e-mails I realize that there was some thinking
> behind my questions
> which was only partially articulated. Going back to my earlier
> position which I will restate
> here as:
>
> /Use of a mask should never corrupt the semantics defined by the
> Single Unix
> Specification /*or*/ its practical derivations and extensions,
> e.g., BSD and Linux./
>
I expect to turn those semantics on their head within 3-5 years when we
do the semantic enhancements.
I think you should rephrase it as: we should not break any existing
program without getting something sufficiently worthwhile as a result,
and doing it with care.
> That is,/ ideally/ if I created a standalone system that "looked" like
> the system the mask
> provides then the process would behave equivalently. I emphasize
> ideally because to
> actually make that the case would require something closer to a
> virtual machine---which
> is clearly beyond the scope of this project.
>
> So I am looking for potential semantic anomalies which could be
> introduced by a
> mask over a reiser4 file system, i.e., border cases where some upfront
> awareness
> and attention may save re-design and re-writing later on.
>
>
> Hans Reiser wrote:
>
>>
>>> The issue is how the mask might change the semantics of
>>> sys_execve(). I have spent some time
>>> starting to trace code around, but more work is required.
>>>
>>> For the moment I think we are safe if the setuid and setgroup can
>>> not be altered by the mask.
>>
>>
>> Ok.
>
>
> For the moment I will focus on how the uid (and assume the group id
> will be similar)
> of a process and how the mask might lead to a different uid than would
> be expected
> under standard semantics.
I don't think you need to support the mask changing uids. Nice feature,
but let's keep it minimal for now. I think the whole issue of uid can
be sidestepped and ignored. You can, however, put 3 paragraphs in our
report discussing it as a theoretical issue, if you find it interesting
to ponder.
>
> So we agree that the process has an associated user: actually there is
> the concept
> of real and effective uid also.
>
> I believe the statement above to be true if the process never makes a
> setuid() system's call of
> one flavor or another because the uid is inherited from the process
> calling execev() or is determined
> by the owner of the executable if the executable's file set-uid
> permission bit is turned on via chmod.
>
>>>
>>> We only change the semantics if the real/effective uid or gid is
>>> different at some point in the
>>> processes execution because of the mask---begging situations where a
>>> call to setuid happens
>>> only if a certain file is not available.
>>
>>
>> Say more.
>
> If the process has the code like
>
> if (stat("/etc/foobar.conf", statbuf) < 0) {
> if (setuid(3) < 0) { /* Try to become sys */
> }
> /* Do something here */
> }
>
> And the mask hides "/etc/foobar.conf" then in fact the uid
> will change but *not unexpectedly*, IMO. The mask is
> creating a changed environment but the behavior is
> understandable from the source code.
>
> Put this another way, the semantics still seem correct to me
> because you are getting the behavior of "/etc/foobar.conf" actually
> not being there.
>
> Now that I think about it masking a named pipe or a lock file
> is perhaps more likely to cause problems then the setuid bit.
> More cogitation required... :-)
>
It is not our task to ensure the mask causes no problems due to a faulty
specification of it. It is merely our task to ensure that creating a
correct mask is well automated and easy.
George, trust me, the project will be a LOT more fun if we implement the
bare minimum and get it done early, and then after that spend the rest
of the time doing what amuses us.
For me, the big issue to decide at the start is, should a view
specification be implemented with a format that is as if it is a
subdirectory of the masked executable, and that the executable gets
chrooted to, and that uses all the semantic tree traversal code already
written by us.
I think the answer is yes, but I am going to think about it as I jog for
an hour. Please come up with arguments for and against it.
Hans
next prev parent reply other threads:[~2004-08-18 2:22 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-16 0:15 viewprinting: what format should views be stored in? Hans Reiser
2004-08-16 1:48 ` George Beshers
2004-08-16 2:02 ` Hans Reiser
2004-08-16 13:47 ` George Beshers
2004-08-16 19:50 ` George Beshers
2004-08-17 7:07 ` Hans Reiser
2004-08-17 19:29 ` George Beshers
2004-08-17 20:28 ` Hans Reiser
2004-08-17 23:46 ` George Beshers
2004-08-18 2:22 ` Hans Reiser [this message]
2004-08-18 2:37 ` viewprinting: what format should views be stored in? (let me quickly correct an imprecision) Hans Reiser
[not found] ` <4121F4D6.8090506@comcast.net>
2004-08-17 19:43 ` viewprinting: what format should views be stored in? Hans Reiser
-- strict thread matches above, loose matches on Subject: below --
2004-08-18 7:52 David Dabbs
2004-08-18 18:37 ` David Masover
2004-08-18 21:47 ` George Beshers
2004-08-18 19:20 ` George Beshers
2004-08-18 20:20 ` Hans Reiser
2004-08-18 21:44 ` George Beshers
2004-08-18 21:48 ` Hans Reiser
2004-08-18 23:18 ` George Beshers
2004-08-19 0:42 ` Hans Reiser
2004-08-19 2:01 ` George Beshers
2004-08-19 5:50 ` Hans Reiser
2004-08-19 12:48 ` George Beshers
2004-08-20 6:59 ` Hans Reiser
2004-08-20 12:36 ` George Beshers
2004-08-20 18:14 ` Hans Reiser
2004-08-20 21:42 ` George Beshers
2004-08-18 19:34 ` Hans Reiser
2004-08-19 7:40 David Dabbs
2004-08-19 11:21 ` David Greaves
2004-08-19 16:16 ` George Beshers
2004-08-20 6:19 ` Hans Reiser
2004-10-26 14:45 ` Lamont R. Peterson
2004-10-26 16:39 ` Hans Reiser
2004-10-26 16:57 ` George Beshers
2004-10-26 18:37 ` Hans Reiser
2004-10-26 20:20 ` George Beshers
2004-10-27 4:48 ` Hans Reiser
[not found] ` <4124D09A.1060208@comcast.net>
2004-08-19 17:31 ` David Greaves
2004-08-20 6:52 ` Hans Reiser
2004-08-20 12:08 ` George Beshers
2004-08-20 14:07 ` David Greaves
2004-10-26 15:54 ` Lamont R. Peterson
2004-10-27 1:04 ` David Masover
2004-08-20 6:13 ` Hans Reiser
2004-08-19 14:30 ` George Beshers
2004-08-20 7:23 David Dabbs
2004-08-20 16:10 ` Valdis.Kletnieks
2004-08-20 21:04 ` George Beshers
2004-08-21 6:42 ` Hans Reiser
2004-08-20 17:14 David Dabbs
2004-08-20 22:29 David Dabbs
2004-08-21 7:38 David Dabbs
2004-08-21 8:59 ` Hans Reiser
2004-08-21 20:48 David Dabbs
2004-08-22 5:45 David Dabbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4122BD60.2090601@namesys.com \
--to=reiser@namesys.com \
--cc=gbeshers@comcast.net \
--cc=reiserfs-list@namesys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.