AUDIT\_UPDATE\_WATCH\_PERMS(3) Linux Audit API AUDIT\_UPDATE\_WATCH\_PERMS(3)

# [NAME](#NAME)

audit\_update\_watch\_perms - update permissions field of watch command

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;libaudit.h&gt;**

**int audit\_update\_watch\_perms(struct audit\_rule\_data \*rule,int"perms);"**

# [DESCRIPTION](#DESCRIPTION)

audit\_update\_watch\_perms adds the permission checks to a watch command that is being built. The perms are a bitwise or'ing of: AUDIT\_PERM\_EXEC, AUDIT\_PERM\_WRITE, AUDIT\_PERM\_READ, AUDIT\_PERM\_ATTR.

# [RETURN VALUE](#RETURN_VALUE)

Returns a number &lt; 0 if an error occurs; otherwise, 0 for success.

# [SEE ALSO](#SEE_ALSO)

[**audit\_add\_rule\_data**(3)](/man/os/audit/audit_add_rule_data.3), [**audit\_add\_watch**(3)](/man/os/audit/audit_add_watch.3).

# [AUTHOR](#AUTHOR)

Steve Grubb

Feb 2007 Red Hat

---

Document: audit_update_watch_perms(3) from audit 4.2.1-r3 (Chainguard OS)
Source: https://github.com/linux-audit/audit-userspace
