• Home
  • Raw
  • Download

Lines Matching +full:require +full:- +full:main +full:- +full:filename

2 # -*- coding: utf-8 -*-
10 # http://www.apache.org/licenses/LICENSE-2.0
44 # http://www.apache.org/licenses/LICENSE-2.0
57 LINE_RE = re.compile(r'^\s*(?:\[[^]]*\]|\d+)?\s*([a-zA-Z0-9_]+)\(([^)<]*)')
79 # pylint: disable=too-few-public-methods
91 strace_line_re = re.compile(r'[a-z]+[0-9]*\(.+\) += ')
94 for filename in values:
95 if not os.path.exists(filename):
96 parser.error(f'Input file {filename} not found.')
97 with open(filename, mode='r', encoding='utf8') as input_file:
100 traces.append(filename)
103 audit_logs.append(filename)
108 traces.append(filename)
112 # pylint: enable=too-few-public-methods
118 parser.add_argument('--verbose', action='store_true',
120 parser.add_argument('--frequency', type=argparse.FileType('w'),
122 parser.add_argument('--policy', type=argparse.FileType('w'),
124 parser.add_argument('input-logs', action=BucketInputFiles,
126 parser.add_argument('--audit-comm', type=str, metavar='PROCESS_NAME',
132 'Please install the python3-audit (sometimes python-audit)'
137 parser.error(f'--audit-comm is required when using audit logs as input:'
141 parser.error('--audit-comm was specified yet none of the input files '
148 """Returns a minijail seccomp-bpf filter expression for the syscall."""
203 unknown_syscall_re = re.compile(r'unknown-syscall\((?P<syscall_num>\d+)\)')
240 # despite the event-specific search filter. Skip those.
251 # of integers. E.g '16' -> 'ioctl'.
255 # audit-userspace and remove this workaround.
256 # This is redundant but safe for non-ARM architectures due to the
265 # Skip SECCOMP records for syscalls that require argument
267 # that do not require argument inspection. Technically such
279 # E.g '5401' -> 'TCGETS'.
286 def main(argv=None): function
287 """Main entrypoint."""
358 sys.exit(main(sys.argv[1:]))