HomeFreeBSD

Fix potential TOCTTOU bug in the geli tests

Description

Fix potential TOCTTOU bug in the geli tests

This change mostly reverts r293436, which introduced the bug due to a belief
that geli(8) would allocate md(4) devices by itself. However, that belief is
incorrect. Instead of using linear probing to find available md(4) numbers,
it's best to use the existing attach_md function.

Reviewed by: ngie
MFC after: 2 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D13666

Details

Provenance
asomersAuthored on
Reviewer
ngie
Differential Revision
D13666: Fix potential TOCTTOU bug in the geli tests
Parents
rS327345: Add a crude workaround for ports with flavors
Branches
Unknown
Tags
Unknown