From 839011506a726c20987ca522d6868374c4d749d9 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Mon, 6 Dec 2021 14:42:08 -0600 Subject: [PATCH 1/2] add user keyring command Signed-off-by: Serge Hallyn --- keyring.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyring.go b/keyring.go index 5c5a9b9..6761087 100644 --- a/keyring.go +++ b/keyring.go @@ -104,6 +104,10 @@ func UserSessionKeyring() (Keyring, error) { return newKeyring(keySpecUserSessionKeyring) } +func UserKeyring() (Keyring, error) { + return newKeyring(keySpecUserKeyring) +} + // Return the current group keyring. func GroupKeyring() (Keyring, error) { return newKeyring(keySpecGroupKeyring) From b9476cd969e8b8b66b6aef8013a12928de9a2681 Mon Sep 17 00:00:00 2001 From: Ashwin Gopalan Date: Sat, 8 Jul 2023 17:44:09 -0700 Subject: [PATCH 2/2] feat: add syscalls for aarch64 target Previously got undefined: syscall_keyctl errors when building project-machine/trust on an aarch64 platform. Adding aarch64 specific syscalls fixes this (along with another tweak to tpm2.go in trust). Signed-off-by: Ashwin Gopalan --- sys_linux_arm64.go | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sys_linux_arm64.go diff --git a/sys_linux_arm64.go b/sys_linux_arm64.go new file mode 100644 index 0000000..c4a28a7 --- /dev/null +++ b/sys_linux_arm64.go @@ -0,0 +1,7 @@ +package keyctl +//taken from https://github.com/jsipprell/keyctl/pull/17 +const ( + syscall_keyctl uintptr = 219 + syscall_add_key uintptr = 217 + syscall_setfsgid uintptr = 152 +) \ No newline at end of file