# HG changeset patch # User Michael Schloh von Bennewitz # Date 1248860696 -7200 # Node ID fe330a707a9fba52a348a28fa1ac2a2960330fdc # Parent f83da8c347c441c87b5d4fa683d6a7d6a5c6bdf4 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. diff -r f83da8c347c4 -r fe330a707a9f tunblick/MenuController.m --- a/tunblick/MenuController.m Wed Jul 29 11:37:50 2009 +0200 +++ b/tunblick/MenuController.m Wed Jul 29 11:44:56 2009 +0200 @@ -1003,7 +1003,7 @@ NSString *octalString = [NSString stringWithFormat:@"%o",perms]; NSNumber *fileOwner = [fileAttributes fileOwnerAccountID]; - if ( (![octalString isEqualToString:@"744"]) || (![fileOwner isEqualToNumber:[NSNumber numberWithInt:0]])) { + if ( (![octalString isEqualToString:@"755"]) || (![fileOwner isEqualToNumber:[NSNumber numberWithInt:0]])) { NSLog(@"File %@ has permissions: %@, is owned by %@ and needs repair...\n",currentPath,octalString,fileOwner); return YES; } diff -r f83da8c347c4 -r fe330a707a9f tunblick/installer.m --- a/tunblick/installer.m Wed Jul 29 11:37:50 2009 +0200 +++ b/tunblick/installer.m Wed Jul 29 11:44:56 2009 +0200 @@ -37,24 +37,19 @@ [NSArray arrayWithObjects:@"-R",@"root:wheel",thisBundle,nil] ); - runTask( @"/bin/chmod", - [NSArray arrayWithObjects:@"-R",@"755",tunPath,tapPath,nil] - ); - - runTask( - @"/bin/chmod", - [NSArray arrayWithObjects:@"744", + [NSArray arrayWithObjects:@"755", tunExecutable, tapExecutable, - helperPath, + tunPath, + tapPath, openvpnPath, nil] ); runTask( @"/bin/chmod", - [NSArray arrayWithObjects:@"4111",helperPath,nil] + [NSArray arrayWithObjects:@"4555",helperPath,nil] ); [pool release]; return 0;