---
name: "audit_name_to_action"
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_action"
---

# audit\_name\_to\_action(3)

Convert the action name to the numeric action value to each other

## NAME

audit\_name\_to\_action, audit\_action\_to\_name - Convert the action name to the numeric action value to each other

## SYNOPSIS

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

**int audit\_name\_to\_action(const char** *\*action***);**

**const char \*audit\_action\_to\_name(int** *action***);**

## DESCRIPTION

**audit\_name\_to\_action**() converts the action name ("never", "possible", "always") to the numeric action value (AUDIT\_NEVER, AUDIT\_POSSIBLE, AUDIT\_ALWAYS). *action* is the action name.

**audit\_action\_to\_name**() converts the numeric action value (AUDIT\_NEVER, AUDIT\_POSSIBLE, AUDIT\_ALWAYS) to the action name ("never", "possible", "always"). *action* is the numeric action value

## RETURN VALUE

**audit\_name\_to\_action**() returns -1 if an error occurs; otherwise, the return value is the numeric action value.

**audit\_action\_to\_name**() returns NULL if an error occurs; otherwise, the return value is the action name.

## AUTHOR

Steve Grubb
