Skip to content

Commit

Permalink
Make trustd not go crazy on iOS 12
Browse files Browse the repository at this point in the history
  • Loading branch information
pwn20wndstuff committed Mar 13, 2019
1 parent 2b15805 commit 87edbc3
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Undecimus/source/JailbreakViewController.m
Expand Up @@ -1253,14 +1253,14 @@ void jailbreak()
UPSTAGE();

{
if (prefs.disable_app_revokes) {
NSArray <NSString *> *array = @[@"/var/Keychains/ocspcache.sqlite3",
@"/var/Keychains/ocspcache.sqlite3-shm",
@"/var/Keychains/ocspcache.sqlite3-wal"];
if (prefs.disable_app_revokes && kCFCoreFoundationVersionNumber < 1535.12) {
// Disable app revokes.
LOG("Disabling app revokes...");
SETMESSAGE(NSLocalizedString(@"Failed to disable app revokes.", nil));
blockDomainWithName("ocsp.apple.com");
NSArray <NSString *> *array = @[@"/var/Keychains/ocspcache.sqlite3",
@"/var/Keychains/ocspcache.sqlite3-shm",
@"/var/Keychains/ocspcache.sqlite3-wal"];
for (NSString *path in array) {
ensure_symlink("/dev/null", path.UTF8String);
}
Expand All @@ -1271,6 +1271,11 @@ void jailbreak()
LOG("Enabling app revokes...");
SETMESSAGE(NSLocalizedString(@"Failed to enable app revokes.", nil));
unblockDomainWithName("ocsp.apple.com");
for (NSString *path in array) {
if (is_symlink(path.UTF8String)) {
clean_file(path.UTF8String);
}
}
LOG("Successfully enabled app revokes.");
INSERTSTATUS(NSLocalizedString(@"Enabled App Revokes.\n", nil));
}
Expand Down Expand Up @@ -2075,13 +2080,14 @@ void jailbreak()
SETMESSAGE(NSLocalizedString(@"Failed to load tweaks.", nil));
if (prefs.reload_system_daemons) {
rv = system("nohup bash -c \""
"sleep 1 ;"
"launchctl unload /System/Library/LaunchDaemons/com.apple.backboardd.plist && "
"sleep 2 && "
"ldrestart ;"
"launchctl load /System/Library/LaunchDaemons/com.apple.backboardd.plist"
"\" >/dev/null 2>&1 &");
} else {
rv = system("nohup bash -c \""
"sleep 1 ;"
"launchctl stop com.apple.mDNSResponder ;"
"launchctl stop com.apple.backboardd"
"\" >/dev/null 2>&1 &");
Expand Down

0 comments on commit 87edbc3

Please sign in to comment.