OSDN Git Service

(split) LDP: Update original to LDP v3.65
[linuxjm/LDP_man-pages.git] / original / man2 / add_key.2
index 499e770..eb9ce57 100644 (file)
@@ -1,15 +1,16 @@
-.\"
 .\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
 .\" Written by David Howells (dhowells@redhat.com)
 .\"
 .\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
 .\" Written by David Howells (dhowells@redhat.com)
 .\"
+.\" %%%LICENSE_START(GPLv2+_SW_ONEPARA)
 .\" This program is free software; you can redistribute it and/or
 .\" modify it under the terms of the GNU General Public License
 .\" as published by the Free Software Foundation; either version
 .\" 2 of the License, or (at your option) any later version.
 .\" This program is free software; you can redistribute it and/or
 .\" modify it under the terms of the GNU General Public License
 .\" as published by the Free Software Foundation; either version
 .\" 2 of the License, or (at your option) any later version.
+.\" %%%LICENSE_END
 .\"
 .TH ADD_KEY 2 2010-02-25 Linux "Linux Key Management Calls"
 .SH NAME
 .\"
 .TH ADD_KEY 2 2010-02-25 Linux "Linux Key Management Calls"
 .SH NAME
-add_key \- Add a key to the kernel's key management facility
+add_key \- add a key to the kernel's key management facility
 .SH SYNOPSIS
 .nf
 .B #include <keyutils.h>
 .SH SYNOPSIS
 .nf
 .B #include <keyutils.h>
@@ -38,7 +39,7 @@ way invalid.
 If the destination
 .I keyring
 already contains a key that matches the specified
 If the destination
 .I keyring
 already contains a key that matches the specified
-.IR type " and " description
+.IR type " and " description,
 then, if the key type supports it, that key will be updated rather than a new
 key being created; if not, a new key will be created and it will displace the
 link to the extant key from the keyring.
 then, if the key type supports it, that key will be updated rather than a new
 key being created; if not, a new key will be created and it will displace the
 link to the extant key from the keyring.
@@ -75,14 +76,12 @@ and a colon (for instance
 .RB \*(lq afs:mykey \*(rq).
 The
 .I payload
 .RB \*(lq afs:mykey \*(rq).
 The
 .I payload
-may be empty or
-.B NULL
-for keys of this type.
+may be empty or NULL for keys of this type.
 .TP
 .B \*(lqkeyring\*(rq
 Keyrings are special key types that may contain links to sequences of other
 .TP
 .B \*(lqkeyring\*(rq
 Keyrings are special key types that may contain links to sequences of other
-keys of any type.  If this interface is used to create a keyring, then a
-.B NULL
+keys of any type.
+If this interface is used to create a keyring, then a NULL
 .I payload
 should be specified, and
 .I plen
 .I payload
 should be specified, and
 .I plen
@@ -91,8 +90,7 @@ should be zero.
 On success
 .BR add_key ()
 returns the serial number of the key it created or updated.
 On success
 .BR add_key ()
 returns the serial number of the key it created or updated.
-On error, the value
-.B -1
+On error, the value \-1
 will be returned and errno will have been set to an appropriate error.
 .SH ERRORS
 .TP
 will be returned and errno will have been set to an appropriate error.
 .SH ERRORS
 .TP
@@ -129,3 +127,11 @@ should be specified to the linker.
 .BR keyctl (1),
 .BR keyctl (2),
 .BR request_key (2)
 .BR keyctl (1),
 .BR keyctl (2),
 .BR request_key (2)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.