add_key.2: Empty payloads are not allowed in user-defined keys
iBoth add_key and the utility "keyctl add" return EINVAL when
attempting to add a user key with an empty or NULL payload.
The manpage implies that this should be valid.
From my reading of the kernel source, this has not been possible
since at least linux kernel commit
1da177e4 (2.6.12-rc2 on
2005-04-16).
Until kernel commit
cf7f601c,
security/keys/user_defined.c:user_instantiate returned -EINVAL
if datalen <= 0. That commit only moved this behavior to a new
user_preparse function, where it remains today in
b562e44f
(4.5.0 on 2016-03-13).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>