Skip to content

Commit

Permalink
Changes for 2.5beta Release
Browse files Browse the repository at this point in the history
  • Loading branch information
hholtmann committed Feb 28, 2014
1 parent d52a71e commit 063d53b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
4 changes: 3 additions & 1 deletion Classes/Power.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ static void powerSourceChanged(void * refCon)
}

- (id)init{
[super init];
if (self = [super init]) {

}
return self;
}

Expand Down
11 changes: 6 additions & 5 deletions Classes/smcWrapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -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. checksum, it needs to be updated for the next release.
NSString * const smc_checksum=@"03548c5634bd01315b19c46bf329cceb";
static NSArray *allSensors = nil;


Expand Down Expand Up @@ -54,6 +54,7 @@ +(float) get_maintemp{
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;
}
}
Expand Down Expand Up @@ -168,13 +169,13 @@ + (NSString*)createCheckSum:(NSString*)path {
// 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];
Expand Down
6 changes: 3 additions & 3 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>smcFanControl</string>
<key>CFBundleGetInfoString</key>
<string>smcFanControl 2.5, Hendrik Holtmann (GPL)</string>
<string>smcFanControl 2., Hendrik Holtmann (GPL)</string>
<key>CFBundleIconFile</key>
<string>smcfancontrol_v2</string>
<key>CFBundleIdentifier</key>
Expand All @@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.5</string>
<string>2.</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.5</string>
<string>2.</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSHumanReadableCopyright</key>
Expand Down
Binary file not shown.

0 comments on commit 063d53b

Please sign in to comment.