]>
iEval git - linux-seccomp.git/blob - 22-sim-basic_chains_array.py
bde2461a94113f85160945b3f01eef7baac7b65d
4 # Seccomp Library test program
6 # Copyright (c) 2013 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>.
24 # NOTE: this is identical to 03-sim-basic_chains.py but is here to satisfy the
25 # need for an equivalent Python test for each native C test
35 f
= SyscallFilter(KILL
)
36 f
.add_rule_exactly(ALLOW
, "read", Arg(0, EQ
, sys
.stdin
.fileno()))
37 f
.add_rule_exactly(ALLOW
, "write", Arg(0, EQ
, sys
.stdout
.fileno()))
38 f
.add_rule_exactly(ALLOW
, "write", Arg(0, EQ
, sys
.stderr
.fileno()))
39 f
.add_rule_exactly(ALLOW
, "close")
40 f
.add_rule_exactly(ALLOW
, "rt_sigreturn")
45 util
.filter_output(args
, ctx
)
47 # kate: syntax python;
48 # kate: indent-mode python; space-indent on; indent-width 4; mixedindent off;
This page took 0.044091 seconds and 3 git commands to generate.