Skip to content

Commit 9caa39c

Browse files
committed
Add RestrictEvents kext
Ensures firmware updates cannot be performed even within the installer
1 parent 48d714d commit 9caa39c

File tree

7 files changed

+50
-5
lines changed

7 files changed

+50
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Add MacPro3,1 to HID patch
55
- Fix missing SSDT-CPBG patch
66
- Fix BlacklistAppleUpdate
7+
- Add RestrictEvents kext
78

89
## 0.0.6
910
- Fix macserial crashing

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,6 @@ At this time, the OpenCore Patcher won't install macOS onto the internal drive i
128128

129129
Reminder that once this is done, you'll need to select OpenCore in the boot picker again for your hardware to remenber this entry and auto boot from then on.
130130

131+
### Cannot run OpenCore Legacy Patcher
132+
133+
If the release tab has permissions/Gatekeeper issues, please [download the main repo](https://github.com/dortania/Opencore-Legacy-Patcher/archive/main.zip) and run that instead.

Resources/BuildOpenCore.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,15 @@ def BuildEFI():
6161
copy(Versions.plist_path, Versions.plist_path_build)
6262
with open(Versions.plist_path_build_full, 'r') as file :
6363
Versions.plist_data = file.read()
64-
65-
print("- Adding Lilu %s" % Versions.lilu_version)
64+
# Adding must have kexts
65+
print("- Adding Lilu v%s" % Versions.lilu_version)
6666
copy(Versions.lilu_path, Versions.kext_path_build)
6767

68-
print("- Adding WhateverGreen %s" % Versions.whatevergreen_version)
68+
print("- Adding WhateverGreen v%s" % Versions.whatevergreen_version)
6969
copy(Versions.whatevergreen_path, Versions.kext_path_build)
70+
71+
print("- Adding RestrictEvents v%s" % Versions.restrictevents_version)
72+
copy(Versions.restrictevents_path, Versions.kext_path_build)
7073

7174
# Checks for kexts
7275
# CPU Kext Patches
@@ -86,7 +89,7 @@ def BuildEFI():
8689
"<true/><!--AAAMouSSE-->"
8790
)
8891
if current_model in ModelArray.MissingSSE42:
89-
print("- Adding telemetrap %s" % Versions.telemetrap_version)
92+
print("- Adding telemetrap v%s" % Versions.telemetrap_version)
9093
copy(Versions.telemetrap_path, Versions.kext_path_build)
9194
Versions.plist_data = Versions.plist_data.replace(
9295
"<false/><!--telemetrap-->",
@@ -110,7 +113,7 @@ def BuildEFI():
110113
"<true/><!--MarvelYukonEthernet-->"
111114
)
112115
if current_model in ModelArray.EthernetBroadcom:
113-
print("- Adding CatalinaBCM5701Ethernet %s" % Versions.bcm570_version)
116+
print("- Adding CatalinaBCM5701Ethernet v%s" % Versions.bcm570_version)
114117
copy(Versions.bcm570_path, Versions.kext_path_build)
115118
Versions.plist_data = Versions.plist_data.replace(
116119
"<false/><!--CatalinaBCM5701Ethernet-->",

Resources/Versions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
io80211high_sierra_version = "1.0.0"
2525
io80211mojave_version = "1.0.0"
2626
voodoohda_version = "296"
27+
restrictevents_version = "1.0.0"
2728

2829
# List current location
2930
os.chdir(os.path.dirname(os.path.realpath(__file__)))
@@ -45,6 +46,7 @@
4546
lilu_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "Lilu-v%s.zip" % lilu_version)
4647
whatevergreen_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "WhateverGreen-v%s.zip" % whatevergreen_version)
4748
airportbcrmfixup_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "AirportBrcmFixup-v%s.zip" % airportbcrmfixup_version)
49+
restrictevents_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "RestrictEvents-v%s.zip" % restrictevents_version)
4850
bcm570_path = os.path.join(current_path, "payloads/Kexts/Ethernet/" "CatalinaBCM5701Ethernet-v%s.zip" % bcm570_version)
4951
marvel_path = os.path.join(current_path, "payloads/Kexts/Ethernet/" "MarvelYukonEthernet-v%s.zip" % marvel_version)
5052
nforce_path = os.path.join(current_path, "payloads/Kexts/Ethernet/" "nForceEthernet-v%s.zip" % nforce_version)

payloads/Config/v0.6.3/config.plist

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,24 @@
210210
<key>PlistPath</key>
211211
<string>Contents/Info.plist</string>
212212
</dict>
213+
<dict>
214+
<key>Arch</key>
215+
<string>x86_64</string>
216+
<key>Comment</key>
217+
<string>Process Blocker</string>
218+
<key>Enabled</key>
219+
<true/><!--RestrictEvents-->
220+
<key>MaxKernel</key>
221+
<string></string>
222+
<key>MinKernel</key>
223+
<string></string>
224+
<key>BundlePath</key>
225+
<string>RestrictEvents.kext</string>
226+
<key>ExecutablePath</key>
227+
<string>Contents/MacOS/RestrictEvents</string>
228+
<key>PlistPath</key>
229+
<string>Contents/Info.plist</string>
230+
</dict>
213231
<dict>
214232
<key>Arch</key>
215233
<string>x86_64</string>

payloads/Config/v0.6.4/config.plist

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,24 @@
212212
<key>PlistPath</key>
213213
<string>Contents/Info.plist</string>
214214
</dict>
215+
<dict>
216+
<key>Arch</key>
217+
<string>x86_64</string>
218+
<key>Comment</key>
219+
<string>Process Blocker</string>
220+
<key>Enabled</key>
221+
<true/><!--RestrictEvents-->
222+
<key>MaxKernel</key>
223+
<string></string>
224+
<key>MinKernel</key>
225+
<string></string>
226+
<key>BundlePath</key>
227+
<string>RestrictEvents.kext</string>
228+
<key>ExecutablePath</key>
229+
<string>Contents/MacOS/RestrictEvents</string>
230+
<key>PlistPath</key>
231+
<string>Contents/Info.plist</string>
232+
</dict>
215233
<dict>
216234
<key>Arch</key>
217235
<string>x86_64</string>
15.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)