selinux\_restorecon\_set\_alt\_rootpath(3) SELinux API documentation selinux\_restorecon\_set\_alt\_rootpath(3)

# [NAME](#NAME)

selinux\_restorecon\_set\_alt\_rootpath - set an alternate rootpath.

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;selinux/restorecon.h&gt;**

**int selinux\_restorecon\_set\_alt\_rootpath(const char \*alt\_rootpath);**

# [DESCRIPTION](#DESCRIPTION)

**selinux\_restorecon\_set\_alt\_rootpath**() passes to [**selinux\_restorecon**(3)](/man/os/libselinux/selinux_restorecon.3) a pointer containing an alternate rootpath *alt\_rootpath*.

**selinux\_restorecon\_set\_alt\_rootpath**() must be called prior to [**selinux\_restorecon**(3)](/man/os/libselinux/selinux_restorecon.3).

# [RETURN VALUE](#RETURN_VALUE)

On success, zero is returned. On error, -1 is returned and *errno* is set appropriately.

# [SEE ALSO](#SEE_ALSO)

[**selinux\_restorecon**(3)](/man/os/libselinux/selinux_restorecon.3),  
[**selinux\_restorecon\_set\_sehandle**(3)](/man/os/libselinux/selinux_restorecon_set_sehandle.3),  
[**selinux\_restorecon\_default\_handle**(3)](/man/os/libselinux/selinux_restorecon_default_handle.3),  
[**selinux\_restorecon\_set\_exclude\_list**(3)](/man/os/libselinux/selinux_restorecon_set_exclude_list.3),  
[**selinux\_restorecon\_xattr**(3)](/man/os/libselinux/selinux_restorecon_xattr.3)

29 May 2016 Security Enhanced Linux

---

Document: selinux_restorecon_set_alt_rootpath(3) from libselinux 3.11-r2 (Chainguard OS)
Source: https://github.com/SELinuxProject/selinux.git
