]> git.hungrycats.org Git - linux/commit
[PATCH] selinux: Add SO_PEERSEC socket option and getpeersec LSM hook.
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 02:38:13 +0000 (18:38 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 02:38:13 +0000 (18:38 -0800)
commitda6e57a2e6bd7939f610d957afacaf6a131e75ed
treef4ba93d7a37116b24d4e52dada4f65653e4a8581
parentfa9b605f51e1cb530f197f6bb608e72d9d778512
[PATCH] selinux: Add SO_PEERSEC socket option and getpeersec LSM hook.

From: James Morris <jmorris@redhat.com>

This patch adds a new option for Unix sockets, SO_PEERSEC, and an
associated LSM hook, getpeersec.  The SELinux handler is also included.

The purpose of this is to allow applications to obtain each others security
credentials, analagously to the existing SO_PEERCRED option.

Examples of use are Security Enhanced D-BUS and Security Enhanced X.

This patch was previously approved in principle by David, and has been
updated with feedback from Chris Wright and extended to cover all
architectures.
24 files changed:
include/asm-alpha/socket.h
include/asm-arm/socket.h
include/asm-arm26/socket.h
include/asm-cris/socket.h
include/asm-h8300/socket.h
include/asm-i386/socket.h
include/asm-ia64/socket.h
include/asm-m68k/socket.h
include/asm-mips/socket.h
include/asm-parisc/socket.h
include/asm-ppc/socket.h
include/asm-ppc64/socket.h
include/asm-s390/socket.h
include/asm-sh/socket.h
include/asm-sparc/socket.h
include/asm-sparc64/socket.h
include/asm-v850/socket.h
include/asm-x86_64/socket.h
include/linux/security.h
include/net/sock.h
net/core/sock.c
security/dummy.c
security/selinux/hooks.c
security/selinux/include/objsec.h