From 14694cb5b20c4aae7685a26d61d4a04f85737443 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 19 Oct 2016 10:52:30 +0200 Subject: [PATCH] keyctl.2: Improve KEYCTL_CHOWN details Signed-off-by: Michael Kerrisk --- man2/keyctl.2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/man2/keyctl.2 b/man2/keyctl.2 index 13678e2ed..e2cce87be 100644 --- a/man2/keyctl.2 +++ b/man2/keyctl.2 @@ -185,7 +185,8 @@ via the function .BR keyctl_revoke (3). .TP .B KEYCTL_CHOWN -Change the ownership of a key. +Change the ownership (user and group ID) of a key. + The .I arg2 argument (cast to @@ -201,18 +202,21 @@ The argument (cast to .IR gid_t ) contains the new group ID (or \-1 in case the group ID shouldn't be changed). + The key must grant the caller .I setattr permission. + For the UID to be changed, or for the GID to be changed to a group the caller is not a member of, the caller must have the .B CAP_SYS_ADMIN capability (see .BR capabilities (7)). + If the UID is to be changed, the new user must have sufficient quota to accept the key. The quota deduction will be removed from the old user -to the new user should the attribute be changed. +to the new user should the UID be changed. The .I arg5