AUDIT\_NAME\_TO\_FLAG(3) Linux Audit API AUDIT\_NAME\_TO\_FLAG(3)

# [NAME](#NAME)

audit\_name\_to\_flag - Convert the rule-matching filter name to the numeric rule-matching filter value

# [SYNOPSIS](#SYNOPSIS)

```
#include <libaudit.h>
```

```
int audit_name_to_flag(const char *flag);
```

# [DESCRIPTION](#DESCRIPTION)

**audit\_name\_to\_flag**() converts the rule-matching filter name ("task", "exit", "user", "exclude", "filesystem") to the numeric rule-matching filter value (AUDIT\_FILTER\_TASK, AUDIT\_FILTER\_EXIT, AUDIT\_FILTER\_USER, AUDIT\_FILTER\_EXCLUDE, AUDIT\_FILTER\_FS). *flag* is the rule-matching filter name.

# [RETURN VALUE](#RETURN_VALUE)

Returns -1 if an error occurs; otherwise, the return value is the numeric rule-matching filter value.

# [SEE ALSO](#SEE_ALSO)

[**audit\_flag\_to\_name**(3)](/man/os/audit/audit_flag_to_name.3),

# [AUTHOR](#AUTHOR)

Steve Grubb

Mar 2022 Red Hat

---

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