]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
install: handle -m +X more accurately
authorKyle Evans <kevans@FreeBSD.org>
Thu, 19 Oct 2023 02:43:06 +0000 (21:43 -0500)
committerKyle Evans <kevans@FreeBSD.org>
Sun, 26 Nov 2023 04:07:17 +0000 (22:07 -0600)
commit2c7e964254f0535e9f93e811383ff9b272d2ca29
treec3415a1ee031e3b33def61223a25f0bf6c55d2a7
parentd0e771e2fd23ca65024ee3026584a020057c166b
install: handle -m +X more accurately

As described by chmod(1), +X in the mode may be used to optionally set
the +x bit if the file is a directory if any of the execute/search bits
are set in the original mode.  The latter is not applicable because we
assume -m is a fresh mask, but a functional +X could be useful in the
former case if we're passing along a common INSTALL_MODE that's designed
to install either 0644 or 0755 depending simply on whether it's a
directory or not.

Reviewed by: des
Sponsored by: Klara, Inc.

(cherry picked from commit 767c97c501ae72eb3d74bc23ddf5a1d570d8f841)
usr.bin/xinstall/tests/install_test.sh
usr.bin/xinstall/xinstall.c