Commit bfda63fa authored by Paul Moore's avatar Paul Moore
Browse files

selinux: correct return values in selinux_socket_getpeersec_dgram()



Instead of returning -EINVAL if any type of error occurs, limit
-EINVAL to only those errors caused by passing a bad/invalid socket
or packet/skb.  In other cases where everything is correct but there
isn't a valid peer label we return -ENOPROTOOPT.

This helps make selinux_socket_getpeersec_dgram() more consistent
with selinux_socket_getpeersec_stream().

Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 90593caf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment