/lQ d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z ddl
mZ edd Z ej
e Z G d d Z G d d
ZdS )u
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Copyright © 2019 Cloud Linux Software Inc.
This software is also available under ImunifyAV commercial license,
see
)
namedtupleN)sysctlEvent)pathflagscookienamewdc e Zd ZdZdZdZdZdZdZdZ dZ
d Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZd ej dk rdnd Z ej ed Z e j! d Z"e#d Z$e#d Z%e#d Z&e#d! Z'e#d" Z(e#d# Z)d$S )%InotifyzE
Tiny wrapper for inotify api. See `man inotify` for details
@ i i i i @ i i i i i i @l zlibc.{}Darwinzso.6dylibT) use_errnoiIIIc t t j | | }|dk r5t j }t |t
j | |S )a
Wrapper to all calls to C functions. Raises OSError with appropriate
errno as argument in case of error return value.
:param method: method to call
:param args: method args
:return: called function return value in case of success
)getattrr _libcctypes get_errnoOSErrorosstrerror)methodargsreterrnos T/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/subsys/ainotify.py_callz
Inotify._callI sR -ggmV,,d3"99$&&E%U!3!3444
c 6 t d S )z
Initialize an inotify instance.
See `man inotify_init` for details
:return: a file descriptor of new inotify instance
inotify_initr r) r* r( initzInotify.initX s }}^,,,r* c <