BACKPORT: Smack: bidirectional UDS connect check
authorCasey Schaufler <casey@schaufler-ca.com>
Thu, 10 Apr 2014 23:37:08 +0000 (16:37 -0700)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 30 Jun 2016 12:57:35 +0000 (14:57 +0200)
commite3c3bc5a9d8f6e331841f1c317736a57fb1d7852
treed261f0829a3de4d815b017c4cf1b710397961121
parentb0760e582605d89020cad95eac99a9b0305072b7
BACKPORT: Smack: bidirectional UDS connect check

Smack IPC policy requires that the sender have write access
to the receiver. UDS streams don't do per-packet checks. The
only check is done at connect time. The existing code checks
if the connecting process can write to the other, but not the
other way around. This change adds a check that the other end
can write to the connecting process.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Casey Schuafler <casey@schaufler-ca.com>
(cherry-picked from upstream 54e70ec5eb090193b03e69d551fa6771a5a217c4)
security/smack/smack.h
security/smack/smack_lsm.c