Use Linux FHS plus /usr/ merge for paths

This commit is contained in:
inference 2024-06-26 15:21:24 +01:00
parent 8f5710576f
commit 1bc332bf26
Signed by: inference
SSH Key Fingerprint: SHA256:K/a677+eHm7chi3X4s77BIpLTE9Vge1tsv+jUL5gI+Y

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- Inferencium - Website - Documentation - hardened_malloc --> <!-- Inferencium - Website - Documentation - hardened_malloc -->
<!-- Version: 5.0.1 --> <!-- Version: 5.0.2-alpha.1 -->
<!-- Copyright 2023 Jake Winters --> <!-- Copyright 2023 Jake Winters -->
<!-- SPDX-License-Identifier: BSD-3-Clause --> <!-- SPDX-License-Identifier: BSD-3-Clause -->
@ -35,11 +35,15 @@
<p>This documentation contains instructions to use <p>This documentation contains instructions to use
<a href="https://github.com/GrapheneOS/hardened_malloc">hardened_malloc</a> <a href="https://github.com/GrapheneOS/hardened_malloc">hardened_malloc</a>
memory allocator as the system's default memory allocator. These instructions apply to both musl and memory allocator as the system's default memory allocator. These instructions apply to both musl and
glibc C libraries on Unix-based and Unix-like systems.</p> glibc C libraries on Linux-based systems.</p>
<p>hardened_malloc can also be used per-application and/or per-user, in which case root permissions are <p>hardened_malloc can also be used per-application and/or per-user, in which case root permissions are
not required; this documentation focuses on system-wide usage of hardened_malloc, assumes root not required; this documentation focuses on system-wide usage of hardened_malloc, assumes root
privileges, and assumes the compiled library will be located in a path readable and executable by all privileges, and assumes the compiled library will be located in a path readable and executable by all
users of the system.</p> users of the system.</p>
<p>This documentation uses
<a href="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html">Linux Filesystem Hierarchy Standard</a>
paths, with the modern <code>/usr/</code> merge approach of most Linux distributions. For non-standard
configurations, adjust the paths accordingly.</p>
<p>For the complete hardened_malloc documentation, visit its <p>For the complete hardened_malloc documentation, visit its
<a href="https://github.com/GrapheneOS/hardened_malloc#hardened_malloc">official documentation</a>.</p> <a href="https://github.com/GrapheneOS/hardened_malloc#hardened_malloc">official documentation</a>.</p>
<p>This documentation is also available in portable AsciiDoc format in my <p>This documentation is also available in portable AsciiDoc format in my
@ -111,13 +115,13 @@
</section> </section>
<section id="copy_library"> <section id="copy_library">
<h2><a href="#copy_library">Copy Compiled hardened_malloc Library</a></h2> <h2><a href="#copy_library">Copy Compiled hardened_malloc Library</a></h2>
<p><code># cp out/libhardened_malloc.so <var>&lt;target path&gt;</var></code></p> <p><code># cp out/libhardened_malloc.so /usr/local/lib/libhardened_malloc.so</code></p>
</section> </section>
<section id="preload_on_boot"> <section id="preload_on_boot">
<h2><a href="#preload_on_boot">Set System to Preload hardened_malloc on Boot</a></h2> <h2><a href="#preload_on_boot">Set System to Preload hardened_malloc on Boot</a></h2>
<p><b>musl-based systems:</b> Add <code>LD_PRELOAD=<var>&lt;hardened_malloc path&gt;</var></code> to <p><b>musl-based systems:</b> Add <code>LD_PRELOAD=/usr/local/lib/libhardened_malloc.so</code> to
<code>/etc/environment</code></p> <code>/etc/environment</code></p>
<p><b>glibc-based systems:</b> Add <code><var>&lt;hardened_malloc path&gt;</var></code> to <p><b>glibc-based systems:</b> Add <code>/usr/local/lib/libhardened_malloc.so</code> to
<code>/etc/ld.so.preload</code></p> <code>/etc/ld.so.preload</code></p>
</section> </section>
<div class="sitemap-small"><a href="../sitemap.xhtml">Sitemap</a></div> <div class="sitemap-small"><a href="../sitemap.xhtml">Sitemap</a></div>