2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-10-21 07:08:12 +00:00

fix(probe): preserve Debian library directory permissions

The Debian package set the xCAT helper directory to 0644, preventing
unprivileged users from loading the probe modules.

Set library directories to 0755 and regular files to 0644. Repair the old
helper-directory mode during configuration because dpkg preserves existing
modes. Leave administrator overrides, other modes, and symlinks unchanged.
This commit is contained in:
Vinícius Ferrão
2026-10-08 20:31:22 -03:00
parent ba4824ef62
commit be8ce8b975
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -20,6 +20,12 @@ set -e
case "$1" in
configure)
probe_lib=/opt/xcat/probe/lib/perl/xCAT
if [ -d "$probe_lib" ] && [ ! -L "$probe_lib" ] &&
[ "$(stat -c %a "$probe_lib")" = 644 ] &&
! dpkg-statoverride --list "$probe_lib" >/dev/null; then
chmod 755 "$probe_lib"
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
+2 -2
View File
@@ -42,8 +42,8 @@ binary-arch:
dh_install -X".svn"
chmod 755 `pwd`/debian/xcat-probe/opt/xcat/bin/*
chmod 755 `pwd`/debian/xcat-probe/opt/xcat/probe/subcmds/*
chmod 644 `pwd`/debian/xcat-probe/opt/xcat/probe/lib/perl/*
chmod 644 `pwd`/debian/xcat-probe/opt/xcat/probe/lib/perl/xCAT/*
find `pwd`/debian/xcat-probe/opt/xcat/probe/lib -type d -exec chmod 755 {} +
find `pwd`/debian/xcat-probe/opt/xcat/probe/lib -type f -exec chmod 644 {} +
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate