]>
Commit | Line | Data |
---|---|---|
1 | .TH "seccomp_release" 3 "25 July 2012" "paul@paul-moore.com" "libseccomp Documentation" | |
2 | .\" ////////////////////////////////////////////////////////////////////////// | |
3 | .SH NAME | |
4 | .\" ////////////////////////////////////////////////////////////////////////// | |
5 | seccomp_release \- Release the seccomp filter state | |
6 | .\" ////////////////////////////////////////////////////////////////////////// | |
7 | .SH SYNOPSIS | |
8 | .\" ////////////////////////////////////////////////////////////////////////// | |
9 | .nf | |
10 | .B #include <seccomp.h> | |
11 | .sp | |
12 | .B typedef void * scmp_filter_ctx; | |
13 | .sp | |
14 | .BI "void seccomp_release(scmp_filter_ctx " ctx ");" | |
15 | .sp | |
16 | Link with \fI\-lseccomp\fP. | |
17 | .fi | |
18 | .\" ////////////////////////////////////////////////////////////////////////// | |
19 | .SH DESCRIPTION | |
20 | .\" ////////////////////////////////////////////////////////////////////////// | |
21 | .P | |
22 | Releases the seccomp filter in | |
23 | .I ctx | |
24 | which was first initialized by | |
25 | .BR seccomp_init (3) | |
26 | or | |
27 | .BR seccomp_reset (3) | |
28 | and frees any memory associated with the given seccomp filter context. | |
29 | Any seccomp filters loaded into the kernel are not affected. | |
30 | .\" ////////////////////////////////////////////////////////////////////////// | |
31 | .SH RETURN VALUE | |
32 | .\" ////////////////////////////////////////////////////////////////////////// | |
33 | Does not return a value. | |
34 | .\" ////////////////////////////////////////////////////////////////////////// | |
35 | .SH EXAMPLES | |
36 | .\" ////////////////////////////////////////////////////////////////////////// | |
37 | .nf | |
38 | #include <seccomp.h> | |
39 | ||
40 | int main(int argc, char *argv[]) | |
41 | { | |
42 | int rc; | |
43 | scmp_filter_ctx ctx; | |
44 | ||
45 | ctx = seccomp_init(SCMP_ACT_KILL); | |
46 | if (ctx == NULL) | |
47 | return \-1; | |
48 | ||
49 | /* ... */ | |
50 | ||
51 | seccomp_release(ctx); | |
52 | return 0; | |
53 | } | |
54 | .fi | |
55 | .\" ////////////////////////////////////////////////////////////////////////// | |
56 | .SH NOTES | |
57 | .\" ////////////////////////////////////////////////////////////////////////// | |
58 | .P | |
59 | While the seccomp filter can be generated independent of the kernel, kernel | |
60 | support is required to load and enforce the seccomp filter generated by | |
61 | libseccomp. | |
62 | .P | |
63 | The libseccomp project site, with more information and the source code | |
64 | repository, can be found at https://github.com/seccomp/libseccomp. This tool, | |
65 | as well as the libseccomp library, is currently under development, please | |
66 | report any bugs at the project site or directly to the author. | |
67 | .\" ////////////////////////////////////////////////////////////////////////// | |
68 | .SH AUTHOR | |
69 | .\" ////////////////////////////////////////////////////////////////////////// | |
70 | Paul Moore <paul@paul-moore.com> | |
71 | .\" ////////////////////////////////////////////////////////////////////////// | |
72 | .SH SEE ALSO | |
73 | .\" ////////////////////////////////////////////////////////////////////////// | |
74 | .BR seccomp_init (3), | |
75 | .BR seccomp_reset (3) | |
76 | ||
77 |