---
name: "selinux_restorecon_set_alt_rootpath"
section: "3"
platform: "linux"
package: "libselinux1-dev"
version: "3.8.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/selinux_restorecon_set_alt_rootpath"
---

# selinux\_restorecon\_set\_alt\_rootpath(3)

set an alternate rootpath.

## NAME

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

## SYNOPSIS

**#include \<selinux/restorecon.h\>**

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

## DESCRIPTION

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

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

## RETURN VALUE

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

## SEE ALSO

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