1 .TH "seccomp_load" 3 "25 July 2012" "paul@paul-moore.com" "libseccomp Documentation"
2 .\" //////////////////////////////////////////////////////////////////////////
4 .\" //////////////////////////////////////////////////////////////////////////
5 seccomp_load \- Load the current seccomp filter into the kernel
6 .\" //////////////////////////////////////////////////////////////////////////
8 .\" //////////////////////////////////////////////////////////////////////////
10 .B #include <seccomp.h>
12 .B typedef void * scmp_filter_ctx;
14 .BI "int seccomp_load(scmp_filter_ctx " ctx ");"
16 Link with \fI\-lseccomp\fP.
18 .\" //////////////////////////////////////////////////////////////////////////
20 .\" //////////////////////////////////////////////////////////////////////////
22 Loads the seccomp filter provided by
24 into the kernel; if the function
25 succeeds the new seccomp filter will be active when the function returns.
26 .\" //////////////////////////////////////////////////////////////////////////
28 .\" //////////////////////////////////////////////////////////////////////////
29 Returns zero on success, negative errno values on failure.
30 .\" //////////////////////////////////////////////////////////////////////////
32 .\" //////////////////////////////////////////////////////////////////////////
36 int main(int argc, char *argv[])
41 ctx = seccomp_init(SCMP_ACT_KILL);
47 rc = seccomp_load(ctx);
58 .\" //////////////////////////////////////////////////////////////////////////
60 .\" //////////////////////////////////////////////////////////////////////////
62 While the seccomp filter can be generated independent of the kernel, kernel
63 support is required to load and enforce the seccomp filter generated by
66 The libseccomp project site, with more information and the source code
67 repository, can be found at https://github.com/seccomp/libseccomp. This tool,
68 as well as the libseccomp library, is currently under development, please
69 report any bugs at the project site or directly to the author.
70 .\" //////////////////////////////////////////////////////////////////////////
72 .\" //////////////////////////////////////////////////////////////////////////
73 Paul Moore <paul@paul-moore.com>
74 .\" //////////////////////////////////////////////////////////////////////////
76 .\" //////////////////////////////////////////////////////////////////////////
78 .BR seccomp_reset (3),
79 .BR seccomp_release (3),
80 .BR seccomp_rule_add (3),
81 .BR seccomp_rule_add_exact (3)