semanage\_set\_root(3) Libsemanage API documentation semanage\_set\_root(3)

# [NAME](#NAME)

semanage\_set\_root, semanage\_root - SELinux Management API

# [SYNOPSIS](#SYNOPSIS)

Set/get the alternate root directory for SELinux configuration directory.

**#include &lt;semanage/handle.h&gt;**

**extern int semanage\_set\_root(const char \*path);**

**extern const char \*semanage\_root(void);**

# [DESCRIPTION](#DESCRIPTION)

[The function semanage\_set\_root() sets an alternate root directory for SELinux configuration paths to be used by the semanage library.](#The)

# [RETURN VALUE](#RETURN_VALUE)

The function semanage\_set\_root() returns -1 in case of failure. Otherwise, 0 is returned.

The function semanage\_root() returns the semanage root. The returned value should not be modified by the caller.

# [SEE ALSO](#SEE_ALSO)

[**semanage\_handle\_create**(3)](/man/os/libsemanage/semanage_handle_create.3), [**semanage\_connect**(3)](/man/os/libsemanage/semanage_connect.3),

1 June 2011 dwalsh@redhat.com

---

Document: semanage_set_root(3) from libsemanage 3.11-r3 (Chainguard OS)
Source: https://github.com/SELinuxProject/selinux.git
