Whamcloud - gitweb
LU-1778 llite: fix inconsistencies of root squash feature 44/10744/4
authorGregoire Pichon <gregoire.pichon@bull.net>
Wed, 18 Jun 2014 09:18:00 +0000 (11:18 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 1 Dec 2014 04:16:00 +0000 (04:16 +0000)
commitd82b4f54cbbe269519330e88639dd8e197636496
tree5e17d33561587f9ec5ad6716e1276935efd3728b
parent57a8a6bec4dc965388b5bba48e7501f79bdab44b
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.

Lustre-change: http://review.whamcloud.com/5700
Lustre-commit: 3064318df90ce7019b83c8a7f80e93a9634c00fa

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: Ib94a1a4a63c62c434a76bb935faad0fbdfddfec3
Reviewed-on: http://review.whamcloud.com/10744
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@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