Wed, 29 Jul 2009 11:44:56 +0200
Correct file permission modification and the corresponding repair logic.
These changes will require further testing and comparison with the file
modes of original vendor packaging of the tun/tap device driver.
tunblick/MenuController.m | file | annotate | diff | comparison | revisions | |
tunblick/installer.m | file | annotate | diff | comparison | revisions |
1.1 --- a/tunblick/MenuController.m Wed Jul 29 11:37:50 2009 +0200 1.2 +++ b/tunblick/MenuController.m Wed Jul 29 11:44:56 2009 +0200 1.3 @@ -1003,7 +1003,7 @@ 1.4 NSString *octalString = [NSString stringWithFormat:@"%o",perms]; 1.5 NSNumber *fileOwner = [fileAttributes fileOwnerAccountID]; 1.6 1.7 - if ( (![octalString isEqualToString:@"744"]) || (![fileOwner isEqualToNumber:[NSNumber numberWithInt:0]])) { 1.8 + if ( (![octalString isEqualToString:@"755"]) || (![fileOwner isEqualToNumber:[NSNumber numberWithInt:0]])) { 1.9 NSLog(@"File %@ has permissions: %@, is owned by %@ and needs repair...\n",currentPath,octalString,fileOwner); 1.10 return YES; 1.11 }
2.1 --- a/tunblick/installer.m Wed Jul 29 11:37:50 2009 +0200 2.2 +++ b/tunblick/installer.m Wed Jul 29 11:44:56 2009 +0200 2.3 @@ -37,24 +37,19 @@ 2.4 [NSArray arrayWithObjects:@"-R",@"root:wheel",thisBundle,nil] 2.5 ); 2.6 2.7 - 2.8 runTask( 2.9 @"/bin/chmod", 2.10 - [NSArray arrayWithObjects:@"-R",@"755",tunPath,tapPath,nil] 2.11 - ); 2.12 - 2.13 - runTask( 2.14 - @"/bin/chmod", 2.15 - [NSArray arrayWithObjects:@"744", 2.16 + [NSArray arrayWithObjects:@"755", 2.17 tunExecutable, 2.18 tapExecutable, 2.19 - helperPath, 2.20 + tunPath, 2.21 + tapPath, 2.22 openvpnPath, 2.23 nil] 2.24 ); 2.25 runTask( 2.26 @"/bin/chmod", 2.27 - [NSArray arrayWithObjects:@"4111",helperPath,nil] 2.28 + [NSArray arrayWithObjects:@"4555",helperPath,nil] 2.29 ); 2.30 [pool release]; 2.31 return 0;