Smack: fixup of bluetooth socket labelling
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 3 Nov 2016 10:26:17 +0000 (11:26 +0100)
committerStephane Desneux <stephane.desneux@iot.bzh>
Mon, 27 Mar 2017 13:33:39 +0000 (15:33 +0200)
commit827d7c1c4819737ca5442330c24588a83b72b87b
tree4b1401d98ad99d08dedd8dc58b4279fe227bd15f
parent532f6ad992ae7631dd44a74d0a0bd43126ce3bdf
Smack: fixup of bluetooth socket labelling

The sockets created by kernel thread will now be
tagged @ instead of _.

This problem was occuring during creation of AF_BLUETOOTH (but is
also latent AF_ALG, AF_IUCV, AF_SCTP, AF_TIPC as they don't go
through the normal socket creation process within linux).

Having the tag @ allows read/write to sockets without special
rules and tus solve the problem.

This solution from upstream linux patches backported and from
a patch made by Samsung for Tizen and that is currently
discussed within kernel lists.

Also add some improvements of the LSM Smack (valid caching and signal 0).
These improvements are backports of patches already available for
linux 4.9-rc3.

AGL-bug: SPEC-293 (https://jira.automotivelinux.org/browse/SPEC-293)

Change-Id: I5999a951a4bbeba7947ebfe5df091de07d59e57e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
meta-app-framework/recipes-kernel/linux/linux-yocto_4.1.bbappend [new file with mode: 0644]
meta-app-framework/recipes-kernel/linux/linux-yocto_4.4.bbappend [new file with mode: 0644]
meta-app-framework/recipes-kernel/linux/linux/linux-yocto-4.1/0001-Smack-File-receive-for-sockets.patch [new file with mode: 0644]
meta-app-framework/recipes-kernel/linux/linux/linux-yocto-4.1/0002-smack-fix-cache-of-access-labels.patch [new file with mode: 0644]
meta-app-framework/recipes-kernel/linux/linux/linux-yocto-4.1/0003-Smack-ignore-null-signal-in-smack_task_kill.patch [new file with mode: 0644]
meta-app-framework/recipes-kernel/linux/linux/linux-yocto-4.1/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch [new file with mode: 0644]
meta-app-framework/recipes-kernel/linux/linux/linux-yocto-4.4/0001-Smack-File-receive-for-sockets.patch [new file with mode: 0644]
meta-app-framework/recipes-kernel/linux/linux/linux-yocto-4.4/0002-smack-fix-cache-of-access-labels.patch [new file with mode: 0644]
meta-app-framework/recipes-kernel/linux/linux/linux-yocto-4.4/0003-Smack-ignore-null-signal-in-smack_task_kill.patch [new file with mode: 0644]
meta-app-framework/recipes-kernel/linux/linux/linux-yocto-4.4/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch [new file with mode: 0644]