diff --git a/usr.sbin/pkg_install/version/pkg_version.pl b/usr.sbin/pkg_install/version/pkg_version.pl index 633e1078657..3a575107354 100755 --- a/usr.sbin/pkg_install/version/pkg_version.pl +++ b/usr.sbin/pkg_install/version/pkg_version.pl @@ -324,6 +324,20 @@ while () { } close INDEX; +# +# If we're doing commands output, cripple the output so that users +# can't just pipe the output to sh(1) and expect this to work. +# +if ($ShowCommandsFlag) { + print<