zfs/etc
Alyssa Ross 1f19826c9a
etc/systemd/zfs-mount-generator: avoid strndupa
The non-standard strndupa function is not implemented by musl libc,
and can be dangerous due to its potential to blow the stack.  (musl
_does_ implement strdupa, used elsewhere in this function.)

With a similar amount of code, we can use a heap allocation to
construct the pool name, which is musl-friendly and doesn't have
potential stack problems.

(Why care about musl when systemd only supports glibc?  Some distros
patch systemd with portability fixes, and it would be nice to be able
to use ZFS on those distros.)

 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alyssa Ross <alyssa.ross@unikie.com>
Closes #14327
2023-01-10 13:40:31 -08:00
..
default autoconf: use include directives instead of recursing down etc 2022-05-10 10:19:58 -07:00
init.d Update zfs-mount to load before fstab, matches systemd service. 2022-09-26 17:11:43 -07:00
modules-load.d autoconf: use include directives instead of recursing down etc 2022-05-10 10:19:58 -07:00
sudoers.d autoconf: use include directives instead of recursing down etc 2022-05-10 10:19:58 -07:00
systemd etc/systemd/zfs-mount-generator: avoid strndupa 2023-01-10 13:40:31 -08:00
zfs autoconf: use include directives instead of recursing down etc 2022-05-10 10:19:58 -07:00
Makefile.am etc: mask zfs-load-key.service 2022-10-12 15:27:55 -07:00