Changes for 2.5beta Release

This commit is contained in:
Hendrik Holtmann
2014-02-28 16:28:58 +01:00
parent d52a71e091
commit 063d53b06c
4 changed files with 12 additions and 9 deletions

View File

@ -24,8 +24,8 @@
#import "smcWrapper.h"
#import <CommonCrypto/CommonDigest.h>
//TODO: This is the smcFanControl 2.4 checksum, it needs to be updated for the next release.
NSString * const smc_checksum=@"2ea544babe8a58dccc1364c920d473c8";
//TODO: This is the smcFanControl 2.5ß checksum, it needs to be updated for the next release.
NSString * const smc_checksum=@"03548c5634bd01315b19c46bf329cceb";
static NSArray *allSensors = nil;
@ -54,6 +54,7 @@ static NSArray *allSensors = nil;
c_temp= ((val.bytes[0] * 256 + val.bytes[1]) >> 2)/64;
if (c_temp>0) {
[[NSUserDefaults standardUserDefaults] setObject:sensor forKey:@"TSensor"];
[[NSUserDefaults standardUserDefaults] synchronize];
break;
}
}
@ -168,13 +169,13 @@ static NSArray *allSensors = nil;
// The smc binary is given root permissions in FanControl.m with the setRights method.
+(void)setKey_external:(NSString *)key value:(NSString *)value{
NSString *launchPath = [[NSBundle mainBundle] pathForResource:@"smc" ofType:@""];
//first check if it's the right binary (security)
NSString *checksum=[smcWrapper createCheckSum:launchPath];
//first check if it's the right binary (security)
// MW: Disabled smc binary checksum. This should be re-enabled in an official release.
/*NSString *checksum=[smcWrapper createCheckSum:launchPath];
if (![checksum isEqualToString:smc_checksum]) {
NSLog(@"smcFanControl: Security Error: smc-binary is not the distributed one");
return;
}*/
}
NSArray *argsArray = [NSArray arrayWithObjects: @"-k",key,@"-w",value,nil];
NSTask *task;
task = [[NSTask alloc] init];