| | |
| | | [[ -f "$INFO_PLIST" ]] || fail "Info.plist not found: $INFO_PLIST" |
| | | [[ -x "$EXECUTABLE" ]] || fail "executable not found or not executable: $EXECUTABLE" |
| | | |
| | | unreadable_dirs="$(find "$APP_BUNDLE" -type d ! -perm -005 -print | head -20)" |
| | | if [[ -n "$unreadable_dirs" ]]; then |
| | | fail "app bundle contains directories not readable/searchable by non-root users: $unreadable_dirs" |
| | | fi |
| | | |
| | | unreadable_files="$(find "$APP_BUNDLE" -type f ! -perm -004 -print | head -20)" |
| | | if [[ -n "$unreadable_files" ]]; then |
| | | fail "app bundle contains files not readable by non-root users: $unreadable_files" |
| | | fi |
| | | |
| | | if find "$EXECUTABLE" -type f ! -perm -005 -print | grep -q .; then |
| | | fail "main executable is not readable/executable by non-root users: $EXECUTABLE" |
| | | fi |
| | | |
| | | actual_minimum_system="$(/usr/libexec/PlistBuddy -c 'Print :LSMinimumSystemVersion' "$INFO_PLIST")" |
| | | if [[ "$actual_minimum_system" != "$EXPECTED_MINIMUM_SYSTEM" ]]; then |
| | | fail "LSMinimumSystemVersion expected $EXPECTED_MINIMUM_SYSTEM, got $actual_minimum_system" |