HomeFreeBSD

dumpon: Fix -v causing error when configuring an encrypted dump

Description

dumpon: Fix -v causing error when configuring an encrypted dump

If -v is specified when adding a new device then a full listing of
configured devices is displayed. This requires sysctl access which
genkey()'s use of capability mode was blocking permission to access.
This leads to both confusing console spam but also incorrectly returning
an error status even if no other had been encountered.

dumpon: Sysctl get 'kern.shutdown.dumpdevname': Operation not permitted

Fix this by generating the key in a child process.

Reviewed by: markj
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D31266

Details

Provenance
bdreweryAuthored on Jul 22 2021, 12:37 AM
Reviewer
markj
Differential Revision
D31266: dumpon: Fix -v causing error when configuring an encrypted dump
Parents
R10:b0fa09a0a7e3: linux(4): Fix amd64 gcc build.
Branches
Unknown
Tags
Unknown