Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Jan 2003 20:01:53 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        David Schultz <dschultz@uclink.Berkeley.EDU>
Cc:        Pawel Jakub Dawidek <P.Dawidek@prioris.mini.pw.edu.pl>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Caching [sugestion].
Message-ID:  <3E1A5131.FE6B7AE6@mindspring.com>
References:  <20030105215024.GB99855@prioris.mini.pw.edu.pl> <3E18B97A.32ABAE7@mindspring.com> <20030106074005.GB6825@prioris.mini.pw.edu.pl> <20030106163723.GA721@HAL9000.homeunix.com> <20030106233427.GC6825@prioris.mini.pw.edu.pl> <20030107002205.GA655@HAL9000.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
David Schultz wrote:
> Thus spake Pawel Jakub Dawidek <P.Dawidek@prioris.mini.pw.edu.pl>:
> I'm not sure what you mean by ``temporary names''.  Do you mean
> that your policy specification permits wildcards in any pathname
> component?  In that case, you might have to hack the lookup
> routines to point to all the possible rule matches as you iterate
> down the pathname, so by the time you have a vnode, you also know
> what rules match.  Scary.

It will work, but he will have to implement mandatory locking
for directory entries (minimally), if he insists on doing it by
name, rather than by dev_t/ino_t pair.

Realize that it's actually trivial to do dev_t/ino_t/dev_t/ino_t
for "inode in directory".  FreeBSD does not permit hard links on
directories, and directories already cache parent directories, as
their ".." entry.  So you can (effectively) implement absolute
pathing, as long as inherited rights deal *only* with the directories,
and not with the files themselves (unlike NetWare).

But mandatory locking for the terminal directory entry is still a
requirement, since otherwise, you can still create/open/unlink...close,
and before the close, you can subvert any by-name MACs you try to apply.


> Keep in mind that if you're willing to bite the performance
> bullet, you may be able to implement a userland solution far
> more easily.
> 
>         http://www.cs.berkeley.edu/~daw/janus/

This is a good reference.  If this is just a student project, and
not a commercial product, doing the work in user space is probably
the way to go.  If it's supposed to be commercial, I don't see any
way around at least minimally modifying the FS.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E1A5131.FE6B7AE6>