Module Name: src Committed By: roy Date: Sun Apr 19 22:10:24 UTC 2020
Modified Files: src/usr.sbin/postinstall: postinstall.in Log Message: postinstall: ensure contents_owner fix fails on find errors The issue is that find won't pass anything to xargs and that returns 0. So replace the usage of xargs with -exec. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/postinstall/postinstall.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/postinstall/postinstall.in diff -u src/usr.sbin/postinstall/postinstall.in:1.19 src/usr.sbin/postinstall/postinstall.in:1.20 --- src/usr.sbin/postinstall/postinstall.in:1.19 Thu Apr 9 15:24:31 2020 +++ src/usr.sbin/postinstall/postinstall.in Sun Apr 19 22:10:24 2020 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall.in,v 1.19 2020/04/09 15:24:31 roy Exp $ +# $NetBSD: postinstall.in,v 1.20 2020/04/19 22:10:24 roy Exp $ # # Copyright (c) 2002-2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -750,8 +750,8 @@ contents_owner() fi elif [ "${_op}" = "fix" ]; then find "${_dir}" \( \( ! -user "${_user}" \) -o \ - \( ! -group "${_grp}" \) \) -a -print0 \ - | xargs -0 chown "${_user}:${_grp}" + \( ! -group "${_grp}" \) \) \ + -exec chown "${_user}:${_grp}" -- {} \; fi }