Page MenuHomeFreeBSD

Remove asprintf from prison_add_allow
Needs ReviewPublic

Authored by jamie on Thu, Aug 21, 9:59 PM.
Tags
None
Referenced Files
F128575339: D52105.id160780.diff
Fri, Sep 12, 3:53 AM
Unknown Object (File)
Wed, Sep 10, 7:20 PM
Unknown Object (File)
Fri, Sep 5, 4:11 AM
Unknown Object (File)
Wed, Aug 27, 4:23 AM
Unknown Object (File)
Wed, Aug 27, 2:35 AM
Unknown Object (File)
Tue, Aug 26, 7:16 AM
Unknown Object (File)
Sun, Aug 24, 11:59 PM
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