diff options
author | Daiki Ueno <dueno@redhat.com> | 2018-01-19 15:22:16 +0100 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2018-02-05 10:49:35 +0100 |
commit | 9616790b9ad4147acd5b11de11d6d79bc9ad807f (patch) | |
tree | 01041110e78ded2799fc4e26607ba21a618ca5d2 /trust/test-token.c | |
parent | 49d2ededb64197702a8708cb4a453497bc7eaecd (diff) |
trust: Forcibly mark "Default Trust" read-only
The "Default Trust" token is typically mounted as $datadir, which is
considered as read-only on modern OSes.
Suggestd by Kai Engert in:
https://bugzilla.redhat.com/show_bug.cgi?id=1523630
Diffstat (limited to 'trust/test-token.c')
-rw-r--r-- | trust/test-token.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/trust/test-token.c b/trust/test-token.c index 0206bc1..b2f2323 100644 --- a/trust/test-token.c +++ b/trust/test-token.c @@ -63,7 +63,7 @@ struct { static void setup (void *path) { - test.token = p11_token_new (333, path, "Label"); + test.token = p11_token_new (333, path, "Label", P11_TOKEN_FLAG_NONE); assert_ptr_not_null (test.token); test.index = p11_token_index (test.token); @@ -241,18 +241,18 @@ test_not_writable (void) #ifdef OS_UNIX if (getuid () != 0) { #endif - token = p11_token_new (333, "/", "Label"); + token = p11_token_new (333, "/", "Label", P11_TOKEN_FLAG_NONE); assert (!p11_token_is_writable (token)); p11_token_free (token); #ifdef OS_UNIX } #endif - token = p11_token_new (333, "", "Label"); + token = p11_token_new (333, "", "Label", P11_TOKEN_FLAG_NONE); assert (!p11_token_is_writable (token)); p11_token_free (token); - token = p11_token_new (333, "/non-existant", "Label"); + token = p11_token_new (333, "/non-existant", "Label", P11_TOKEN_FLAG_NONE); assert (!p11_token_is_writable (token)); p11_token_free (token); } @@ -276,7 +276,7 @@ test_writable_no_exist (void) path = p11_path_build (directory, "subdir", NULL); assert (path != NULL); - token = p11_token_new (333, path, "Label"); + token = p11_token_new (333, path, "Label", P11_TOKEN_FLAG_NONE); free (path); /* A writable directory since parent is writable */ |