Whamcloud - gitweb
LU-1778 llite: fix inconsistencies of root squash feature 00/5700/19
authorGregoire Pichon <gregoire.pichon@bull.net>
Thu, 13 Feb 2014 15:33:34 +0000 (16:33 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 9 May 2014 14:55:56 +0000 (14:55 +0000)
commit3064318df90ce7019b83c8a7f80e93a9634c00fa
tree8bd24562d385f2b7fc872ac549cb62e9a3187d72
parent7c243a561ffe8503a6abf5c4cafef0c3566192bc
LU-1778 llite: fix inconsistencies of root squash feature

Root squash exhibits inconsistent behaviour on a client when
enabled. If a file is not cached on the client, then root will get
a permission denied error when accessing the file. When
the file has recently been accessed by a regular user and is
still in cache, root will be able to access the file without error
because the permission check is only done by the client that
isn't aware of root squash.

While the only real security benefit from root squash is to deny
clients access to files owned by root itself, it also makes sense
to treat file access on the client in a consistent manner
regardless of whether the file is in cache or not.

This patch adds root squash settings to llite so that client is able
to apply root squashing when it is relevant.

Configuration of MDT root squash settings will automatically be
applied to llite config log as well.

Update cfs_str2num_check() routine by removing any modification
of the specified string parameter. Since string can come from ls_str
field of a lstr structure, this avoids inconsistent ls_len field.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: Ie52d04424d0937af9fed777a4e4912c90405c19b
Reviewed-on: http://review.whamcloud.com/5700
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
14 files changed:
libcfs/libcfs/libcfs_string.c
lustre/include/lprocfs_status.h
lustre/include/obd_class.h
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/lproc_llite.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_lib.c
lustre/mdt/mdt_lproc.c
lustre/mgs/mgs_llog.c
lustre/obdclass/lprocfs_status.c
lustre/tests/conf-sanity.sh