mirror of
https://github.com/google/santa.git
synced 2026-01-15 01:08:12 -05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4346bb29c2 | ||
|
|
09655df8fc |
@@ -82,7 +82,8 @@
|
||||
NSDictionary *requestDict = cursor ? @{kCursor : cursor} : @{};
|
||||
NSDictionary *response = [self performRequest:[self requestWithDictionary:requestDict]];
|
||||
|
||||
if (![response isKindOfClass:[NSDictionary class]]) {
|
||||
if (![response isKindOfClass:[NSDictionary class]] ||
|
||||
![response[kRules] isKindOfClass:[NSArray class]]) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,18 +96,21 @@ void cleanup() {
|
||||
[fm removeItemAtPath:@"/Library/LaunchDaemons/com.google.santad.plist" error:NULL];
|
||||
[SNTDriverManager unloadDriver];
|
||||
[fm removeItemAtPath:@"/Library/Extensions/santa-driver.kext" error:NULL];
|
||||
|
||||
LOGI(@"loading com.google.santa.daemon as a SystemExtension");
|
||||
NSTask *t = [[NSTask alloc] init];
|
||||
t.launchPath = [@(kSantaAppPath) stringByAppendingString:@"/Contents/MacOS/Santa"];
|
||||
t.arguments = @[ @"--load-system-extension" ];
|
||||
[t launch];
|
||||
[t waitUntilExit];
|
||||
|
||||
t = [[NSTask alloc] init];
|
||||
t.launchPath = @"/bin/launchctl";
|
||||
t.arguments = @[ @"remove", @"com.google.santad" ];
|
||||
[t launch];
|
||||
[t waitUntilExit];
|
||||
|
||||
LOGI(@"loading com.google.santa.daemon as a SystemExtension");
|
||||
t = [[NSTask alloc] init];
|
||||
t.launchPath = [@(kSantaAppPath) stringByAppendingString:@"/Contents/MacOS/Santa"];
|
||||
t.arguments = @[ @"--load-system-extension" ];
|
||||
[t launch];
|
||||
[t waitUntilExit];
|
||||
// This exit will likely never be called because the above launchctl command kill us.
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
"""The version for all Santa components."""
|
||||
|
||||
SANTA_VERSION = "1.8"
|
||||
SANTA_VERSION = "1.10"
|
||||
|
||||
Reference in New Issue
Block a user