Thread (1 message) 1 message, 1 author, 2016-11-16

Re: [PATCH 5/5] add_key.2: add information regarding EPERM

From: Michael Kerrisk (man-pages) <hidden>
Date: 2016-11-16 17:57:04

Possibly related (same subject, not in this thread)

Hi Eugene,

On 11/15/2016 10:17 PM, Eugene Syromyatnikov wrote:
On Tue, Nov 15, 2016 at 9:00 PM, Michael Kerrisk (man-pages)
[off-list ref] wrote:
quoted
Hello Eugene

On 11/15/2016 09:44 AM, Eugene Syromyatnikov wrote:
quoted
---
 man2/add_key.2 | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/man2/add_key.2 b/man2/add_key.2
index 082a2b8..241eb92 100644
--- a/man2/add_key.2
+++ b/man2/add_key.2
@@ -183,6 +183,19 @@ The keyring doesn't exist.
 .TP
 .B ENOMEM
 Insufficient memory to create a key.
+.TP
+.B EPERM
+The
+.I type
+started from dot.
Oh -- I was unaware of this! What are key types that start with "." about,
do you know?
I can't recall any clear indication that this is for internal purposes
(and can't find any mention of this now), but there is explicit check
in keyctl.c:key_get_type_from_user and it is used for
".request_key_auth" key type. Judging by commit messages for 54e2c2c1,
1260f801 and 3e30148c, it is indeed reserved for internal purposes and
has been reserved as part of the introduction of the aforementioned
".request_key_auth" key type.
Ahh yes. That makes sense. Patch applied. And I'll add a few more words
about the types starting with "." being reserved.

Cheers,

Michael
quoted
quoted
+.TP
+.B EPERM
+.I type
+was
+.I """keyring"""
+and the
+.I description
+started from dot.
 .SH VERSIONS
 This system call first appeared in Linux 2.6.10.
 .SH CONFORMING TO

--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help