diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-06-30 00:21:34 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-06-30 00:21:34 +0000 |
commit | 3917ac5846dd0f9ad1238166f90caab9912052e6 (patch) | |
tree | 1c298935def4f29edb39192365a65d73de999155 /fs/namei.c | |
parent | af2f803c8b2d469fe38e4a7ce952658dfcb6681a (diff) |
o Merge with Linux 2.1.100.
o Cleanup the machine dependencies of floppy and rtc. The driver for
the Dallas thingy in the Indy is still missing.
o Handle allocation of zero'd pages correct for R4000SC / R4400SC.
o Page colouring shit to match the virtual and physical colour of all
mapped pages. This tends to produce extreme fragmentation problems,
so it's deactivated for now. Users of R4000SC / R4400SC may re-enable
the code in arch/mips/mm/init.c by removing the definition of
CONF_GIVE_A_SHIT_ABOUT_COLOURS. Should get them somewhat further -
but don't shake to hard ...
o Fixed ptrace(2)-ing of syscalls, strace is now working again.
o Fix the interrupt forwarding from the keyboard driver to the psaux
driver, PS/2 mice are now working on the Indy. The fix is somewhat
broken as it prevents generic kernels for Indy and machines which handle
things different.
o Things I can't remember.
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/fs/namei.c b/fs/namei.c index a6de99ead..04ebe1fd9 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -43,17 +43,24 @@ * * The new code replaces the old recursive symlink resolution with * an iterative one (in case of non-nested symlink chains). It does - * this by looking up the symlink name from the particular filesystem, - * and then follows this name as if it were a user-supplied one. This - * is done solely in the VFS level, such that <fs>_follow_link() is not - * used any more and could be removed in future. As a side effect, - * dir_namei(), _namei() and follow_link() are now replaced with a single - * function lookup_dentry() that can handle all the special cases of the former - * code. + * this with calls to <fs>_follow_link(). + * As a side effect, dir_namei(), _namei() and follow_link() are now + * replaced with a single function lookup_dentry() that can handle all + * the special cases of the former code. * * With the new dcache, the pathname is stored at each inode, at least as * long as the refcount of the inode is positive. As a side effect, the * size of the dcache depends on the inode cache and thus is dynamic. + * + * [29-Apr-1998 C. Scott Ananian] Updated above description of symlink + * resolution to correspond with current state of the code. + * + * Note that the symlink resolution is not *completely* iterative. + * There is still a significant amount of tail- and mid- recursion in + * the algorithm. Also, note that <fs>_readlink() is not used in + * lookup_dentry(): lookup_dentry() on the result of <fs>_readlink() + * may return different results than <fs>_follow_link(). Many virtual + * filesystems (including /proc) exhibit this behavior. */ /* [24-Feb-97 T. Schoebel-Theuer] Side effects caused by new implementation: @@ -191,8 +198,13 @@ int permission(struct inode * inode,int mask) mode >>= 6; else if (in_group_p(inode->i_gid)) mode >>= 3; - if (((mode & mask & 0007) == mask) || fsuser()) + if (((mode & mask & S_IRWXO) == mask) || capable(CAP_DAC_OVERRIDE)) return 0; + /* read and search access */ + if ((mask == S_IROTH) || + (S_ISDIR(mode) && !(mask & ~(S_IROTH | S_IXOTH)))) + if (capable(CAP_DAC_READ_SEARCH)) + return 0; return -EACCES; } @@ -699,7 +711,7 @@ asmlinkage int sys_mknod(const char * filename, int mode, dev_t dev) lock_kernel(); error = -EPERM; - if (S_ISDIR(mode) || (!S_ISFIFO(mode) && !fsuser())) + if (S_ISDIR(mode) || (!S_ISFIFO(mode) && !capable(CAP_SYS_ADMIN))) goto out; error = -EINVAL; switch (mode & S_IFMT) { |