On 12 Feb 2024, at 18:53, Warner Losh <[email protected]> wrote:
> 
> The branch main has been updated by imp:
> 
> URL: 
> https://cgit.FreeBSD.org/src/commit/?id=0df5f65908dd1913212535e6c4dd4c73ce19c305
> 
> commit 0df5f65908dd1913212535e6c4dd4c73ce19c305
> Author:     Warner Losh <[email protected]>
> AuthorDate: 2024-02-12 18:45:37 +0000
> Commit:     Warner Losh <[email protected]>
> CommitDate: 2024-02-12 18:45:37 +0000
> 
>    reboot: Implement zfs support
> 
>    Implement full support for ZFS -k support. For ZFS, we have to set a
>    property that gets cleared by the boot loaeder for whether or not to
>    process nextboot.conf. Do this using system("zfsbootcfg..." rather than
>    coding the small subset of that program inline to avoid CDDL
>    contamination of reboot and the complications of disabling CDDL and/or
>    ZFS. The few bytes needed to implement reboot for systems with zfs is
>    not worth saving for systems w/o ZFS.

Can we at least use posix_spawn rather than system? The asprintf+system
combo may in practice be safe, especially given the nature of this
tool, but I don’t think it’s a great idea to be writing system-using
code in 2024 when it’s easy to avoid. That way nobody needs to stop and
think carefully about whether the code is safe, because it is by
construction.

Jess


Reply via email to