]> git.karo-electronics.de Git - linux-beck.git/commit
samples/bpf: add userspace example for prohibiting sockets
authorDavid Ahern <dsa@cumulusnetworks.com>
Thu, 1 Dec 2016 16:48:08 +0000 (08:48 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Dec 2016 18:46:09 +0000 (13:46 -0500)
commit554ae6e792ef38020b80b4d5127c51d510c0918f
tree546165a4619501f722cb551411164e1b88e693b3
parent4f2e7ae56e04cfe670cf39152a8d015984c90351
samples/bpf: add userspace example for prohibiting sockets

Add examples preventing a process in a cgroup from opening a socket
based family, protocol and type.

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/Makefile
samples/bpf/sock_flags_kern.c [new file with mode: 0644]
samples/bpf/test_cgrp2_sock2.c [new file with mode: 0644]
samples/bpf/test_cgrp2_sock2.sh [new file with mode: 0755]