]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
selinux: initialize sock security class to default value
authorStephen Smalley <sds@tycho.nsa.gov>
Fri, 10 Jul 2015 21:19:57 +0000 (17:19 -0400)
committerPaul Moore <pmoore@redhat.com>
Mon, 13 Jul 2015 17:31:59 +0000 (13:31 -0400)
commit5dee25d08eac01472904b0ab32ce35edee5c0518
tree41dc3bcb96fa1ceaf73de869ffdf8d2d30e8a3b9
parent9629d04ae06812f217846b69728c969afee690b4
selinux: initialize sock security class to default value

Initialize the security class of sock security structures
to the generic socket class.  This is similar to what is
already done in inode_alloc_security for files.  Generally
the sclass field will later by set by socket_post_create
or sk_clone or sock_graft, but for protocol implementations
that fail to call any of these for newly accepted sockets,
we want some sane default that will yield a legitimate
avc denied message with non-garbage values for class and
permission.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <pmoore@redhat.com>
security/selinux/hooks.c