]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dumpon: Fix -v causing error when configuring an encrypted dump
authorBryan Drewery <bdrewery@FreeBSD.org>
Thu, 22 Jul 2021 00:37:03 +0000 (17:37 -0700)
committerBryan Drewery <bdrewery@FreeBSD.org>
Mon, 26 Jul 2021 20:08:59 +0000 (13:08 -0700)
commit372557d8c3d37dd0c1d9be56513a436393963848
tree01aa1d81baebd8808fa7527bfedafc27f1d46f51
parentb0fa09a0a7e30f301cc58750dedb3d88ec39992d
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
sbin/dumpon/dumpon.c