git: 3c05a91910d7 - stable/13 - dlopen(3): mention fdlopen for capsicum(4)

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 13 May 2024 14:25:36 UTC
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=3c05a91910d7ee809f884ca6ed46944bfda260e4

commit 3c05a91910d7ee809f884ca6ed46944bfda260e4
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-07 01:45:50 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-13 14:24:57 +0000

    dlopen(3): mention fdlopen for capsicum(4)
    
    Capsicum-sandboxed applications generally cannot use dlopen, as absolute
    and cwd-relative paths cannot be accessed.  Mention that fdlopen is
    useful for sandboxed applications.
    
    PR:             277169
    Reviewed by:    markj, oshogbo
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D45108
    
    (cherry picked from commit d84fd89ecd404ffbf629381d2dde14fd79b39402)
    (cherry picked from commit f2109683ce37927d02965fc97e5757761caf89ed)
---
 lib/libc/gen/dlopen.3 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/libc/gen/dlopen.3 b/lib/libc/gen/dlopen.3
index 94dd1864c126..4719d2733fe5 100644
--- a/lib/libc/gen/dlopen.3
+++ b/lib/libc/gen/dlopen.3
@@ -29,9 +29,7 @@
 .\"
 .\" Copyright (c) 1991 Sun Microsystems, Inc.
 .\"
-.\" @(#) dlopen.3 1.6 90/01/31 SMI
-.\"
-.Dd May 14, 2020
+.Dd May 7, 2024
 .Dt DLOPEN 3
 .Os
 .Sh NAME
@@ -201,6 +199,10 @@ The
 function can be used by the code that needs to perform
 additional checks on the loaded objects, to prevent races with
 symlinking or renames.
+Applications sandboxed using
+.Xr capsicum 4
+can also make beneficial use of
+.Fn fdlopen .
 .Pp
 The
 .Fn dlsym