From 9616790b9ad4147acd5b11de11d6d79bc9ad807f Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 19 Jan 2018 15:22:16 +0100 Subject: 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 --- trust/test-token.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'trust/test-token.c') 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 */ -- cgit v1.1