---
name: "acl_dup"
section: "3"
platform: "linux"
package: "acl"
version: "2.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/acl_dup"
---

# acl\_dup(3)

duplicate an ACL

## NAME

**acl\_dup** – duplicate an ACL

## LIBRARY

Linux Access Control Lists library (libacl, -lacl).

## SYNOPSIS

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

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

*acl\_t*\

**acl\_dup**(*acl\_t acl*);

## DESCRIPTION

The **acl\_dup**() function returns a pointer to a copy of the ACL pointed to by *acl*.

This function may cause memory to be allocated.  The caller should free any releasable memory, when the new ACL is no longer required, by calling [acl\_free(3)](/acl_free/3.md) with the *(void\*)acl\_t* returned by **acl\_dup**() as an argument.

## RETURN VALUE

On success, this function returns a pointer to the working storage.  On error, a value of (acl\_t)NULL is returned, and *errno* is set appropriately.

## ERRORS

If any of the following conditions occur, the **acl\_dup**() function returns a value of (acl\_t)NULL and sets *errno* to the corresponding value:

- \[EINVAL\]

  The argument *acl* is not a valid pointer to an ACL.

- \[ENOMEM\]

  The *acl\_t* to be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints.

## STANDARDS

IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)

## SEE ALSO

[acl\_free(3)](/acl_free/3.md), [acl\_get\_entry(3)](/acl_get_entry/3.md), [acl(5)](/acl/5.md)

## AUTHOR

Derived from the FreeBSD manual pages written by Robert N M Watson ⟨rwatson@FreeBSD.org⟩, and adapted for Linux by Andreas Gruenbacher ⟨andreas.gruenbacher@gmail.com⟩.
