Add constructor taking native_handle_t by tgmatos · Pull Request #72 · boostorg/dll · GitHub
Skip to content

Add constructor taking native_handle_t - #72

Merged
apolukhin merged 1 commit into
boostorg:developfrom
tgmatos:develop
Dec 21, 2024
Merged

Add constructor taking native_handle_t#72
apolukhin merged 1 commit into
boostorg:developfrom
tgmatos:develop

Conversation

@tgmatos

@tgmatos tgmatos commented Aug 25, 2024

Copy link
Copy Markdown

Calls to dlopen() will always fail on FreeBSD if ambient authority is disabled (i.e. process is in capsicum mode). For these cases, FreeBSD offers fdlopen(). The new constructor allows the user to explicitly call fdlopen() and then use Boost.DLL to manage the loaded plugin.

Android's libc (Bionic) also has fdlopen(), but under a different name: android_dlopen_ext().

As Linux implements a sandboxing model closer to Capsicum (that's already planned in the roadmap for the Landlock subsystem), similar restrictions will hit glibc and we might see fdlopen() in glibc as well.

This patch resolves issue #69

(This patch was made by a friend of mine and I am just submitting it.)

Calls to dlopen() will always fail on FreeBSD if ambient authority is
disabled (i.e. process is in capsicum mode). For these cases, FreeBSD
offers fdlopen(). The new constructor allows the user to explicitly call
fdlopen() and then use Boost.DLL to manage the loaded plugin.

Android's libc (Bionic) also has fdlopen(), but under a different name:
android_dlopen_ext().

As Linux implements a sandboxing model closer to Capsicum (that's
already planned in the roadmap for the Landlock subsystem), similar
restrictions will hit glibc and we might see fdlopen() in glibc as well.
@apolukhin
apolukhin merged commit 7cbc0d4 into boostorg:develop Dec 21, 2024
@apolukhin

Copy link
Copy Markdown
Member

apolukhin added a commit that referenced this pull request Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants