Whamcloud - gitweb
LU-13975 sec: require enc key in case of O_CREAT only 83/39983/6
authorSebastien Buisson <sbuisson@ddn.com>
Mon, 21 Sep 2020 12:45:49 +0000 (12:45 +0000)
committerOleg Drokin <green@whamcloud.com>
Mon, 19 Oct 2020 03:13:37 +0000 (03:13 +0000)
commitf6daee15b2c8ecc0c994b6ad0ebf4fdb58738bd9
tree395ab8e6f37d935163dbf081e82ba93df04881c8
parent7c8ad11ef08f0f2f886004ae4a56f67722c16d5c
LU-13975 sec: require enc key in case of O_CREAT only

In ll_atomic_open(), do not return -ENOKEY when trying to open
either a directory or a file without the encryption key, unless
O_CREAT flag is specified.
Indeed, listing directory content is allowed even without the key.
And in case of regular file, ll_file_open() already checks for the
presence of an encryption key.

Improve sanity-sec test_54 to verify this is working properly.

Test-Parameters: testlist=sanity-sec envdefinitions=ONLY="36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 52 53 54" clientdistro=el8.1 fstype=ldiskfs mdscount=2 mdtcount=4
Test-Parameters: testlist=sanity-sec envdefinitions=ONLY="36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 52 53 54" clientdistro=el8.1 fstype=zfs mdscount=2 mdtcount=4
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I813d4ec938e00c8463b1d3ee9766d180806b40ba
Reviewed-on: https://review.whamcloud.com/39983
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/namei.c
lustre/tests/sanity-sec.sh