git.samba.org
/
sfrench
/
cifs-2.6.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge branch 'stable-4.13' of git://git.infradead.org/users/pcmoore/audit
[sfrench/cifs-2.6.git]
/
samples
/
bpf
/
run_cookie_uid_helper_example.sh
1
#!/bin/bash
2
local_dir="$(pwd)"
3
root_dir=$local_dir/../..
4
mnt_dir=$(mktemp -d --tmp)
5
6
on_exit() {
7
iptables -D OUTPUT -m bpf --object-pinned ${mnt_dir}/bpf_prog -j ACCEPT
8
umount ${mnt_dir}
9
rm -r ${mnt_dir}
10
}
11
12
trap on_exit EXIT
13
mount -t bpf bpf ${mnt_dir}
14
./per_socket_stats_example ${mnt_dir}/bpf_prog $1