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)
Wed, Oct 29, 8:04 PM
Unknown Object (File)
Sun, Oct 26, 5:24 PM
Unknown Object (File)
Tue, Oct 21, 5:48 AM
Unknown Object (File)
Oct 21 2025, 3:27 AM
Unknown Object (File)
Oct 14 2025, 4:56 AM
Unknown Object (File)
Oct 12 2025, 11:25 AM
Unknown Object (File)
Oct 12 2025, 11:25 AM
Unknown Object (File)
Oct 12 2025, 12:31 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