---
name: "acl_cmp_np"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/acl_cmp"
---

# acl\_cmp\_np(3)

compare between two ACLs

Part of [acl\_cmp(3)](/acl_cmp/3.md).

## NAME

**acl\_cmp** – compare between two ACLs

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<sys/types.h\>**

**#include \<sys/acl.h\>**

*int*\

**acl\_cmp\_np**(*acl\_t acl1*, *acl\_t acl2*);

## DESCRIPTION

The **acl\_cmp\_np**() function is a non-portable call that checks if ACLs pointed to by *acl1* and *acl2* are equivalent. The two ACLs are considered equal when they contain the same entries with matching tag types, qualifiers and permissions.

## RETURN VALUES

Upon successful completion, this function returns 0 if the given ACLs are equivalent and 1 if they differ. Otherwise, the value -1 is returned, and *errno* indicates the error.

## ERRORS

If any of the following conditions occur, the **acl\_cmp\_np**() function shall return a value of *-1* and set *errno* to the corresponding value:

- \[EINVAL\]

  Either first or second argument does not point to a valid ACL.

## SEE ALSO

[acl(3)](/acl/3.md), [posix1e(3)](/posix1e/3.md)

## STANDARDS

POSIX.1e is described in IEEE POSIX.1e draft 17. Discussion of the draft continues on the cross-platform POSIX.1e implementation mailing list. To join this list, see the FreeBSD POSIX.1e implementation page for more information.

## HISTORY

POSIX.1e support was introduced in FreeBSD 4.0, and development continues.

## AUTHORS

Gleb Popov
