mirror of
https://github.com/ceph/ceph
synced 2025-01-04 02:02:36 +00:00
Merge pull request #30675 from idryomov/wip-set-kernel-secret
common/secret.c: don't pass uninitialized stack data to the kernel Reviewed-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
32fc260eba
@ -69,7 +69,7 @@ int set_kernel_secret(const char *secret, const char *key_name)
|
||||
return ret;
|
||||
}
|
||||
|
||||
serial = add_key("ceph", key_name, payload, sizeof(payload), KEY_SPEC_PROCESS_KEYRING);
|
||||
serial = add_key("ceph", key_name, payload, ret, KEY_SPEC_PROCESS_KEYRING);
|
||||
if (serial == -1) {
|
||||
ret = -errno;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user