]>
iEval git - linux-seccomp.git/blob - libseccomp/tests/11-basic-basic_errors.py
4 # Seccomp Library test program
6 # Copyright (c) 2012 Red Hat <pmoore@redhat.com>
7 # Author: Paul Moore <paul@paul-moore.com>
11 # This library is free software; you can redistribute it and/or modify it
12 # under the terms of version 2.1 of the GNU Lesser General Public License as
13 # published by the Free Software Foundation.
15 # This library is distributed in the hope that it will be useful, but WITHOUT
16 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
20 # You should have received a copy of the GNU Lesser General Public License
21 # along with this library; if not, see <http://www.gnu.org/licenses>.
32 # this test differs from the native test for obvious reasons
34 f
= SyscallFilter(ALLOW
+ 1)
38 f
= SyscallFilter(ALLOW
)
44 f
= SyscallFilter(ALLOW
)
46 f
.syscall_priority(-10000, 1)
50 f
= SyscallFilter(ALLOW
)
52 f
.add_rule(ALLOW
, "read")
56 f
.add_rule(KILL
- 1, "read")
60 f
.add_rule(KILL
, "read",
72 f
.add_rule(KILL
, -1001)
76 f
= SyscallFilter(ALLOW
)
78 f
.add_arch(Arch("x86"))
80 f
.add_rule_exactly(KILL
, "socket", Arg(0, EQ
, 2))
84 f
= SyscallFilter(ALLOW
)
86 f
.add_rule(ERRNO(0xffff), "read")
92 # kate: syntax python;
93 # kate: indent-mode python; space-indent on; indent-width 4; mixedindent off;
This page took 0.048594 seconds and 4 git commands to generate.