* changing permission()/vfs_permission... to work on dentry
@ 2003-05-28 20:43 Shaya Potter
2003-05-28 21:48 ` viro
0 siblings, 1 reply; 12+ messages in thread
From: Shaya Potter @ 2003-05-28 20:43 UTC (permalink / raw)
To: linux-fsdevel
I've gone through the entire fs/* vfs layer picking out every use of
permission to see if it can easily use the dentry instead, and it can
(list below showing that the dentry is readily available in every vfs
case)
The idea for converting it over would be to at first add 2 temporary
functions, entry_permission() and dentry_vfs_permission(), so that one
can proceed incrementally, and then to do a total change over by getting
rid of the old permission() and vfs_permission() and renaming the
temporary functions to the regular.
I'm making an assumption (perhaps dangerous) that the fs permission()
functions directly mirrors vfs_permission() (based only on experience w/
nfs filesystem) and therefore since fs permission() function is only
called from permission() (as vfs_permission() can also be) and therefore
would all be easy to switch over.
anyways, just want to make sure that I'm not missing anything.
thanks,
shaya
-------------------------
exec.c
------
sys_use_lib()
error = permission(nd.dentry->d_inode, MAY_READ | MAY_EXEC);
open_exec()
inode = nd.dentry->d_inode;
int err = permission(inode, MAY_EXEC);
flush_old_exec()
permission(bprm->file->f_dentry->d_inode,MAY_READ)
prepare_binprm()
doesn't work off of permission directly - why?
namei.c
-------
vfs_permission()
change option to take a dentry and get inode from that,
instead of taking inode directly.
permission()
same as vfs_permission()
path_walk()
inode = nd->dentry->d_inode;
err = permission(inode, MAY_EXEC);
lookup_hash(struct dentry * base)
inode = base->d_inode;
err = permission(inode, MAY_EXEC);
static inline int may_delete(struct inode *dir,struct dentry *victim,
int isdir)
error = permission(dir,MAY_WRITE | MAY_EXEC);
since
if (!victim->d_inode || victim->d_parent->d_inode != dir)
return -ENOENT;
shouldn't be an issue.
static inline int may_create(struct inode *dir, struct dentry *child)
return permission(dir,MAY_WRITE | MAY_EXEC);
seems to be the same as above
open_namei()
inode = dentry->d_inode;
error = permission(inode,acc_mode);
vfs_rename_dir()
error = permission(old_dentry->d_inode, MAY_WRITE);
namespace.c
-----------
mount_is_safe()
if (permission(nd->dentry->d_inode, MAY_WRITE))
open.c
------
do_sys_truncate()
inode = nd.dentry->d_inode;
error = permission(inode,MAY_WRITE);
sys_utime()
inode = nd.dentry->d_inode;
error = permission(inode,MAY_WRITE)
sys_utimes()
inode = nd.dentry->d_inode;
error = permission(inode,MAY_WRITE)
sys_access()
res = permission(nd.dentry->d_inode, mode);
sys_chdir()
error = permission(nd.dentry->d_inode,MAY_EXEC);
sys_fchdir()
inode = dentry->d_inode;
error = permission(inode, MAY_EXEC);
sys_chroot()
error = permission(nd.dentry->d_inode,MAY_EXEC);
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: changing permission()/vfs_permission... to work on dentry
2003-05-28 20:43 changing permission()/vfs_permission... to work on dentry Shaya Potter
@ 2003-05-28 21:48 ` viro
2003-05-28 22:34 ` Shaya Potter
0 siblings, 1 reply; 12+ messages in thread
From: viro @ 2003-05-28 21:48 UTC (permalink / raw)
To: Shaya Potter; +Cc: linux-fsdevel
On Wed, May 28, 2003 at 04:43:08PM -0400, Shaya Potter wrote:
> I've gone through the entire fs/* vfs layer picking out every use of
> permission to see if it can easily use the dentry instead, and it can
> (list below showing that the dentry is readily available in every vfs
> case)
Why not grep over the entire tree? That would've immediately show
at least 6 cases when we do _not_ have a dentry; 2 of them rather
nasty (floppy_open() in floppy.c/floppy98.c).
The real question is what the hell would you _do_ with dentry?
1) It's worthless without vfsmount - alone it does *NOT* determine the
pathname.
2) assuming that you've somehow got both vfsmount and dentry (and thus
enough information to find the pathnam), what will you do with it?
Anything that requires ->i_sem on ancestors is not an option - quite
often they will be already locked. Moreover, there is no warranty that
pathname won't change right under you - starting with the parent of
your dentry.
IOW, what's the real goal?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: changing permission()/vfs_permission... to work on dentry
2003-05-28 21:48 ` viro
@ 2003-05-28 22:34 ` Shaya Potter
2003-05-28 22:53 ` viro
0 siblings, 1 reply; 12+ messages in thread
From: Shaya Potter @ 2003-05-28 22:34 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel
On Wed, 2003-05-28 at 17:48, viro@parcelfarce.linux.theplanet.co.uk
wrote:
> On Wed, May 28, 2003 at 04:43:08PM -0400, Shaya Potter wrote:
> > I've gone through the entire fs/* vfs layer picking out every use of
> > permission to see if it can easily use the dentry instead, and it can
> > (list below showing that the dentry is readily available in every vfs
> > case)
>
> Why not grep over the entire tree? That would've immediately show
> at least 6 cases when we do _not_ have a dentry; 2 of them rather
> nasty (floppy_open() in floppy.c/floppy98.c).
well, floppy's aren't so much what I'm interested in, but that's a good
point. either the vfs would have to be changed or the permission/inode
interface would have to stay around. floppy_open (I believe) is just
called from the filp, which has access to the dentry, so it could be
passed in, but I'm not sure if restructering all that would be
worthwhile.
> The real question is what the hell would you _do_ with dentry?
>
> 1) It's worthless without vfsmount - alone it does *NOT* determine the
> pathname.
the kernel can always know the real vfsmount.
if you care about within a specific context, can use that too.
> 2) assuming that you've somehow got both vfsmount and dentry (and thus
> enough information to find the pathnam), what will you do with it?
> Anything that requires ->i_sem on ancestors is not an option - quite
> often they will be already locked. Moreover, there is no warranty that
> pathname won't change right under you - starting with the parent of
> your dentry.
need to think more about the issues you just brought up, the path
changing is what I'm mostly concerned about.
>
> IOW, what's the real goal?
Well, I want to be able to create a SubDomain like system that allows
one to run a process within a context that lets you specify an extra
layer of permissions on top of the underlying fs.
so my permission() would be something like
if ( (context = find_context(current->pid)) != NULL )
{
d_path(some denty, some vfsmount, scratch, size); to get full path
and_mode = get_mode(context, full_path);
real mode = inode mode & and_mode;
}
else
just do normal code.
I don't actually want this within the kernel, but be able to do it via
fs (aka module) support.
Basically the argument is that one has more information from the dentry
than just from the inode, and therefore it would make sense to expose
that information, as then things like modules could make use of it.
anyways, if there's a better way to do this, I'm all ears. I'm also
willing to do the restructuring myself, if you think there's some
benefit in it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: changing permission()/vfs_permission... to work on dentry
2003-05-28 22:34 ` Shaya Potter
@ 2003-05-28 22:53 ` viro
2003-05-29 0:33 ` Shaya Potter
0 siblings, 1 reply; 12+ messages in thread
From: viro @ 2003-05-28 22:53 UTC (permalink / raw)
To: Shaya Potter; +Cc: linux-fsdevel
On Wed, May 28, 2003 at 06:34:32PM -0400, Shaya Potter wrote:
> well, floppy's aren't so much what I'm interested in, but that's a good
> point. either the vfs would have to be changed or the permission/inode
> interface would have to stay around. floppy_open (I believe) is just
> called from the filp, which has access to the dentry, so it could be
> passed in, but I'm not sure if restructering all that would be
> worthwhile.
No, it doesn't. As the matter of fact it's always NULL. What's more,
you do not have _any_ pathname in a bunch of cases (open_by_devnum()).
> > The real question is what the hell would you _do_ with dentry?
> >
> > 1) It's worthless without vfsmount - alone it does *NOT* determine the
> > pathname.
>
> the kernel can always know the real vfsmount.
Define "real". There can be a lot of them and none are more real than
other - same situation as with dentries, actually (all links have the
same status; there is no "primary" one).
You'll need to propagate pointers to vfsmounts and it won't be pretty -
e.g. hpfs_unlink() calls permission() and passing vfsmount to ->unlink()
is just plain *wrong*.
> if you care about within a specific context, can use that too.
>
> > 2) assuming that you've somehow got both vfsmount and dentry (and thus
> > enough information to find the pathnam), what will you do with it?
> > Anything that requires ->i_sem on ancestors is not an option - quite
> > often they will be already locked. Moreover, there is no warranty that
> > pathname won't change right under you - starting with the parent of
> > your dentry.
>
> need to think more about the issues you just brought up, the path
> changing is what I'm mostly concerned about.
>
> >
> > IOW, what's the real goal?
>
> Well, I want to be able to create a SubDomain like system that allows
> one to run a process within a context that lets you specify an extra
> layer of permissions on top of the underlying fs.
>
> so my permission() would be something like
>
> if ( (context = find_context(current->pid)) != NULL )
> {
> d_path(some denty, some vfsmount, scratch, size); to get full path
> and_mode = get_mode(context, full_path);
>
> real mode = inode mode & and_mode;
Erm. Based on a _pathname_? I.e. just on a string?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: changing permission()/vfs_permission... to work on dentry
2003-05-28 22:53 ` viro
@ 2003-05-29 0:33 ` Shaya Potter
2003-05-29 12:25 ` Jan Hudec
2003-05-29 12:40 ` Lucas Correia Villa Real
0 siblings, 2 replies; 12+ messages in thread
From: Shaya Potter @ 2003-05-29 0:33 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel
On Wed, 2003-05-28 at 18:53, viro@parcelfarce.linux.theplanet.co.uk
wrote:
> On Wed, May 28, 2003 at 06:34:32PM -0400, Shaya Potter wrote:
>
> > well, floppy's aren't so much what I'm interested in, but that's a good
> > point. either the vfs would have to be changed or the permission/inode
> > interface would have to stay around. floppy_open (I believe) is just
> > called from the filp, which has access to the dentry, so it could be
> > passed in, but I'm not sure if restructering all that would be
> > worthwhile.
>
> No, it doesn't. As the matter of fact it's always NULL. What's more,
> you do not have _any_ pathname in a bunch of cases (open_by_devnum()).
ok, this is a learning experience.
> > > The real question is what the hell would you _do_ with dentry?
> > >
> > > 1) It's worthless without vfsmount - alone it does *NOT* determine the
> > > pathname.
> >
> > the kernel can always know the real vfsmount.
>
> Define "real". There can be a lot of them and none are more real than
> other - same situation as with dentries, actually (all links have the
> same status; there is no "primary" one).
well real depends on what you want. Take for instance the example I
gave w/ the context, the context can contain a vfsmount, which you then
use.
>
> You'll need to propagate pointers to vfsmounts and it won't be pretty -
> e.g. hpfs_unlink() calls permission() and passing vfsmount to ->unlink()
> is just plain *wrong*.
one doesn't have to. permission() figures out calling process
(current->uid), figures out calling processes context.
>
> > if you care about within a specific context, can use that too.
> >
> > > 2) assuming that you've somehow got both vfsmount and dentry (and thus
> > > enough information to find the pathnam), what will you do with it?
> > > Anything that requires ->i_sem on ancestors is not an option - quite
> > > often they will be already locked. Moreover, there is no warranty that
> > > pathname won't change right under you - starting with the parent of
> > > your dentry.
> >
> > need to think more about the issues you just brought up, the path
> > changing is what I'm mostly concerned about.
> >
> > >
> > > IOW, what's the real goal?
> >
> > Well, I want to be able to create a SubDomain like system that allows
> > one to run a process within a context that lets you specify an extra
> > layer of permissions on top of the underlying fs.
> >
> > so my permission() would be something like
> >
> > if ( (context = find_context(current->pid)) != NULL )
> > {
> > d_path(some denty, some vfsmount, scratch, size); to get full path
> > and_mode = get_mode(context, full_path);
> >
> > real mode = inode mode & and_mode;
>
> Erm. Based on a _pathname_? I.e. just on a string?
yes. The issue we are trying to solve (much like SubDomain
http://www.immunix.org/subdomain.html) is that you have a single fs, but
not every application needs access to that entire namespace, but from an
administrative point of view, its easier to deal w/ a single namespace.
For instance, sendmail doesn't need /bin/sh, it be fairly hard to
administrate a sendmail box that didn't have it though. If there's no
/bin/sh in the processes "namespace" (used loosely, as in mode 000 to it
and even uid 0 processes) the ability to get a root shell is limited.
The problem is, one would have a problem storing all this attribute data
for every file in a system as there can be many contexts. If one can
store the rules instead and use "string compares" (well, not really
string compares as that could be too slow) one can partition off the
applications.
So why not chroot? well, it doesn't work so well for uid 0 apps, as
they can chroot themselves again. and even if that wasn't an issue, one
isn't operating under a single namespace anymore so it makes
administration harder.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: changing permission()/vfs_permission... to work on dentry
@ 2003-05-29 0:55 viro
2003-05-29 4:20 ` Shaya Potter
0 siblings, 1 reply; 12+ messages in thread
From: viro @ 2003-05-29 0:55 UTC (permalink / raw)
To: linux-fsdevel
On Wed, May 28, 2003 at 08:29:13PM -0400, Shaya Potter wrote:
> > Define "real". There can be a lot of them and none are more real than
> > other - same situation as with dentries, actually (all links have the
> > same status; there is no "primary" one).
>
> well real depends on what you want. Take for instance the example I
> gave w/ the context, the context can contain a vfsmount, which you then
> use.
touch /tmp/zero && mount --bind /dev/zero /tmp/zero
After that we have a vfsmount mounted on /tmp/zero and pointing to
superblock of root filesystem and dentry of dev/zero from it.
Both /tmp/zero and /dev/zero will resolve to the same inode (and same
dentry, for that matter). vfsmounts are different and both are obviously
visible to your process.
Which one is "real"? What's more, I can e.g. mount ramfs on /mnt,
then bind it on /tmp/foo and /tmp/bar and umount /mnt. After that
we have the same tree mounted twice and original vfsmount already
gone. Which one is real - one for /tmp/foo or one for /tmp/bar?
> > You'll need to propagate pointers to vfsmounts and it won't be pretty -
> > e.g. hpfs_unlink() calls permission() and passing vfsmount to ->unlink()
> > is just plain *wrong*.
>
> one doesn't have to. permission() figures out calling process
> (current->uid), figures out calling processes context.
See above.
> yes. The issue we are trying to solve (much like SubDomain
> http://www.immunix.org/subdomain.html) is that you have a single fs, but
> not every application needs access to that entire namespace, but from an
> administrative point of view, its easier to deal w/ a single namespace.
> For instance, sendmail doesn't need /bin/sh, it be fairly hard to
> administrate a sendmail box that didn't have it though. If there's no
> /bin/sh in the processes "namespace" (used loosely, as in mode 000 to it
So give it a _REAL_ namespace. And bind /dev/null over /bin/sh in it.
And revoke the capability to call mount(2) and umount(2). End of story.
> and even uid 0 processes) the ability to get a root shell is limited.
And why would I need a /bin/sh binary if I'd already acquired control over
a process that runs with UID 0?
Anyway, judging by the description on immunix.org, it looks fairly useless
these days. We can trivially do the same without any kernel extensions:
| * A SubDomain is easier to construct than a chroot environment.
| Instead of copying everything required for the program to run into
| the chroot jail, SubDomain only requires that the files be
| specified in the /etc/subdomain entry.
Yes, and...? clone() with CLONE_NEWNS, bind whatever you want wherever
you feel like and you are done.
| * SubDomain can share files with the rest of the system. Files in a
| chroot jail are effectively isolated from the rest of the system.
| They should not be hard- or sym-linked to files outside the chroot
| jail, because they may provide an escape route. In contrast,
| SubDomain allows flexible sharing with the rest of the system;
| each file accessed also specifies the access modes (read, write,
| and execute) that may be used.
<shrug> aside of the last bit, everything still applies. Per-mountpoint
read_only is wort doing (and would cover the rest), but it can get tricky.
Basically, you need IS_RDONLY() taking vfsmount and looking both into
superblock and vfsmount flags. Then the same game with propagating
new argument to all callers.
| * SubDomain descriptions can be distributed. To distribute a
| program along with its SubDomain jail, one need only package the
| SubDomain specification along with the program. In contrast,
| distributing a chroot jail is problematic; the files to be placed
| in the chroot jail must actually be included in the package, and
| are not consistent with the files on the system where they are
| installed. In other words, SubDomain distributes a jail by
| reference, while chroot distributes a jail by value.
Ditto for namespaces.
Comparison with FPOSIX crapabilities also applies, obviously.
----- End forwarded message -----
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: changing permission()/vfs_permission... to work on dentry
2003-05-29 0:55 viro
@ 2003-05-29 4:20 ` Shaya Potter
2003-05-29 4:38 ` Chris Wright
0 siblings, 1 reply; 12+ messages in thread
From: Shaya Potter @ 2003-05-29 4:20 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel
On Wed, 2003-05-28 at 20:55, viro@parcelfarce.linux.theplanet.co.uk
wrote:
> So give it a _REAL_ namespace. And bind /dev/null over /bin/sh in it.
> And revoke the capability to call mount(2) and umount(2). End of story.
The issue w/ the fs namespaces the kernel supports (at least AFAI
understand them) is that you can't change the underlying permission
model.
so for example, an "apache namespace" you might want it to only have
read only access to everything besides a few files in /var/log. Can one
do that w/ namespaces?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: changing permission()/vfs_permission... to work on dentry
2003-05-29 4:20 ` Shaya Potter
@ 2003-05-29 4:38 ` Chris Wright
2003-05-29 8:27 ` viro
0 siblings, 1 reply; 12+ messages in thread
From: Chris Wright @ 2003-05-29 4:38 UTC (permalink / raw)
To: Shaya Potter; +Cc: viro, linux-fsdevel
* Shaya Potter (spotter@cs.columbia.edu) wrote:
> On Wed, 2003-05-28 at 20:55, viro@parcelfarce.linux.theplanet.co.uk
> wrote:
> > So give it a _REAL_ namespace. And bind /dev/null over /bin/sh in it.
> > And revoke the capability to call mount(2) and umount(2). End of story.
>
> The issue w/ the fs namespaces the kernel supports (at least AFAI
> understand them) is that you can't change the underlying permission
> model.
yes, you are still stuck with inode mode bits and DAC. you can improve this
with some MAC element, like using LSM, but this will not override the
existing DAC decision, only further restrict it. and you need to either
label the inode with an extended attribute or try and deal with
pathnames as you've already mentioned.
> so for example, an "apache namespace" you might want it to only have
> read only access to everything besides a few files in /var/log. Can one
> do that w/ namespaces?
true. per-mountpoint read-only would allow you to create a namespace
to do this. however, this gets back to changing permission() to taking
vfsmount (or likely just nameidata) so that the IS_RDONLY() check could
see mountpoint specific flags as well as the super_block flags. as i'm
sure you've found, this changes a lot of code ;-)
cheers,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: changing permission()/vfs_permission... to work on dentry
2003-05-29 4:38 ` Chris Wright
@ 2003-05-29 8:27 ` viro
0 siblings, 0 replies; 12+ messages in thread
From: viro @ 2003-05-29 8:27 UTC (permalink / raw)
To: Chris Wright; +Cc: Shaya Potter, linux-fsdevel
On Wed, May 28, 2003 at 09:38:09PM -0700, Chris Wright wrote:
> true. per-mountpoint read-only would allow you to create a namespace
> to do this. however, this gets back to changing permission() to taking
> vfsmount (or likely just nameidata) so that the IS_RDONLY() check could
> see mountpoint specific flags as well as the super_block flags. as i'm
> sure you've found, this changes a lot of code ;-)
It would, if you had to pass vfsmount into the thing. The Right Way(tm)
would be to move that check out to the places where we still have vfsmount
instead. And that leads to interesting things around remount semantics -
see another posting for details.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: changing permission()/vfs_permission... to work on dentry
2003-05-29 0:33 ` Shaya Potter
@ 2003-05-29 12:25 ` Jan Hudec
2003-05-29 12:41 ` viro
2003-05-29 12:40 ` Lucas Correia Villa Real
1 sibling, 1 reply; 12+ messages in thread
From: Jan Hudec @ 2003-05-29 12:25 UTC (permalink / raw)
To: Shaya Potter; +Cc: viro, linux-fsdevel
On Wed, May 28, 2003 at 08:33:27PM -0400, Shaya Potter wrote:
> On Wed, 2003-05-28 at 18:53, viro@parcelfarce.linux.theplanet.co.uk
> wrote:
> > Erm. Based on a _pathname_? I.e. just on a string?
>
> yes. The issue we are trying to solve (much like SubDomain
> http://www.immunix.org/subdomain.html) is that you have a single fs, but
> not every application needs access to that entire namespace, but from an
> administrative point of view, its easier to deal w/ a single namespace.
> For instance, sendmail doesn't need /bin/sh, it be fairly hard to
> administrate a sendmail box that didn't have it though. If there's no
> /bin/sh in the processes "namespace" (used loosely, as in mode 000 to it
> and even uid 0 processes) the ability to get a root shell is limited.
>
> The problem is, one would have a problem storing all this attribute data
> for every file in a system as there can be many contexts. If one can
> store the rules instead and use "string compares" (well, not really
> string compares as that could be too slow) one can partition off the
> applications.
>
> So why not chroot? well, it doesn't work so well for uid 0 apps, as
> they can chroot themselves again. and even if that wasn't an issue, one
> isn't operating under a single namespace anymore so it makes
> administration harder.
Perhaps it's a stupid idea, but couldn't you resolve the names to inode
numbers first (though it would require checking when something happens
to those inodes)? I would expect you need to make the file (eg. shell)
unaccessible and not just one of it's dentries (eg. /bin/sh).
Perhaps this would be solved by the intent patches anyway. Since the
intent should be passed to all the methods, it should make it to
permission too. And since it will probably be boud to nameidata, it
would include everything (even the vfsmount).
-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <bulb@ucw.cz>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: changing permission()/vfs_permission... to work on dentry
2003-05-29 0:33 ` Shaya Potter
2003-05-29 12:25 ` Jan Hudec
@ 2003-05-29 12:40 ` Lucas Correia Villa Real
1 sibling, 0 replies; 12+ messages in thread
From: Lucas Correia Villa Real @ 2003-05-29 12:40 UTC (permalink / raw)
To: linux-fsdevel
On Wednesday 28 May 2003 21:33, Shaya Potter wrote:
> yes. The issue we are trying to solve (much like SubDomain
> http://www.immunix.org/subdomain.html) is that you have a single fs, but
> not every application needs access to that entire namespace, but from an
> administrative point of view, its easier to deal w/ a single namespace.
> For instance, sendmail doesn't need /bin/sh, it be fairly hard to
> administrate a sendmail box that didn't have it though. If there's no
> /bin/sh in the processes "namespace" (used loosely, as in mode 000 to it
> and even uid 0 processes) the ability to get a root shell is limited.
>
> The problem is, one would have a problem storing all this attribute data
> for every file in a system as there can be many contexts. If one can
> store the rules instead and use "string compares" (well, not really
> string compares as that could be too slow) one can partition off the
> applications.
>
> So why not chroot? well, it doesn't work so well for uid 0 apps, as
> they can chroot themselves again. and even if that wasn't an issue, one
> isn't operating under a single namespace anymore so it makes
> administration harder.
Hi,
Can't this be implemented as a stackable filesystem instead? I guess this
stuff can be handled on VFS.
Lucas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: changing permission()/vfs_permission... to work on dentry
2003-05-29 12:25 ` Jan Hudec
@ 2003-05-29 12:41 ` viro
0 siblings, 0 replies; 12+ messages in thread
From: viro @ 2003-05-29 12:41 UTC (permalink / raw)
To: Jan Hudec, Shaya Potter, linux-fsdevel
On Thu, May 29, 2003 at 02:25:48PM +0200, Jan Hudec wrote:
> Perhaps it's a stupid idea, but couldn't you resolve the names to inode
> numbers first (though it would require checking when something happens
> to those inodes)? I would expect you need to make the file (eg. shell)
> unaccessible and not just one of it's dentries (eg. /bin/sh).
If you have bogus links sitting around, you might very well have bogus
copies too.
> Perhaps this would be solved by the intent patches anyway. Since the
> intent should be passed to all the methods, it should make it to
> permission too. And since it will probably be boud to nameidata, it
> would include everything (even the vfsmount).
Filesystem methods should _not_ depend on the instance they are working
on. IOW, control over namespace does not belong to fs - it doesn't get
to decide where it's mounted and it certainly doesn't get to work in
different ways depending on where it's mounted. All such stuff belongs
to VFS and nowhere else.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-05-29 15:27 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-28 20:43 changing permission()/vfs_permission... to work on dentry Shaya Potter
2003-05-28 21:48 ` viro
2003-05-28 22:34 ` Shaya Potter
2003-05-28 22:53 ` viro
2003-05-29 0:33 ` Shaya Potter
2003-05-29 12:25 ` Jan Hudec
2003-05-29 12:41 ` viro
2003-05-29 12:40 ` Lucas Correia Villa Real
-- strict thread matches above, loose matches on Subject: below --
2003-05-29 0:55 viro
2003-05-29 4:20 ` Shaya Potter
2003-05-29 4:38 ` Chris Wright
2003-05-29 8:27 ` viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox