Function libseccomp::notify_id_valid
source · [−]pub fn notify_id_valid(fd: ScmpFd, id: u64) -> Result<(), SeccompError>
Expand description
Checks if a userspace notification is still valid.
A return value of Ok
means the notification is still valid.
Otherwise the notification is not valid. This can be used to mitigate
time-of-check-time-of-use (TOCTOU) attacks as described in seccomp_notify_id_valid(2)
.
This function corresponds to
seccomp_notify_id_valid
.
Arguments
fd
- A file descriptor for the userspace notificationid
- Notification ID
Errors
If the notification ID is invalid, an error will be returned.