lkml.org 
[lkml]   [2000]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: (reiserfs) Re: NFSv4 ACLs (was: ...ACL's and reiser...)
Date

> -----Original Message-----
> From: Xuan Baldauf [mailto:xuan--reiserfs@baldauf.org]
>
> How is it done now? If some process chroots to /dir1/dir2, and tries to access
> /dir1/dir2/file, does the access succeed or fail after a "chmod 000 /dir1"? Is the
> current behaviour not incorrect, too?
---
Under the current policy, the 'open', if the 'chrooted' user tried to
access /dir1/dir2/file, they would get 'file not found', since for them,
'/dir1' doesn't exist. They can successfully open the file with '/dir2/file'
or if their CWD=dir2, './file' or 'file' will also work.

To me, since user 'x' doesn't know about /dir1, the current behavior
seems consistent.

2nd case: Suppose chroot isn't done, but the user's CWD=dir2, and you
change access to /dir1 as above, then the user can open './file' and 'file',
but not '/dir1/dir2/file'.

Before you say that is correct or incorrect, consider this:

The inode referenced by '/dir1/dir2/file' can also be referenced (hard link)
by '/dir3/file'. The user's CWD is /dir3. Someone prohibits access to
/dir1. You don't want the permissions on 'file' changed (unless you did a
-R) or the /dir3/file reference would improperly fail.

Currently, when opening 'file', open checks access on the inode corresponding
to 'file'. To implement inheritability, you would have to reference the
user's CWD each time to create an absolute path back to the root then
walk that pathname.

I believe that negative performance impact would outweigh any benefits
in this case.

Another issue to consider in deciding a subjective 'correctness':

Consider under currrent policy, user CWD="/dir1/dir2/dir3".
File to access is "/dir1/dir4/file".
Someone prohibits access to 'dir2'. If user uses an absolute pathname they
will be 'ok', but if they use a relative pathname, "../../dir4/file" the
open will fail.

Which resolution method provides the user with 'least' surprise? If
dir1 is really under /dirA/dirB/dirC[...]/dirZ, which do you think will
provide the best performance / feature set -- resolving from 'root' using
user's CWD, or resolving from relative pathename?

-l

--
Linda A Walsh | Trust Technology, Core Linux, SGI
law@sgi.com | Voice: (650) 933-5338


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:1.986 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site