ldd: ignore unverified files

When mac_veriexec is enforcing, we won't run unverified binaries,
don't let ldd examine them either.

Reviewed by:	stevek emaste
MFC after:	1 week
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D36897
This commit is contained in:
Simon J. Gerraty 2022-10-06 17:51:28 -07:00
parent b05b1ecbef
commit f48114b653

View File

@ -169,7 +169,7 @@ main(int argc, char *argv[])
rval = 0;
for (; argc > 0; argc--, argv++) {
if ((fd = open(*argv, O_RDONLY, 0)) < 0) {
if ((fd = open(*argv, O_RDONLY | O_VERIFY, 0)) < 0) {
warn("%s", *argv);
rval |= 1;
continue;