Skyld AV
0.6
On access virus scanning for Linux
|
Polls mount and unmout events. More...
#include <MountPolling.h>
Public Types | |
enum | Status { INITIAL = 0, RUNNING = 1, STOPPING = 2, FAILURE = 3, SUCCESS = 4 } |
Status that may occur. More... | |
typedef void(* | callbackptr )() |
Pointer to callback function for polling mounts. More... | |
Public Member Functions | |
MountPolling (int ffd, Environment *) | |
~MountPolling () | |
Deletes mount polling object. More... | |
Private Member Functions | |
void | callback () |
Tracks mountevents. More... | |
int | isFuse (const char *) |
Checks if a mount is using a filesystem in userspace (fuse). More... | |
MountPolling (const MountPolling &) | |
Static Private Member Functions | |
static void * | run (void *) |
Thread listening to mount events. More... | |
Private Attributes | |
Environment * | env |
Environment. More... | |
int | fd |
Fanotify file descriptor. More... | |
StringSet * | mounts |
Mounts. More... | |
StringSet * | nomarkfs |
File systems that shall not be tracked. More... | |
StringSet * | nomarkmnt |
Mount points that shall not be tracked. More... | |
sig_atomic_t | status |
Status of thread. More... | |
Polls mount and unmout events.
Definition at line 36 of file MountPolling.h.
typedef void(* MountPolling::callbackptr)() |
Pointer to callback function for polling mounts.
Definition at line 53 of file MountPolling.h.
enum MountPolling::Status |
Status that may occur.
Enumerator | |
---|---|
INITIAL | |
RUNNING | |
STOPPING | |
FAILURE | |
SUCCESS |
Definition at line 42 of file MountPolling.h.
MountPolling::MountPolling | ( | int | ffd, |
Environment * | e | ||
) |
Creates new mount polling object.
nomarkfs | |
nomarkmnt |
Definition at line 196 of file MountPolling.cc.
MountPolling::~MountPolling | ( | ) |
Deletes mount polling object.
Definition at line 246 of file MountPolling.cc.
|
private |
|
private |
Tracks mountevents.
Definition at line 126 of file MountPolling.cc.
|
private |
Checks if a mount is using a filesystem in userspace (fuse).
type | mount type |
Definition at line 178 of file MountPolling.cc.
|
staticprivate |
Thread listening to mount events.
ccbptr | pointer to callback routine |
set of file descriptors to be monitored.
number of file descriptors.
buffer for strerror_r.
Definition at line 59 of file MountPolling.cc.
|
private |
Definition at line 60 of file MountPolling.h.
|
private |
Fanotify file descriptor.
Definition at line 64 of file MountPolling.h.
|
private |
Mounts.
Definition at line 68 of file MountPolling.h.
|
private |
File systems that shall not be tracked.
Definition at line 72 of file MountPolling.h.
|
private |
Mount points that shall not be tracked.
Definition at line 76 of file MountPolling.h.
|
private |
Status of thread.
Definition at line 81 of file MountPolling.h.