Skip to content

Commit

Permalink
Fix v2
Browse files Browse the repository at this point in the history
  • Loading branch information
clexanis committed Jan 18, 2023
1 parent 25c13a1 commit a642c50
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion root/defaults/chown-shim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
if [[ $* = *"/data"* ]]; then
printf "Warning: ACL mod activated, chown of /data folders disallowed.\n"
exit 1; else
"$(which chown)-noshim $*"; fi
"$(which chown-noshim) $*"; fi
6 changes: 4 additions & 2 deletions root/etc/cont-init.d/98-acl
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ fi
chown -R root:root /root

# Copy chown function into system wise shell startup folder
cp /defaults/mods-disable-chown-data.sh /etc/profile.d/mods-disable-chown-data.sh
chmod 644 /etc/profile.d/mods-disable-chown-data.sh
CHOWN_PATH=$(which chown)
mv "${CHOWN_PATH}" "${CHOWN_PATH}-noshim"
mv "/defaults/chown-shim.sh" "${CHOWN_PATH}"
chmod +x "${CHOWN_PATH}"
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# shellcheck shell=bash
CHOWN_PATH=$(which chown)
mv "${CHOWN_PATH}" "${CHOWN_PATH}-noshim"
mv /defaults/chown-shim.sh "${CHOWN_PATH}"
mv "/defaults/chown-shim.sh" "${CHOWN_PATH}"
chmod +x "${CHOWN_PATH}"

0 comments on commit a642c50

Please sign in to comment.