瀏覽代碼

fix(ksu): selinux_hide fix apply to ALL branches on >=6.6

- Was limited to kernel/common find ., now workspace-wide find so
  catches any path (drivers/kernelsu, kernel/feature, etc.) for
  kernelsu/next/resukisu on 6.6/6.12/all future 6.x
TheWildJames 2 周之前
父節點
當前提交
b3aed3b837
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. 6 5
      .github/actions/kernel-fixes/action.yml

+ 6 - 5
.github/actions/kernel-fixes/action.yml

@@ -88,14 +88,14 @@ runs:
 
     - name: 'Fix selinux_hide pointer-bool-conversion on 6.6+'
       shell: bash
-      working-directory: ${{ github.workspace }}/kernel/common
       run: |
         set -euo pipefail
         KVER="${{ inputs.kernel_version }}"
-        # version >= 6.6 ?
+        # version >= 6.6 ? apply to ALL flavors/branches (kernelsu/next/resukisu, any GKI)
         if [ "$(printf '%s\n' "6.6" "$KVER" | sort -V | head -n1)" = "6.6" ]; then
-          echo "[INFO] KVER $KVER >= 6.6, checking selinux_hide.c"
-          for f in $(find . -name selinux_hide.c 2>/dev/null); do
+          echo "[INFO] KVER $KVER >= 6.6, checking selinux_hide.c (all branches)"
+          # Search workspace-wide so we catch kernel/common/drivers/kernelsu, common/drivers/kernelsu, kernel/KernelSU, etc.
+          for f in $(find "${{ github.workspace }}" -name selinux_hide.c 2>/dev/null); do
             if grep -q "security_dump_masked_av_fn" "$f" && grep -q "if (security_dump_masked_av_fn)" "$f"; then
               echo "[INFO] Patching $f (security_dump_masked_av_fn)"
               sed -i 's/if (security_dump_masked_av_fn)/if (security_dump_masked_av_fn != NULL)/g' "$f"
@@ -106,10 +106,11 @@ runs:
             fi
           done
           if [ -z "${SELINUX_HIDE_FIX:-}" ]; then
+            echo "[INFO] No selinux_hide.c needing patch found"
             echo "SELINUX_HIDE_FIX=not_needed" >> "$GITHUB_ENV"
           fi
         else
-          echo "[SKIP] KVER $KVER < 6.6, no selinux_hide fix"
+          echo "[SKIP] KVER $KVER < 6.6, no selinux_hide fix (covers all branches)"
           echo "SELINUX_HIDE_FIX=skipped" >> "$GITHUB_ENV"
         fi