Home
last modified time | relevance | path

Searched refs:keyctl (Results 1 – 25 of 46) sorted by relevance

12

/third_party/ltp/testcases/commands/keyctl/
Dkeyctl01.sh29 if ! keyctl 2>&1 | grep -q "keyctl $op"; then
34 local key=`keyctl request2 user debug:foo bar`
41 if ! keyctl unlink $key @s; then
84 keyctl request2 user debug:fred negate @t >temp 2>&1
91 local key=`keyctl show | awk '/debug:fred/ {print $1}'`
93 key=`keyctl show | \
98 keyctl unlink $key @s >/dev/null
/third_party/ltp/testcases/kernel/syscalls/request_key/
Drequest_key04.c27 TEST(keyctl(KEYCTL_JOIN_SESSION_KEYRING, NULL)); in do_test()
31 TEST(keyctl(KEYCTL_SETPERM, KEY_SPEC_SESSION_KEYRING, in do_test()
38 TEST(keyctl(KEYCTL_SET_REQKEY_KEYRING, in do_test()
45 TEST(keyctl(KEYCTL_READ, KEY_SPEC_SESSION_KEYRING, in do_test()
57 TEST(keyctl(KEYCTL_READ, KEY_SPEC_SESSION_KEYRING, in do_test()
Drequest_key02.c71 if (keyctl(cmd, n) == -1) { in init_key()
77 if (keyctl(cmd, n, sec) == -1) { in init_key()
Drequest_key03.c51 TEST(keyctl(KEYCTL_JOIN_SESSION_KEYRING, NULL)); in test_with_key_type()
100 TEST(keyctl(KEYCTL_CLEAR, KEY_SPEC_SESSION_KEYRING)); in test_with_key_type()
/third_party/ltp/testcases/kernel/syscalls/keyctl/
Dkeyctl05.c78 TEST(keyctl(KEYCTL_JOIN_SESSION_KEYRING, NULL)); in new_session_keyring()
124 TEST(keyctl(KEYCTL_SETPERM, keyid, KEY_POS_ALL)); in test_update_nonupdatable()
132 TEST(keyctl(KEYCTL_UPDATE, keyid, payload, plen)); in test_update_nonupdatable()
172 TEST(keyctl(KEYCTL_SETPERM, keyid, perm)); in test_update_setperm_race()
181 TEST(keyctl(KEYCTL_UPDATE, keyid, payload, sizeof(payload))); in test_update_setperm_race()
Dkeyctl02.c45 keyctl(KEYCTL_READ, key, buffer, 4); in do_read()
54 keyctl(KEYCTL_REVOKE, key); in do_revoke()
103 if (keyctl(KEYCTL_INVALIDATE, key_inv) == -1 && errno != EOPNOTSUPP) in do_test()
111 ret = keyctl(KEYCTL_REVOKE, key); in do_test()
Dkeyctl04.c26 TEST(keyctl(KEYCTL_GET_KEYRING_ID, KEY_SPEC_THREAD_KEYRING, 1)); in do_test()
31 TEST(keyctl(KEYCTL_SET_REQKEY_KEYRING, KEY_REQKEY_DEFL_THREAD_KEYRING)); in do_test()
35 TEST(keyctl(KEYCTL_GET_KEYRING_ID, KEY_SPEC_THREAD_KEYRING, 0)); in do_test()
Dkeyctl01.c25 TEST(keyctl(KEYCTL_GET_KEYRING_ID, KEY_SPEC_USER_SESSION_KEYRING)); in do_test()
32 TEST(keyctl(KEYCTL_READ, key)); in do_test()
37 TEST(keyctl(KEYCTL_REVOKE, key)); in do_test()
Dkeyctl07.c49 TEST(keyctl(KEYCTL_READ, KEY_SPEC_PROCESS_KEYRING, in try_to_read_negative_key()
63 TEST(keyctl(KEYCTL_READ, key_id, buffer, sizeof(buffer))); in try_to_read_negative_key()
Dkeyctl03.c35 TEST(keyctl(KEYCTL_UNLINK, key, KEY_SPEC_SESSION_KEYRING)); in do_test()
Dkeyctl06.c40 TEST(keyctl(KEYCTL_READ, KEY_SPEC_PROCESS_KEYRING, in do_test()
/third_party/ltp/testcases/kernel/security/mmc_security/
Dchange_password.sh46 keyid=$(keyctl request mmc "mmc:key")
68 if ! keyctl update $keyid "$oldpasswd$newpasswd"; then
75 keyctl clear -3
Dremove_password.sh48 keyid=$(keyctl request mmc "mmc:key")
59 keyctl clear -3
DREADME36 keyctl request2 mmc mmc:key unlock
40 keyctl request2 mmc mmc:key assign
Dask_password.sh55 if ! keyctl instantiate $1 "$passwd" $2 >/dev/null 2>&1; then
Dassign_password.sh60 if ! keyctl instantiate $1 "$newpasswd" $2 >/dev/null 2>&1; then
Dforce_erase.sh70 keyctl clear -3
/third_party/ltp/testcases/cve/
Dcve-2016-7042.c37 if (keyctl(KEYCTL_UPDATE, key, "b", 1)) in do_test()
50 if (keyctl(KEYCTL_UNLINK, key, KEY_SPEC_SESSION_KEYRING)) in do_test()
63 if (key > 0 && keyctl(KEYCTL_UNLINK, key, KEY_SPEC_SESSION_KEYRING)) in cleanup()
/third_party/ltp/testcases/kernel/security/integrity/ima/tests/
Dima_keys.sh28 tst_is_num $KEYRING_ID && keyctl clear $KEYRING_ID
105 tst_require_cmds keyctl openssl
118 KEYRING_ID=$(keyctl newring $keyring_name @s) || \
/third_party/ltp/include/lapi/
Dkeyctl.h42 static inline long keyctl(int cmd, ...) in keyctl() function
58 return keyctl(KEYCTL_JOIN_SESSION_KEYRING, name); in keyctl_join_session_keyring()
/third_party/ltp/testcases/kernel/security/integrity/ima/
DREADME.md96 # user_key=$(keyctl add user kmk-user "`dd if=/dev/urandom bs=1 count=32 2>/dev/null`" @u)
97 # keyctl pipe "$user_key" > /etc/keys/kmk-user.blob
98 # evm_key=$(keyctl add encrypted evm-key "new user:kmk-user 64" @u)
99 # keyctl pipe "$evm_key" >/etc/keys/evm.blob
/third_party/e2fsprogs/misc/
De4crypt.c81 static long keyctl(int cmd, ...) in keyctl() function
524 if (keyctl(KEYCTL_DESCRIBE, x, NULL, 0) < 0) in get_keyring_id()
561 rc = keyctl(KEYCTL_SEARCH, keyring_id, EXT2FS_KEY_TYPE_LOGON, in insert_key_into_keyring()
591 keyring_id = keyctl(KEYCTL_GET_KEYRING_ID, keyring_id, 0); in insert_key_into_keyring()
820 keyid = keyctl(KEYCTL_JOIN_SESSION_KEYRING, NULL); in do_new_session()
825 ret = keyctl(KEYCTL_SESSION_TO_PARENT, NULL); in do_new_session()
/third_party/f2fs-tools/tools/
Df2fscrypt.c130 static long keyctl(int cmd, ...) in keyctl() function
572 return keyctl(KEYCTL_GET_KEYRING_ID, in get_keyring_id()
581 if (keyctl(KEYCTL_DESCRIBE, x, NULL, 0) < 0) in get_keyring_id()
618 rc = keyctl(KEYCTL_SEARCH, keyring_id, F2FS_KEY_TYPE_LOGON, in insert_key_into_keyring()
851 keyid = keyctl(KEYCTL_JOIN_SESSION_KEYRING, NULL); in do_new_session()
856 ret = keyctl(KEYCTL_SESSION_TO_PARENT, NULL); in do_new_session()
/third_party/ltp/testcases/kernel/syscalls/add_key/
Dadd_key04.c43 TEST(keyctl(KEYCTL_JOIN_SESSION_KEYRING, NULL)); in do_test()
Dadd_key03.c38 TEST(keyctl(KEYCTL_GET_KEYRING_ID, special_id, 1)); in get_keyring_id()

12