selinux\_lsetfilecon\_default(3) SELinux API documentation selinux\_lsetfilecon\_default(3)

# [NAME](#NAME)

selinux\_lsetfilecon\_default - set the file context to the system defaults

# [SYNOPSIS](#SYNOPSIS)

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

**int selinux\_lsetfilecon\_default(const char \*path);**

# [DESCRIPTION](#DESCRIPTION)

**selinux\_lsetfilecon\_default**() sets the file context to the system defaults.

# [RETURN VALUE](#RETURN_VALUE)

Returns zero on success or -1 otherwise.

# [SEE ALSO](#SEE_ALSO)

[**selinux**(8)](/man/os/libselinux/selinux.8), [**selinux\_file\_context\_cmp**(3)](/man/os/libselinux/selinux_file_context_cmp.3), [**selinux\_file\_context\_verify**(3)](/man/os/libselinux/selinux_file_context_verify.3), [**matchpathcon**(3)](/man/os/libselinux/matchpathcon.3), [**freecon**(3)](/man/os/libselinux/freecon.3), [**setfilecon**(3)](/man/os/libselinux/setfilecon.3), [**setfscreatecon**(3)](/man/os/libselinux/setfscreatecon.3)

21 November 2009 stephen.smalley.work@gmail.com

---

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