Page MenuHomeFreeBSD

Remove asprintf from prison_add_allow
Needs ReviewPublic

Authored by jamie on Aug 21 2025, 9:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 4, 11:49 PM
Unknown Object (File)
May 17 2026, 1:17 AM
Unknown Object (File)
May 17 2026, 1:17 AM
Unknown Object (File)
May 17 2026, 1:03 AM
Unknown Object (File)
May 14 2026, 3:59 AM
Unknown Object (File)
May 13 2026, 5:38 PM
Unknown Object (File)
May 10 2026, 11:09 PM
Unknown Object (File)
May 5 2026, 3:22 AM
Subscribers

Details

Reviewers
kevans
Group Reviewers
Jails
Summary

asprintf(9) uses as non-blocking malloc(9), which might fail. Since prison_add_allow is only ever expected in a non-blocking context, there's no reason to accept that failure.

There's no blocking or flagged version of asprintf(9), but it's no more than a simple wrapper around malloc and snprintf, so use those instead.

As a bonus, fix to it will compile without NO_SYSCTL_DESCR defined.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped