diff options
| author | Jackie Huang <jackie.huang@windriver.com> | 2017-05-24 10:22:36 +0800 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2017-06-01 08:01:34 -0700 |
| commit | 37c47c164e4d02e6e9b1c106a73695e8a0094c30 (patch) | |
| tree | 45ce1ecb1cadcdb38ad01f305791a902d87a0b32 /recipes-security/keyutils/files/keyutils-fix-error-report-by-adding-default-message.patch | |
| parent | 20f2f496c2cfb32ec164ac0b3d20676a214c4341 (diff) | |
| download | meta-security-37c47c164e4d02e6e9b1c106a73695e8a0094c30.tar.gz | |
keyutils: add new recipe
keyutils is utilities to control the kernel key
management facility and to provide a mechanism by
which the kernel call back to userspace to get a
key instantiated.
It's required by ecryptfs-utils.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'recipes-security/keyutils/files/keyutils-fix-error-report-by-adding-default-message.patch')
| -rw-r--r-- | recipes-security/keyutils/files/keyutils-fix-error-report-by-adding-default-message.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes-security/keyutils/files/keyutils-fix-error-report-by-adding-default-message.patch b/recipes-security/keyutils/files/keyutils-fix-error-report-by-adding-default-message.patch new file mode 100644 index 0000000..acd91c0 --- /dev/null +++ b/recipes-security/keyutils/files/keyutils-fix-error-report-by-adding-default-message.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | fix keyutils test error report | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | |||
| 5 | "Permission denied" may be the reason of EKEYEXPIRED and EKEYREVOKED. | ||
| 6 | "Required key not available" may be the reason of EKEYREVOKED. | ||
| 7 | EXPIRED and REVOKED are 2 status of kernel security keys features. | ||
| 8 | But the userspace keyutils lib will output the error message, which may | ||
| 9 | have several reasons. | ||
| 10 | |||
| 11 | Signed-off-by: Han Chao <chan@windriver.com> | ||
| 12 | |||
| 13 | diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh | ||
| 14 | index bbca00a..739e9d0 100644 | ||
| 15 | --- a/tests/toolbox.inc.sh | ||
| 16 | +++ b/tests/toolbox.inc.sh | ||
| 17 | @@ -227,11 +227,12 @@ function expect_error () | ||
| 18 | ;; | ||
| 19 | EKEYEXPIRED) | ||
| 20 | my_err="Key has expired" | ||
| 21 | - alt_err="Unknown error 127" | ||
| 22 | + alt_err="Permission denied" | ||
| 23 | ;; | ||
| 24 | EKEYREVOKED) | ||
| 25 | my_err="Key has been revoked" | ||
| 26 | - alt_err="Unknown error 128" | ||
| 27 | + alt_err="Permission denied" | ||
| 28 | + alt2_err="Required key not available" | ||
| 29 | ;; | ||
| 30 | EKEYREJECTED) | ||
| 31 | my_err="Key has been rejected" | ||
| 32 | @@ -249,6 +250,9 @@ function expect_error () | ||
| 33 | elif [ "x$alt_err" != "x" ] && expr "$my_errmsg" : ".*: $alt_err" >&/dev/null | ||
| 34 | then | ||
| 35 | : | ||
| 36 | + elif [ "x$alt2_err" != "x" ] && expr "$my_errmsg" : ".*: $alt2_err" >&/dev/null | ||
| 37 | + then | ||
| 38 | + : | ||
| 39 | elif [ "x$old_err" != "x" ] && expr "$my_errmsg" : ".*: $old_err" >&/dev/null | ||
| 40 | then | ||
| 41 | : | ||
| 42 | |||
