---
name: "audit_name_to_flag"
section: "3"
platform: "linux"
package: "audit"
version: "4.2.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/audit_name_to_flag"
---

# audit\_name\_to\_flag(3)

Convert the rule-matching filter name to the numeric rule-matching filter value

## NAME

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

## SYNOPSIS

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

**int audit\_name\_to\_flag(const char** *\*flag***);**

## 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

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

## SEE ALSO

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

## AUTHOR

Steve Grubb
