Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions hook-tests/060-verify-file-permissions.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ for SHADOW in etc/shadow etc/gshadow var/lib/extrausers/shadow var/lib/extrauser
exit 1
fi
done

# Verify permissions on usr/sbin/unix_chkpwd
PERMISSIONS="$(stat -c "%a %g %u" usr/sbin/unix_chkpwd)"
if [ "$PERMISSIONS" != "2755 42 0" ]; then
echo "The permissions of usr/sbin/unix_chkpwd are incorrect."
echo "Expected: 2755 42 0"
echo "Actual: $PERMISSIONS"
exit 1
fi
4 changes: 4 additions & 0 deletions hooks/010-fixup-permissions.chroot
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ chmod 4754 usr/lib/dbus-1.0/dbus-daemon-launch-helper
# this matches the expected setup on resolute
chown root:shadow etc/shadow etc/gshadow
chmod 640 etc/shadow etc/gshadow

# Same for the unix_chkpwd script, match group and setgid
chown root:shadow usr/sbin/unix_chkpwd
chmod 2755 usr/sbin/unix_chkpwd
Loading