paranoidandroid-cvs Mailing List for Paranoid Android
Brought to you by:
smeger
You can subscribe to this list here.
2006 |
Jan
|
Feb
(12) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Jason H. <sm...@us...> - 2006-02-22 00:51:20
|
Update of /cvsroot/paranoidandroid/paranoidandroid/Sources/APE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28798/Sources/APE Modified Files: PatchFunctions.c PatchFunctions.h Patches.c Log Message: The path of the custom app might not be null-terminated. Index: Patches.c =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/APE/Patches.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Patches.c 21 Feb 2006 22:16:32 -0000 1.2 --- Patches.c 22 Feb 2006 00:51:15 -0000 1.3 *************** *** 34,37 **** --- 34,44 ---- RequiredPatch( header, + "_LSGetApplicationForItem", + gMMC_LSGetApplicationForItem, + MMC_LSGetApplicationForItem_FuncPtr, + MMC_My_LSGetApplicationForItem + ); + RequiredPatch( + header, "_LSOpenFromRefSpec", gMMC_LSOpenFromRefSpec, *************** *** 79,82 **** --- 86,128 ---- OSStatus + MMC_My_LSGetApplicationForItem + ( const FSRef *inItemRef, + LSRolesMask inRoleMask, + FSRef *outAppRef, + CFURLRef *outAppURL ) + { + if ( gParanoidAndroidShouldPatch && inItemRef ) + { + bool canProceed; + + pthread_mutex_lock(&gLock); + canProceed = ! gFileIsBeingOpened; + pthread_mutex_unlock(&gLock); + + if ( canProceed ) + { + pthread_mutex_lock(&gLock); + gFileIsBeingOpened = true; + pthread_mutex_unlock(&gLock); + + // what if we have multiple FSRefs? Who knows... + CFURLRef currentURL = CFURLCreateFromFSRef(kCFAllocatorDefault, inItemRef); + gCurrentURL = currentURL; + OSStatus result = gMMC_LSGetApplicationForItem(inItemRef, inRoleMask, outAppRef, outAppURL); + CFRelease(currentURL); + + pthread_mutex_lock(&gLock); + gFileIsBeingOpened = false; + pthread_mutex_unlock(&gLock); + + return result; + } + } + + return gMMC_LSGetApplicationForItem(inItemRef, inRoleMask, outAppRef, outAppURL); + } + + + OSStatus MMC_My_LSOpenFromRefSpec ( const LSLaunchFSRefSpec *inLaunchSpec, *************** *** 201,216 **** if ( noErr == result ) { ! if ( *outHandle && 1028 == GetHandleSize(*outHandle) && **(long **)*outHandle <= 1024 ) { ! char const *path = (char const *) &(((long *)**outHandle)[1]); ! if ( ! ShouldPermitRemapping(gCurrentURL, path) ) { ! // let the handle leak rather than calling private API to close it ! *outHandle = NULL; ! return resNotFound; } } ! return noErr; ! } } } --- 247,270 ---- if ( noErr == result ) { ! if ( *outHandle && 1028 == GetHandleSize(*outHandle) ) { ! size_t pathLength = **(long **)*outHandle; ! if ( pathLength > 0 && pathLength <= 1024 ) { ! char const *path = (char const *) &(((long *)**outHandle)[1]); ! char *_path = malloc(pathLength); ! memcpy(_path, path, pathLength); ! bool shouldPermit = ShouldPermitRemapping(gCurrentURL, _path); ! free(_path); ! if ( ! shouldPermit ) ! { ! // let the handle leak rather than calling private API to close it ! *outHandle = NULL; ! return resNotFound; ! } } + return noErr; } ! } } } Index: PatchFunctions.c =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/APE/PatchFunctions.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PatchFunctions.c 21 Feb 2006 22:16:32 -0000 1.2 --- PatchFunctions.c 22 Feb 2006 00:51:15 -0000 1.3 *************** *** 15,18 **** --- 15,19 ---- char const * const kParAnd_LaunchServicesFramework = "./LaunchServices"; + MMC_LSGetApplicationForItem_FuncPtr gMMC_LSGetApplicationForItem = NULL; MMC_LSOpenFromRefSpec_FuncPtr gMMC_LSOpenFromRefSpec = NULL; MMC_LSOpenFromURLSpec_FuncPtr gMMC_LSOpenFromURLSpec = NULL; Index: PatchFunctions.h =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/APE/PatchFunctions.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PatchFunctions.h 21 Feb 2006 22:16:32 -0000 1.2 --- PatchFunctions.h 22 Feb 2006 00:51:15 -0000 1.3 *************** *** 21,24 **** --- 21,35 ---- extern char const * const kParAnd_LaunchServicesFramework; + // LSGetApplicationForItem + typedef OSStatus (*MMC_LSGetApplicationForItem_FuncPtr) ( const FSRef *inItemRef, + LSRolesMask inRoleMask, + FSRef *outAppRef, + CFURLRef *outAppURL ); + extern MMC_LSGetApplicationForItem_FuncPtr gMMC_LSGetApplicationForItem; + OSStatus MMC_My_LSGetApplicationForItem ( const FSRef *inItemRef, + LSRolesMask inRoleMask, + FSRef *outAppRef, + CFURLRef *outAppURL ); + // LSOpenFromRefSpec typedef OSStatus (*MMC_LSOpenFromRefSpec_FuncPtr) ( const LSLaunchFSRefSpec *inLaunchSpec, *************** *** 28,32 **** FSRef *outLaunchedRef ); ! // _LSOpenFromURLSpec typedef OSStatus (*MMC_LSOpenFromURLSpec_FuncPtr) ( const LSLaunchURLSpec *inLaunchSpec, CFURLRef *outLaunchedURL ); --- 39,43 ---- FSRef *outLaunchedRef ); ! // _LSOpenFromURLSpec typedef OSStatus (*MMC_LSOpenFromURLSpec_FuncPtr) ( const LSLaunchURLSpec *inLaunchSpec, CFURLRef *outLaunchedURL ); |
From: Jason H. <sm...@us...> - 2006-02-22 00:51:19
|
Update of /cvsroot/paranoidandroid/paranoidandroid/Resources/APE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28798/Resources/APE Modified Files: Info.plist Log Message: The path of the custom app might not be null-terminated. Index: Info.plist =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Resources/APE/Info.plist,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Info.plist 21 Feb 2006 22:16:32 -0000 1.2 --- Info.plist 22 Feb 2006 00:51:15 -0000 1.3 *************** *** 7,10 **** --- 7,12 ---- <key>APEPantherCertified</key> <true/> + <key>APETigerCertified</key> + <true/> <key>CFBundleDevelopmentRegion</key> <string>English</string> |
From: Jason H. <sm...@us...> - 2006-02-21 23:53:46
|
Update of /cvsroot/paranoidandroid/paranoidandroid/Resources/APE/APEInfo.rtfd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27811 Modified Files: TXT.rtf Log Message: Updated for version 1.3. Index: TXT.rtf =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Resources/APE/APEInfo.rtfd/TXT.rtf,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TXT.rtf 27 May 2004 11:33:51 -0000 1.1.1.1 --- TXT.rtf 21 Feb 2006 23:53:41 -0000 1.2 *************** *** 1,21 **** ! {\rtf1\mac\ansicpg10000\cocoartf102 ! \readonlydoc1{\fonttbl\f0\fnil\fcharset77 LucidaGrande;\f1\fnil\fcharset77 LucidaGrande-Bold;\f2\fmodern\fcharset77 Courier; ! \f3\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;\red35\green35\blue69;\red127\green127\blue127;\red128\green128\blue128; \red0\green11\blue152;\red128\green0\blue0;\red0\green18\blue255;} ! \margl1440\margr1440\vieww11540\viewh11180\viewkind0 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc \f0\fs24 \cf0 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc ! \cf0 {{\NeXTGraphic pa.gif \width2560 \height2560 }¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc ! \f1\b\fs24 \cf0 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc \fs36 \cf2 Paranoid Android \f0\b0\fs28 \cf0 ! \fs36 \cf3 1.2 \fs24 \cf0 \ \cf4 a haxie by unsanity and geekspiff\cf0 \ --- 1,22 ---- ! {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf330 ! \readonlydoc1{\fonttbl\f0\fnil\fcharset77 LucidaGrande;\f1\fswiss\fcharset77 Helvetica;\f2\fnil\fcharset77 LucidaGrande-Bold; ! \f3\fmodern\fcharset77 Courier;} {\colortbl;\red255\green255\blue255;\red35\green35\blue69;\red127\green127\blue127;\red128\green128\blue128; \red0\green11\blue152;\red128\green0\blue0;\red0\green18\blue255;} ! \margl1440\margr1440\vieww15960\viewh15780\viewkind0 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc \f0\fs24 \cf0 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc ! ! \f1 \cf0 {{\NeXTGraphic pa.gif \width2560 \height2560 }¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc ! \f2\b \cf0 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc \fs36 \cf2 Paranoid Android \f0\b0\fs28 \cf0 ! \fs36 \cf3 1.3 \fs24 \cf0 \ \cf4 a haxie by unsanity and geekspiff\cf0 \ *************** *** 24,28 **** \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc ! \f1\b\fs26 \cf5 What is Paranoid Android? \f0\b0\fs24 \cf0 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural --- 25,29 ---- \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc ! \f2\b\fs26 \cf5 What is Paranoid Android? \f0\b0\fs24 \cf0 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural *************** *** 36,40 **** \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc ! \f1\b \cf5 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc --- 37,41 ---- \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc ! \f2\b \cf5 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc *************** *** 45,53 **** \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qj ! \f1\b \cf0 To install, \f0\b0 double-click the "Paranoid Android Installer" icon and follow the on-screen instructions.\ \ ! \f1\b To uninstall \f0\b0 , either:\ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\ql\qnatural --- 46,54 ---- \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qj ! \f2\b \cf0 To install, \f0\b0 double-click the "Paranoid Android Installer" icon and follow the on-screen instructions.\ \ ! \f2\b To uninstall \f0\b0 , either:\ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\ql\qnatural *************** *** 60,64 **** \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc ! \f1\b\fs26 \cf5 Mass Deployment of Paranoid Android \f0\b0\fs24 \cf0 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural --- 61,65 ---- \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc ! \f2\b\fs26 \cf5 Mass Deployment of Paranoid Android \f0\b0\fs24 \cf0 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural *************** *** 72,76 **** \pard\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li920\fi-280\qj ! \f2 \cf6 Paranoid\\ Android\\ Installer.app/Contents/Resources/ape_install\ \pard\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li920\qj --- 73,77 ---- \pard\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li920\fi-280\qj ! \f3 \cf6 Paranoid\\ Android\\ Installer.app/Contents/Resources/ape_install\ \pard\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li920\qj *************** *** 80,84 **** \pard\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li920\fi-280\qj ! \f2 \cf6 ditto Paranoid\\ Android\\ Installer.app/Contents/Resources/ui/Paranoid\\ Android.ape /Library/Application\\ Enhancers/\ \pard\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li920\fi-280\qj --- 81,85 ---- \pard\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li920\fi-280\qj ! \f3 \cf6 ditto Paranoid\\ Android\\ Installer.app/Contents/Resources/ui/Paranoid\\ Android.ape /Library/Application\\ Enhancers/\ \pard\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li920\fi-280\qj *************** *** 88,92 **** \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc ! \f1\b \cf5 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc --- 89,93 ---- \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc ! \f2\b \cf5 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc *************** *** 97,101 **** \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li360\ql\qnatural \cf0 \'a5 ! \f1\b Version 1.2 (May 24, 2004) \f0\b0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\li940\fi-220\ql\qnatural --- 98,110 ---- \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li360\ql\qnatural \cf0 \'a5 ! \f2\b Version 1.3 (February 21, 2006) ! \f0\b0 \ ! \pard\tx1440\tx2880\tx4320\tx5760\tx7200\li940\fi-220\ql\qnatural ! \cf0 \'a5 Paranoid Android can now notify you when a file is launched with a custom application. This protects against the security vulnerability described at http://secunia.com/mac_os_x_command_execution_vulnerability_test/.\ ! \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qj ! \cf0 \ ! \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li360\ql\qnatural ! \cf0 \'a5 ! \f2\b Version 1.2 (May 24, 2004) \f0\b0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\li940\fi-220\ql\qnatural *************** *** 109,113 **** \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li360\ql\qnatural \cf0 \'a5 ! \f1\b Version 1.1 (May 22, 2004) \f0\b0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\li940\fi-220\ql\qnatural --- 118,122 ---- \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li360\ql\qnatural \cf0 \'a5 ! \f2\b Version 1.1 (May 22, 2004) \f0\b0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\li940\fi-220\ql\qnatural *************** *** 119,123 **** \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li360\ql\qnatural \cf0 \'a5 ! \f1\b Version 1.0 (May 20, 2004) \f0\b0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\li940\fi-220\ql\qnatural --- 128,132 ---- \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li360\ql\qnatural \cf0 \'a5 ! \f2\b Version 1.0 (May 20, 2004) \f0\b0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\li940\fi-220\ql\qnatural *************** *** 127,131 **** \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc ! \f1\b \cf5 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc --- 136,140 ---- \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc ! \f2\b \cf5 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc *************** *** 143,147 **** \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc ! \f1\b\fs26 \cf5 Contact Information \f0\b0\fs24 \cf0 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\ql\qnatural --- 152,156 ---- \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc ! \f2\b\fs26 \cf5 Contact Information \f0\b0\fs24 \cf0 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\ql\qnatural *************** *** 178,189 **** \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc ! \cf0 {{\NeXTGraphic unsanity_logo_small.png \width960 \height1260 }¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc ! \f0\fs24 \cf0 \ \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc ! \f3\fs18 \cf0 Paranoid Android is Copyright \'a92004, Unsanity LLC & Geekspiff\ Haxie and Unsanity are trademarks of Unsanity LLC. All other trademarks are property of their respective owners.\ http://www.unsanity.com/} \ No newline at end of file --- 187,199 ---- \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc ! ! \f1 \cf0 {{\NeXTGraphic unsanity_logo_small.png \width960 \height1260 }¬}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li340\qc ! \f0 \cf0 \ \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc ! \f1\fs18 \cf0 Paranoid Android is Copyright \'a92004-2006, Unsanity LLC & Geekspiff\ Haxie and Unsanity are trademarks of Unsanity LLC. All other trademarks are property of their respective owners.\ http://www.unsanity.com/} \ No newline at end of file |
From: Jason H. <sm...@us...> - 2006-02-21 22:16:41
|
Update of /cvsroot/paranoidandroid/paranoidandroid/Resources/APE/English.lproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7974/Resources/APE/English.lproj Modified Files: Localizable.strings Log Message: Updated to 1.3. PA now notifies you when attempting to open a file using an application other than the default. Index: Localizable.strings =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Resources/APE/English.lproj/Localizable.strings,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Localizable.strings 27 May 2004 11:33:51 -0000 1.1.1.1 --- Localizable.strings 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- "yes" = "Allow"; "no" = "Cancel"; + "continue" = "Continue"; "unknownApp" = "(unknown)"; *************** *** 11,14 **** --- 12,20 ---- "allowSchemeDescription" = "The application %@ is attempting to open a URI with scheme '%@'. The url being attempted is\n\n%@\n\nIt will be opened using %@.\n\nA vulnerability in Mac OS X allows your system to be exploited by manipulating URI schemes, so you should only permit this operation if you're sure that the URI is legitimate. More info on this vulnerability can be found at http://www.haxies.com/pa.\n\nWould you like to allow this operation to continue?"; + // Allow Remapping + "allowRemappingHeader" = "Paranoid Android Warning"; + "allowRemappingDescription" = "The application \"%@\" is attempting to open the file:\n\t%@\nusing an application other than the default. The file will be opened using the application:\n\t%@.\n\nYou should only permit this operation if you're sure that this file should be executing this application.\n\nWould you like to allow this operation to continue?"; + "useDefault" = "Use Default Application"; + // Allow Registration "allowRegistrationHeader" = "Paranoid Android Warning"; |
From: Jason H. <sm...@us...> - 2006-02-21 22:16:40
|
Update of /cvsroot/paranoidandroid/paranoidandroid/Resources/PrefPane/English.lproj/MainMenu.nib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7974/Resources/PrefPane/English.lproj/MainMenu.nib Modified Files: classes.nib info.nib objects.nib Log Message: Updated to 1.3. PA now notifies you when attempting to open a file using an application other than the default. Index: info.nib =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Resources/PrefPane/English.lproj/MainMenu.nib/info.nib,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** info.nib 27 May 2004 11:33:56 -0000 1.1.1.1 --- info.nib 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 6,10 **** <string>0 6 356 240 0 0 1280 832 </string> <key>IBFramework Version</key> ! <string>364.0</string> <key>IBOpenObjects</key> <array> --- 6,10 ---- <string>0 6 356 240 0 0 1280 832 </string> <key>IBFramework Version</key> ! <string>443.0</string> <key>IBOpenObjects</key> <array> *************** *** 12,16 **** </array> <key>IBSystem Version</key> ! <string>7F44</string> </dict> </plist> --- 12,16 ---- </array> <key>IBSystem Version</key> ! <string>8H14</string> </dict> </plist> Index: objects.nib =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Resources/PrefPane/English.lproj/MainMenu.nib/objects.nib,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Binary files /tmp/cvss5GpQe and /tmp/cvsBYroLc differ Index: classes.nib =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Resources/PrefPane/English.lproj/MainMenu.nib/classes.nib,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** classes.nib 27 May 2004 11:33:56 -0000 1.1.1.1 --- classes.nib 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 3,7 **** {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, { ! ACTIONS = {addScheme = id; doRotateAbout = id; removeScheme = id; }; CLASS = ParanoidAndroidController; LANGUAGE = ObjC; --- 3,13 ---- {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, { ! ACTIONS = { ! addScheme = id; ! doRotateAbout = id; ! removeScheme = id; ! watchRemappingChanged = id; ! watchSchemesChanged = id; ! }; CLASS = ParanoidAndroidController; LANGUAGE = ObjC; *************** *** 11,14 **** --- 17,22 ---- permittedSchemes = NSTableView; removeButton = NSButton; + watchRemappingButton = NSButton; + watchSchemesButton = NSButton; window = NSWindow; }; |
From: Jason H. <sm...@us...> - 2006-02-21 22:16:40
|
Update of /cvsroot/paranoidandroid/paranoidandroid/Sources/Common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7974/Sources/Common Modified Files: CFConstants.cpp CFConstants.h Constants.h Constants.mm Log Message: Updated to 1.3. PA now notifies you when attempting to open a file using an application other than the default. Index: CFConstants.cpp =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/Common/CFConstants.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CFConstants.cpp 27 May 2004 11:33:57 -0000 1.1.1.1 --- CFConstants.cpp 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 14,17 **** --- 14,19 ---- // Prefs Keys + const CFStringRef kPA_PREF_WatchSchemes = CFSTR("shouldWatchSchemes"); + const CFStringRef kPA_PREF_WatchRemapping = CFSTR("shouldWatchRemapping"); const CFStringRef kPA_PREF_Schemes = CFSTR("Whitelist Schemes"); Index: CFConstants.h =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/Common/CFConstants.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CFConstants.h 27 May 2004 11:33:57 -0000 1.1.1.1 --- CFConstants.h 21 Feb 2006 22:16:33 -0000 1.2 *************** *** 19,22 **** --- 19,24 ---- // Prefs Keys + extern const CFStringRef kPA_PREF_WatchSchemes; + extern const CFStringRef kPA_PREF_WatchRemapping; extern const CFStringRef kPA_PREF_Schemes; Index: Constants.h =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/Common/Constants.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Constants.h 27 May 2004 11:33:57 -0000 1.1.1.1 --- Constants.h 21 Feb 2006 22:16:33 -0000 1.2 *************** *** 15,17 **** --- 15,19 ---- // Prefs Keys + extern NSString *kPA_NS_PREF_WatchSchemes; + extern NSString *kPA_NS_PREF_WatchRemapping; extern NSString *kPA_NS_PREF_Schemes; Index: Constants.mm =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/Common/Constants.mm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Constants.mm 27 May 2004 11:33:57 -0000 1.1.1.1 --- Constants.mm 21 Feb 2006 22:16:33 -0000 1.2 *************** *** 14,16 **** --- 14,18 ---- // Prefs Keys + NSString *kPA_NS_PREF_WatchSchemes = (NSString *)kPA_PREF_WatchSchemes; + NSString *kPA_NS_PREF_WatchRemapping = (NSString *)kPA_PREF_WatchRemapping; NSString *kPA_NS_PREF_Schemes = (NSString *)kPA_PREF_Schemes; |
From: Jason H. <sm...@us...> - 2006-02-21 22:16:40
|
Update of /cvsroot/paranoidandroid/paranoidandroid/TextFiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7974/TextFiles Modified Files: Version History.rtf Log Message: Updated to 1.3. PA now notifies you when attempting to open a file using an application other than the default. Index: Version History.rtf =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/TextFiles/Version History.rtf,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Version History.rtf 27 May 2004 11:33:58 -0000 1.1.1.1 --- Version History.rtf 21 Feb 2006 22:16:33 -0000 1.2 *************** *** 1,5 **** ! {\rtf1\mac\ansicpg10000\cocoartf102 {\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx480\tx960\tx1440\tx1920\tx2400\tx2880\tx3360\tx3840\tx4320\tx4800\tx5280\tx5760\tx6240\tx6720\tx7200\tx7680\tx8160\tx8640\tx9120\tx9600\tx10080\tx10560\tx11040\tx11520\tx12000\tx12480\tx12960\tx13440\tx13920\tx14400\tx14880\tx15360\tx15840\tx16320\tx16800\tx17280\tx17760\tx18240\tx18723\tx19203\tx19683\tx20163\tx20643\tx21123\tx21603\tx22083\tx22563\tx23043\tx23523\tx24003\tx24483\tx24963\tx25443\tx25923\tx26403\tx26883\tx27363\tx27843\tx28323\tx28803\tx29283\tx29763\tx30243\tx30725\tx31205\tx31685\tx32165\tx32645\tx33125\tx33605\tx34085\tx34565\tx35045\tx35525\tx36005\tx36485\tx36966\tx37446\tx37926\tx38406\tx38886\tx39366\tx39846\tx40326\tx40806\tx41286\tx41766\tx42246\tx42726\tx43207\tx43687\tx44167\tx44647\tx45127\tx45607\tx46087\tx46567\tx47047\tx47527\tx48007\li1120\fi-1120\qc --- 1,6 ---- ! {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} + \vieww9000\viewh8400\viewkind0 \pard\tx480\tx960\tx1440\tx1920\tx2400\tx2880\tx3360\tx3840\tx4320\tx4800\tx5280\tx5760\tx6240\tx6720\tx7200\tx7680\tx8160\tx8640\tx9120\tx9600\tx10080\tx10560\tx11040\tx11520\tx12000\tx12480\tx12960\tx13440\tx13920\tx14400\tx14880\tx15360\tx15840\tx16320\tx16800\tx17280\tx17760\tx18240\tx18723\tx19203\tx19683\tx20163\tx20643\tx21123\tx21603\tx22083\tx22563\tx23043\tx23523\tx24003\tx24483\tx24963\tx25443\tx25923\tx26403\tx26883\tx27363\tx27843\tx28323\tx28803\tx29283\tx29763\tx30243\tx30725\tx31205\tx31685\tx32165\tx32645\tx33125\tx33605\tx34085\tx34565\tx35045\tx35525\tx36005\tx36485\tx36966\tx37446\tx37926\tx38406\tx38886\tx39366\tx39846\tx40326\tx40806\tx41286\tx41766\tx42246\tx42726\tx43207\tx43687\tx44167\tx44647\tx45127\tx45607\tx46087\tx46567\tx47047\tx47527\tx48007\li1120\fi-1120\qc *************** *** 10,14 **** \pard\tx480\tx960\tx1440\tx1920\tx2400\tx2880\tx3360\tx3840\tx4320\tx4800\tx5280\tx5760\tx6240\tx6720\tx7200\tx7680\tx8160\tx8640\tx9120\tx9600\tx10080\tx10560\tx11040\tx11520\tx12000\tx12480\tx12960\tx13440\tx13920\tx14400\tx14880\tx15360\tx15840\tx16320\tx16800\tx17280\tx17760\tx18240\tx18723\tx19203\tx19683\tx20163\tx20643\tx21123\tx21603\tx22083\tx22563\tx23043\tx23523\tx24003\tx24483\tx24963\tx25443\tx25923\tx26403\tx26883\tx27363\tx27843\tx28323\tx28803\tx29283\tx29763\tx30243\tx30725\tx31205\tx31685\tx32165\tx32645\tx33125\tx33605\tx34085\tx34565\tx35045\tx35525\tx36005\tx36485\tx36966\tx37446\tx37926\tx38406\tx38886\tx39366\tx39846\tx40326\tx40806\tx41286\tx41766\tx42246\tx42726\tx43207\tx43687\tx44167\tx44647\tx45127\tx45607\tx46087\tx46567\tx47047\tx47527\tx48007\li1120\fi-1120\ql\qnatural ! \f0\b \cf0 1.2 (May 26, 2004) \f1\b0 \ \'a5 The whitelist now defaults to just 'http', 'https', and 'mailto'.\ --- 11,20 ---- \pard\tx480\tx960\tx1440\tx1920\tx2400\tx2880\tx3360\tx3840\tx4320\tx4800\tx5280\tx5760\tx6240\tx6720\tx7200\tx7680\tx8160\tx8640\tx9120\tx9600\tx10080\tx10560\tx11040\tx11520\tx12000\tx12480\tx12960\tx13440\tx13920\tx14400\tx14880\tx15360\tx15840\tx16320\tx16800\tx17280\tx17760\tx18240\tx18723\tx19203\tx19683\tx20163\tx20643\tx21123\tx21603\tx22083\tx22563\tx23043\tx23523\tx24003\tx24483\tx24963\tx25443\tx25923\tx26403\tx26883\tx27363\tx27843\tx28323\tx28803\tx29283\tx29763\tx30243\tx30725\tx31205\tx31685\tx32165\tx32645\tx33125\tx33605\tx34085\tx34565\tx35045\tx35525\tx36005\tx36485\tx36966\tx37446\tx37926\tx38406\tx38886\tx39366\tx39846\tx40326\tx40806\tx41286\tx41766\tx42246\tx42726\tx43207\tx43687\tx44167\tx44647\tx45127\tx45607\tx46087\tx46567\tx47047\tx47527\tx48007\li1120\fi-1120\ql\qnatural ! \f0\b \cf0 1.3 (February 21, 2006) ! \f1\b0 \ ! \'a5 Paranoid Android can now notify you when a file is launched with a custom application. This protects against the security vulnerability described at http://secunia.com/mac_os_x_command_execution_vulnerability_test/.\ ! \ ! ! \f0\b 1.2 (May 26, 2004) \f1\b0 \ \'a5 The whitelist now defaults to just 'http', 'https', and 'mailto'.\ |
From: Jason H. <sm...@us...> - 2006-02-21 22:16:40
|
Update of /cvsroot/paranoidandroid/paranoidandroid/Sources/APE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7974/Sources/APE Modified Files: PatchFunctions.c PatchFunctions.h Patches.c UserNotifications.cpp UserNotifications.h main.cpp Log Message: Updated to 1.3. PA now notifies you when attempting to open a file using an application other than the default. Index: main.cpp =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/APE/main.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** main.cpp 27 May 2004 11:33:57 -0000 1.1.1.1 --- main.cpp 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 18,21 **** --- 18,23 ---- CFBundleRef gParanoidAndroidAppBundle = NULL; CFArrayRef gWhitelistedSchemes = NULL; + bool gWatchSchemes = false; + bool gWatchRemapping = false; // if this changes, change it in PrefPane/ParanoidAndroidController.h, too *************** *** 29,33 **** static void ! LoadWhitelistedSchemes () { if ( gWhitelistedSchemes ) --- 31,35 ---- static void ! ReadPrefs () { if ( gWhitelistedSchemes ) *************** *** 46,49 **** --- 48,62 ---- if ( ! gWhitelistedSchemes ) throw 1; + + CFBooleanRef watchSchemes = (CFBooleanRef)CFPreferencesCopyAppValue(kPA_PREF_WatchSchemes, kPA_ParanoidAndroidIdentifier); + gWatchSchemes = true; + if ( watchSchemes && CFGetTypeID(watchSchemes) == CFBooleanGetTypeID() ) + gWatchSchemes = CFBooleanGetValue(watchSchemes); + + CFBooleanRef watchRemapping = (CFBooleanRef)CFPreferencesCopyAppValue(kPA_PREF_WatchRemapping, kPA_ParanoidAndroidIdentifier); + gWatchRemapping = true; + if ( watchRemapping && CFGetTypeID(watchRemapping) == CFBooleanGetTypeID() ) + gWatchRemapping = CFBooleanGetValue(watchRemapping); + } *************** *** 72,76 **** if ( ! PatchFunctions() ) { throw 1; } ! LoadWhitelistedSchemes(); // We've loaded sucessfully! --- 85,89 ---- if ( ! PatchFunctions() ) { throw 1; } ! ReadPrefs(); // We've loaded sucessfully! *************** *** 97,101 **** if ( kCFCompareEqualTo == CFStringCompare(message, kPA_MSG_PrefsChanged, 0) ) { ! LoadWhitelistedSchemes (); } } --- 110,114 ---- if ( kCFCompareEqualTo == CFStringCompare(message, kPA_MSG_PrefsChanged, 0) ) { ! ReadPrefs (); } } Index: PatchFunctions.c =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/APE/PatchFunctions.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PatchFunctions.c 27 May 2004 11:33:57 -0000 1.1.1.1 --- PatchFunctions.c 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 15,19 **** --- 15,27 ---- char const * const kParAnd_LaunchServicesFramework = "./LaunchServices"; + MMC_LSOpenFromRefSpec_FuncPtr gMMC_LSOpenFromRefSpec = NULL; MMC_LSOpenFromURLSpec_FuncPtr gMMC_LSOpenFromURLSpec = NULL; /*MMC__LSRegisterNode_FuncPtr gMMC__LSRegisterNode = NULL; MMC_FSNodeCopyURL_FuncPtr gMMC_FSNodeCopyURL = NULL; */ + + /* ********************************************** + * CarbonCore.framework + * *********************************************/ + char const * const kParAnd_CarbonCoreFramework = "./CarbonCore"; + + MMC_RMGetResourceByFileRef_FuncPtr gMMC_RMGetResourceByFileRef = NULL; Index: Patches.c =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/APE/Patches.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Patches.c 27 May 2004 11:33:57 -0000 1.1.1.1 --- Patches.c 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 13,19 **** --- 13,23 ---- #include "APEExtras.h" #include <ApplicationEnhancer/ApplicationEnhancer.h> + #include <pthread.h> extern bool gParanoidAndroidShouldPatch; + static pthread_mutex_t gLock; + static bool gFileIsBeingOpened = false; + static CFURLRef gCurrentURL = NULL; bool *************** *** 22,25 **** --- 26,31 ---- struct mach_header* header; + pthread_mutex_init(&gLock, NULL); + // LaunchServices.framework header = APEGetImageHeader(kParAnd_LaunchServicesFramework); *************** *** 28,31 **** --- 34,44 ---- RequiredPatch( header, + "_LSOpenFromRefSpec", + gMMC_LSOpenFromRefSpec, + MMC_LSOpenFromRefSpec_FuncPtr, + MMC_My_LSOpenFromRefSpec + ); + RequiredPatch( + header, "_LSOpenFromURLSpec", gMMC_LSOpenFromURLSpec, *************** *** 49,52 **** --- 62,77 ---- ); */ + // CarbonCore.framework + header = APEGetImageHeader(kParAnd_CarbonCoreFramework); + if (!header) return false; + + RequiredPatch( + header, + "_RMGetResourceByFileRef", + gMMC_RMGetResourceByFileRef, + MMC_RMGetResourceByFileRef_FuncPtr, + MMC_My_RMGetResourceByFileRef + ); + return true; } *************** *** 54,57 **** --- 79,119 ---- OSStatus + MMC_My_LSOpenFromRefSpec + ( const LSLaunchFSRefSpec *inLaunchSpec, + FSRef *outLaunchedRef ) + { + if ( gParanoidAndroidShouldPatch && inLaunchSpec && inLaunchSpec->numDocs && inLaunchSpec->itemRefs ) + { + bool canProceed; + + pthread_mutex_lock(&gLock); + canProceed = ! gFileIsBeingOpened; + pthread_mutex_unlock(&gLock); + + if ( canProceed ) + { + pthread_mutex_lock(&gLock); + gFileIsBeingOpened = true; + pthread_mutex_unlock(&gLock); + + // what if we have multiple FSRefs? Who knows... + CFURLRef currentURL = CFURLCreateFromFSRef(kCFAllocatorDefault, inLaunchSpec->itemRefs); + gCurrentURL = currentURL; + OSStatus result = gMMC_LSOpenFromRefSpec(inLaunchSpec, outLaunchedRef); + CFRelease(currentURL); + + pthread_mutex_lock(&gLock); + gFileIsBeingOpened = false; + pthread_mutex_unlock(&gLock); + + return result; + } + } + + return gMMC_LSOpenFromRefSpec(inLaunchSpec, outLaunchedRef); + } + + + OSStatus MMC_My_LSOpenFromURLSpec ( const LSLaunchURLSpec *inLaunchSpec, *************** *** 71,75 **** } } ! } return gMMC_LSOpenFromURLSpec( inLaunchSpec, outLaunchedURL ); } --- 133,159 ---- } } ! ! bool canProceed; ! pthread_mutex_lock(&gLock); ! canProceed = ! gFileIsBeingOpened; ! pthread_mutex_unlock(&gLock); ! ! if ( canProceed ) ! { ! pthread_mutex_lock(&gLock); ! gFileIsBeingOpened = true; ! pthread_mutex_unlock(&gLock); ! ! // what if we have multiple FSRefs? Who knows... ! gCurrentURL = CFArrayGetValueAtIndex(inLaunchSpec->itemURLs, 0); ! OSStatus result = gMMC_LSOpenFromURLSpec(inLaunchSpec, outLaunchedURL); ! ! pthread_mutex_lock(&gLock); ! gFileIsBeingOpened = false; ! pthread_mutex_unlock(&gLock); ! ! return result; ! } ! } return gMMC_LSOpenFromURLSpec( inLaunchSpec, outLaunchedURL ); } *************** *** 94,96 **** } return gMMC__LSRegisterNode( inNode, flags ); ! } */ \ No newline at end of file --- 178,219 ---- } return gMMC__LSRegisterNode( inNode, flags ); ! } */ ! ! ! OSStatus ! MMC_My_RMGetResourceByFileRef ! ( void *inFileRef, ! OSType inResourceType, ! long inResourceID, ! Handle *outHandle ) ! { ! if ( gParanoidAndroidShouldPatch && 'usro' == inResourceType && 0 == inResourceID && outHandle ) ! { ! bool canProceed; ! ! pthread_mutex_lock(&gLock); ! canProceed = gFileIsBeingOpened; ! pthread_mutex_unlock(&gLock); ! ! if ( canProceed ) ! { ! OSStatus result = gMMC_RMGetResourceByFileRef(inFileRef, inResourceType, inResourceID, outHandle); ! if ( noErr == result ) ! { ! if ( *outHandle && 1028 == GetHandleSize(*outHandle) && **(long **)*outHandle <= 1024 ) ! { ! char const *path = (char const *) &(((long *)**outHandle)[1]); ! if ( ! ShouldPermitRemapping(gCurrentURL, path) ) ! { ! // let the handle leak rather than calling private API to close it ! *outHandle = NULL; ! return resNotFound; ! } ! } ! return noErr; ! } ! } ! } ! ! return gMMC_RMGetResourceByFileRef(inFileRef, inResourceType, inResourceID, outHandle); ! } Index: PatchFunctions.h =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/APE/PatchFunctions.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PatchFunctions.h 27 May 2004 11:33:57 -0000 1.1.1.1 --- PatchFunctions.h 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 21,30 **** extern char const * const kParAnd_LaunchServicesFramework; // _LSOpenFromURLSpec typedef OSStatus (*MMC_LSOpenFromURLSpec_FuncPtr) ( const LSLaunchURLSpec *inLaunchSpec, ! CFURLRef *outLaunchedURL ); extern MMC_LSOpenFromURLSpec_FuncPtr gMMC_LSOpenFromURLSpec; OSStatus MMC_My_LSOpenFromURLSpec ( const LSLaunchURLSpec *inLaunchSpec, ! CFURLRef *outLaunchedURL ); /* // __LSRegisterNode --- 21,37 ---- extern char const * const kParAnd_LaunchServicesFramework; + // LSOpenFromRefSpec + typedef OSStatus (*MMC_LSOpenFromRefSpec_FuncPtr) ( const LSLaunchFSRefSpec *inLaunchSpec, + FSRef *outLaunchedRef ); + extern MMC_LSOpenFromRefSpec_FuncPtr gMMC_LSOpenFromRefSpec; + OSStatus MMC_My_LSOpenFromRefSpec ( const LSLaunchFSRefSpec *inLaunchSpec, + FSRef *outLaunchedRef ); + // _LSOpenFromURLSpec typedef OSStatus (*MMC_LSOpenFromURLSpec_FuncPtr) ( const LSLaunchURLSpec *inLaunchSpec, ! CFURLRef *outLaunchedURL ); extern MMC_LSOpenFromURLSpec_FuncPtr gMMC_LSOpenFromURLSpec; OSStatus MMC_My_LSOpenFromURLSpec ( const LSLaunchURLSpec *inLaunchSpec, ! CFURLRef *outLaunchedURL ); /* // __LSRegisterNode *************** *** 41,44 **** --- 48,67 ---- */ + /* ********************************************** + * CarbonCore.framework + * *********************************************/ + extern char const * const kParAnd_CarbonCoreFramework; + + // RMGetResourceByFileRef + typedef OSStatus (*MMC_RMGetResourceByFileRef_FuncPtr) ( void *inFileRef, + OSType inResourceType, + long inResourceID, + Handle *outHandle ); + extern MMC_RMGetResourceByFileRef_FuncPtr gMMC_RMGetResourceByFileRef; + OSStatus MMC_My_RMGetResourceByFileRef ( void *inFileRef, + OSType inResourceType, + long inResourceID, + Handle *outHandle ); + #ifdef __cplusplus } Index: UserNotifications.h =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/APE/UserNotifications.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** UserNotifications.h 27 May 2004 11:33:57 -0000 1.1.1.1 --- UserNotifications.h 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 16,19 **** --- 16,20 ---- bool ShouldPermitURL ( CFURLRef url ); + bool ShouldPermitRemapping ( CFURLRef inFileURL, const char *appPath ); // bool ShouldPermitURLRegistration ( CFURLRef url ); Index: UserNotifications.cpp =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/APE/UserNotifications.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** UserNotifications.cpp 27 May 2004 11:33:57 -0000 1.1.1.1 --- UserNotifications.cpp 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 16,19 **** --- 16,21 ---- extern CFBundleRef gParanoidAndroidAppBundle; extern CFArrayRef gWhitelistedSchemes; + extern bool gWatchSchemes; + extern bool gWatchRemapping; *************** *** 136,139 **** --- 138,143 ---- ShouldPermitURL ( CFURLRef url ) { + if ( ! gWatchSchemes ) + return true; CFStringRef scheme = CFURLCopyScheme( url ); if ( ! scheme ) *************** *** 239,240 **** --- 243,285 ---- return permit; } */ + + + bool + ShouldPermitRemapping + ( CFURLRef inFileURL, + const char *appPath ) + { + if ( ! gWatchRemapping ) + return true; + + CFURLRef iconURL = CFBundleCopyResourceURL(gParanoidAndroidBundle, CFSTR("ParanoidAndroid"), CFSTR("icns"), NULL); + + CFStringRef appName = CopyApplicationName(); + if ( ! appName ) + appName = CFBundleCopyLocalizedString(gParanoidAndroidBundle, CFSTR("unknownApp"), NULL, NULL); + + CFStringRef destAppName = CFStringCreateWithCString(kCFAllocatorDefault, appPath, kCFStringEncodingUTF8); + if ( ! destAppName ) + destAppName = CFBundleCopyLocalizedString(gParanoidAndroidBundle, CFSTR("unknownApp"), NULL, NULL); + + CFStringRef header = CFBundleCopyLocalizedString( gParanoidAndroidBundle, CFSTR("allowRemappingHeader"), NULL, NULL ); + + CFStringRef descriptionFormat = CFBundleCopyLocalizedString(gParanoidAndroidBundle, CFSTR("allowRemappingDescription"), NULL, NULL); + CFStringRef description = CFStringCreateWithFormat( kCFAllocatorDefault, NULL, descriptionFormat, appName, inFileURL, destAppName ); + + CFStringRef yes = CFBundleCopyLocalizedString(gParanoidAndroidBundle, CFSTR("continue"), NULL, NULL); + CFStringRef no = CFBundleCopyLocalizedString(gParanoidAndroidBundle, CFSTR("useDefault"), NULL, NULL); + + CFOptionFlags responseFlags; + CFUserNotificationDisplayAlert(0, kCFUserNotificationStopAlertLevel, iconURL, NULL, NULL, header, description, yes, no, NULL, &responseFlags); + if (iconURL) CFRelease(iconURL); + if (appName) CFRelease(appName); + if (destAppName) CFRelease(destAppName); + if (header) CFRelease(header); + if (descriptionFormat) CFRelease(descriptionFormat); + if (description) CFRelease(description); + if (yes) CFRelease(yes); + if (no) CFRelease(no); + + return responseFlags == kCFUserNotificationDefaultResponse; + } |
From: Jason H. <sm...@us...> - 2006-02-21 22:16:40
|
Update of /cvsroot/paranoidandroid/paranoidandroid/Resources/PrefPane In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7974/Resources/PrefPane Modified Files: About.plist Info.plist Log Message: Updated to 1.3. PA now notifies you when attempting to open a file using an application other than the default. Index: Info.plist =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Resources/PrefPane/Info.plist,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Info.plist 27 May 2004 11:33:56 -0000 1.1.1.1 --- Info.plist 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 8,12 **** <string>APEManagerPrefPane</string> <key>CFBundleGetInfoString</key> ! <string>Paranoid Android Version 1.2, Copyright © 2004 Unsanity & Geekspiff</string> <key>CFBundleIconFile</key> <string>ParanoidAndroid.icns</string> --- 8,12 ---- <string>APEManagerPrefPane</string> <key>CFBundleGetInfoString</key> ! <string>Paranoid Android Version 1.3, Copyright © 2004-2006 Unsanity & Geekspiff</string> <key>CFBundleIconFile</key> <string>ParanoidAndroid.icns</string> *************** *** 18,26 **** <string>BNDL</string> <key>CFBundleShortVersionString</key> ! <string>Paranoid Android Version 1.2</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> ! <string>1.2</string> <key>NSPrincipalClass</key> <string>ParanoidAndroidController</string> --- 18,26 ---- <string>BNDL</string> <key>CFBundleShortVersionString</key> ! <string>Paranoid Android Version 1.3</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> ! <string>1.3</string> <key>NSPrincipalClass</key> <string>ParanoidAndroidController</string> Index: About.plist =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Resources/PrefPane/About.plist,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** About.plist 27 May 2004 11:33:56 -0000 1.1.1.1 --- About.plist 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 3,9 **** <plist version="1.0"> <array> ! <string>Paranoid Android 1.2 by Unsanity & Geekspiff</string> ! <string>Copyright © 2004, Unsanity LLC</string> ! <string>Copyright © 2004, Geekspiff</string> <string>Programming: Jason Harris</string> <string>http://www.unsanity.com/haxies/pa</string> --- 3,9 ---- <plist version="1.0"> <array> ! <string>Paranoid Android 1.3 by Unsanity & Geekspiff</string> ! <string>Copyright © 2004-2006, Unsanity LLC</string> ! <string>Copyright © 2004-2006, Geekspiff</string> <string>Programming: Jason Harris</string> <string>http://www.unsanity.com/haxies/pa</string> |
From: Jason H. <sm...@us...> - 2006-02-21 22:16:39
|
Update of /cvsroot/paranoidandroid/paranoidandroid/Sources/Prefpane In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7974/Sources/Prefpane Modified Files: ParanoidAndroidController.h ParanoidAndroidController.m Log Message: Updated to 1.3. PA now notifies you when attempting to open a file using an application other than the default. Index: ParanoidAndroidController.m =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/Prefpane/ParanoidAndroidController.m,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ParanoidAndroidController.m 27 May 2004 11:33:58 -0000 1.1.1.1 --- ParanoidAndroidController.m 21 Feb 2006 22:16:33 -0000 1.2 *************** *** 51,54 **** --- 51,55 ---- [mSchemes autorelease]; [mPrefs synchronize]; + mSchemes = [mPrefs objectForKey: kPA_NS_PREF_Schemes]; if ( mSchemes ) *************** *** 80,84 **** [self doRotateAbout:self]; ! [self tableViewSelectionDidChange: nil]; } --- 81,91 ---- [self doRotateAbout:self]; ! NSNumber *boolNum = [mPrefs objectForKey: kPA_NS_PREF_WatchRemapping]; ! [watchRemappingButton setState: boolNum ? [boolNum boolValue] ? NSOnState : NSOffState : NSOnState]; ! ! boolNum = [mPrefs objectForKey: kPA_NS_PREF_WatchSchemes]; ! [self setWatchSchemes: boolNum ? [boolNum boolValue] ? NSOnState : NSOffState : NSOnState]; ! ! [self tableViewSelectionDidChange: nil]; } *************** *** 102,105 **** --- 109,132 ---- + - (IBAction)watchRemappingChanged: (NSButton *)sender + { + NSNumber *boolNum = [NSNumber numberWithBool: [sender state] == NSOnState]; + [mPrefs setObject: boolNum forKey: kPA_NS_PREF_WatchRemapping]; + [mPrefs synchronize]; + APEMessageBroadcast(kPA_ParanoidAndroidIdentifier, kPA_MSG_PrefsChanged, NULL); + } + + + - (IBAction)watchSchemesChanged: (NSButton *)sender + { + BOOL flag = [sender state] == NSOnState; + NSNumber *boolNum = [NSNumber numberWithBool: flag]; + [mPrefs setObject: boolNum forKey: kPA_NS_PREF_WatchSchemes]; + [mPrefs synchronize]; + APEMessageBroadcast(kPA_ParanoidAndroidIdentifier, kPA_MSG_PrefsChanged, NULL); + [self setWatchSchemes: flag]; + } + + - (IBAction)addScheme: (NSButton *)sender { *************** *** 201,203 **** --- 228,239 ---- } + + - (void)setWatchSchemes: (BOOL)flag + { + [permittedSchemes setEnabled: flag]; + [addButton setEnabled: flag]; + [removeButton setEnabled: flag]; + [watchSchemesButton setState: flag ? NSOnState : NSOffState]; + } + @end Index: ParanoidAndroidController.h =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Sources/Prefpane/ParanoidAndroidController.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ParanoidAndroidController.h 27 May 2004 11:33:57 -0000 1.1.1.1 --- ParanoidAndroidController.h 21 Feb 2006 22:16:33 -0000 1.2 *************** *** 15,18 **** --- 15,20 ---- IBOutlet NSWindow* window; IBOutlet NSTextField* aboutString; + IBOutlet NSButton *watchRemappingButton; + IBOutlet NSButton *watchSchemesButton; IBOutlet NSButton *addButton; IBOutlet NSButton *removeButton; *************** *** 33,40 **** --- 35,45 ---- - (IBAction)doRotateAbout:(id)sender; + - (IBAction)watchRemappingChanged: (NSButton *)sender; + - (IBAction)watchSchemesChanged: (NSButton *)sender; - (IBAction)addScheme: (NSButton *)sender; - (IBAction)removeScheme: (NSButton *)sender; - (void)sortAndReloadSchemes; - (void)saveSchemes; + - (void)setWatchSchemes: (BOOL)flag; @end |
From: Jason H. <sm...@us...> - 2006-02-21 22:16:36
|
Update of /cvsroot/paranoidandroid/paranoidandroid/Resources/APE In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7974/Resources/APE Modified Files: Info.plist Log Message: Updated to 1.3. PA now notifies you when attempting to open a file using an application other than the default. Index: Info.plist =================================================================== RCS file: /cvsroot/paranoidandroid/paranoidandroid/Resources/APE/Info.plist,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Info.plist 27 May 2004 11:33:50 -0000 1.1.1.1 --- Info.plist 21 Feb 2006 22:16:32 -0000 1.2 *************** *** 12,16 **** <string>Paranoid Android</string> <key>CFBundleGetInfoString</key> ! <string>Paranoid Android Version 1.2, Copyright © 2004 Unsanity & Geekspiff</string> <key>CFBundleIdentifier</key> <string>com.unsanity.paranoidandroid</string> --- 12,16 ---- <string>Paranoid Android</string> <key>CFBundleGetInfoString</key> ! <string>Paranoid Android Version 1.3, Copyright © 2004-2006 Unsanity & Geekspiff</string> <key>CFBundleIdentifier</key> <string>com.unsanity.paranoidandroid</string> *************** *** 22,30 **** <string>BNDL</string> <key>CFBundleShortVersionString</key> ! <string>Paranoid Android Version 1.2</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> ! <string>1.2</string> </dict> </plist> --- 22,30 ---- <string>BNDL</string> <key>CFBundleShortVersionString</key> ! <string>1.3</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> ! <string>1.3</string> </dict> </plist> |
From: Jason H. <sm...@us...> - 2006-02-21 22:13:51
|
Update of /cvsroot/paranoidandroid/paranoidandroid/Paranoid Android.xcodeproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6890/Paranoid Android.xcodeproj Log Message: Directory /cvsroot/paranoidandroid/paranoidandroid/Paranoid Android.xcodeproj added to the repository |