Skip to content

Commit

Permalink
Merge pull request #596 from giuseppe/keyring-enosys
Browse files Browse the repository at this point in the history
linux: ignore ENOSYS on keyctl
  • Loading branch information
rhatdan authored Feb 15, 2021
2 parents f976b01 + efe35f1 commit d611a40
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/libcrun/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,14 @@ libcrun_create_keyring (const char *name, libcrun_error_t *err)
{
int ret = syscall_keyctl_join (name);
if (UNLIKELY (ret < 0))
return crun_make_error (err, errno, "create keyring `%s`", name);
{
if (errno == ENOSYS)
{
libcrun_warning ("could not create a new keyring: keyctl_join is not supported");
return 0;
}
return crun_make_error (err, errno, "create keyring `%s`", name);
}
return 0;
}

Expand Down

0 comments on commit d611a40

Please sign in to comment.