fix up security_socket_getpeersec_* documentation
PATCH 1/1 fix up security_socket_getpeersec_* documentation
Update the security_socket_peersec documentation in include/linux/security.h. security_socket_peersec has been split into two functions - _stream and _dgram, with new capabilities.
include/linux/security.h +15 -2
@@ -782,9 +782,11 @@ struct swap_info_struct;* incoming sk_buff @skb has been associated with a particular socket, @sk. * @sk contains the sock (not socket) associated with the incoming sk_buff. * @skb contains the incoming network data. -* @socket_getpeersec: +* @socket_getpeersec_stream: * This hook allows the security module to provide peer socket security -* state to userspace via getsockopt SO_GETPEERSEC. +* state for unix or connected tcp sockets to userspace via getsockopt +* SO_GETPEERSEC. For tcp sockets this can be meaningful if the +* socket is associated with an ipsec SA. * @sock is the local socket. * @optval userspace memory where the security state is to be copied. * @optlen userspace int where the module should copy the actual length
@@ -793,6 +795,17 @@ struct swap_info_struct;* by the caller. * Return 0 if all is well, otherwise, typical getsockopt return * values. +* @socket_getpeersec_dgram: +* This hook allows the security module to provide peer socket security +* state for udp sockets on a per-packet basis to userspace via +* getsockopt SO_GETPEERSEC. The application must first have indicated +* the IP_PASSSEC option via getsockopt. It can then retrieve the +* security state returned by this hook for a packet via the SCM_SECURITY +* ancillary message type. +* @skb is the skbuff for the packet being queried +* @secdata is a pointer to a buffer in which to copy the security data +* @seclen is the maximum length for @secdata +* Return 0 on success, error on failure. * @sk_alloc_security: * Allocate and attach a security structure to the sk->sk_security field, * which is used to copy security attributes between local stream sockets.
Catherine
[email protected] wrote on 03/28/2006 08:02:53 AM:
include/linux/security.h struct swap_info_struct; · line 782
Quoted 10 lines
Update the
security_socket_peersecdocumentation ininclude/linux/security.h.security_socket_peersechas been split into two functions -_streamand_dgram, with new capabilities.Signed-off-by Serge Hallyn <[email protected]>include/linux/security.h +0
-0@@ -782,9 +782,11 @@ struct swap_info_struct;* incoming sk_buff @skb has been associated with a particular
socket, @sk.
include/linux/security.h struct swap_info_struct; · line 783
Quoted 1 line
include/linux/security.h +0
-0* @sk contains the sock (not socket) associated with the incoming
sk_buff.
include/linux/security.h struct swap_info_struct;
Quoted 4 lines
include/linux/security.h +1
-1* @skb contains the incoming network data. -* @socket_getpeersec: +* @socket_getpeersec_stream: * This hook allows the security module to provide peer socket
security
include/linux/security.h struct swap_info_struct; · line 787
Quoted 2 lines
include/linux/security.h +1
-1-* state to userspace via getsockopt SO_GETPEERSEC. +* state for unix or connected tcp sockets to userspace via
getsockopt
include/linux/security.h struct swap_info_struct;
Quoted 5 lines
include/linux/security.h +2
-0+* SO_GETPEERSEC. For tcp sockets this can be meaningful if the +* socket is associated with an ipsec SA. * @sock is the local socket. * @optval userspace memory where the security state is to be copied. * @optlen userspace int where the module should copy the actual
length
include/linux/security.h struct swap_info_struct; · line 799
Quoted 6 lines
include/linux/security.h +2
-0@@ -793,6 +795,17 @@ struct swap_info_struct;* by the caller. * Return 0 if all is well, otherwise, typical getsockopt return * values. +* @socket_getpeersec_dgram: +* This hook allows the security module to provide peer socket
security
include/linux/security.h struct swap_info_struct; · line 801
Quoted 2 lines
include/linux/security.h +2
-0+* state for udp sockets on a per-packet basis to userspace via +* getsockopt SO_GETPEERSEC. The application must first have
indicated
include/linux/security.h struct swap_info_struct; · line 803
Quoted 2 lines
include/linux/security.h +2
-0+* the IP_PASSSEC option via getsockopt. It can then retrieve the +* security state returned by this hook for a packet via the
SCM_SECURITY
include/linux/security.h struct swap_info_struct;
Quoted 3 lines
include/linux/security.h +3
-0+* ancillary message type. +* @skb is the skbuff for the packet being queried +* @secdata is a pointer to a buffer in which to copy the security
data
Quoted 7 lines
include/linux/security.h +2
-0+* @seclen is the maximum length for @secdata +* Return 0 on success, error on failure. * @sk_alloc_security: * Allocate and attach a security structure to the sk->sk_security field, * which is used to copy security attributes between local
stream sockets.