From: <haw...@us...> - 2008-11-12 02:50:15
|
Revision: 214 http://pgsqlformac.svn.sourceforge.net/pgsqlformac/?rev=214&view=rev Author: hawkmoon Date: 2008-11-12 02:50:10 +0000 (Wed, 12 Nov 2008) Log Message: ----------- Completed switchover to lock based authentication, stubbed in code for auto-start and data/log directory changes. Modified Paths: -------------- trunk/PreferencePane/PostgreSQL Server/English.lproj/PostgreSQL_ServerPref.xib trunk/PreferencePane/PostgreSQL Server/PostgreSQL Server.xcodeproj/project.pbxproj trunk/PreferencePane/PostgreSQL Server/PostgreSQL_ServerPref.h trunk/PreferencePane/PostgreSQL Server/PostgreSQL_ServerPref.m Added Paths: ----------- trunk/PreferencePane/PostgreSQL Server/CHANGELOG Added: trunk/PreferencePane/PostgreSQL Server/CHANGELOG =================================================================== --- trunk/PreferencePane/PostgreSQL Server/CHANGELOG (rev 0) +++ trunk/PreferencePane/PostgreSQL Server/CHANGELOG 2008-11-12 02:50:10 UTC (rev 214) @@ -0,0 +1,3 @@ +11.10.2008 + - completed transition from command based security to lock based security. + - disabled parts of the panel that are not yet ready for usage. \ No newline at end of file Modified: trunk/PreferencePane/PostgreSQL Server/English.lproj/PostgreSQL_ServerPref.xib =================================================================== --- trunk/PreferencePane/PostgreSQL Server/English.lproj/PostgreSQL_ServerPref.xib 2008-11-06 22:14:53 UTC (rev 213) +++ trunk/PreferencePane/PostgreSQL Server/English.lproj/PostgreSQL_ServerPref.xib 2008-11-12 02:50:10 UTC (rev 214) @@ -8,7 +8,7 @@ <string key="IBDocument.HIToolboxVersion">352.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="6"/> + <integer value="12"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -344,7 +344,7 @@ <object class="NSTextField" id="582898452"> <reference key="NSNextResponder" ref="1037298196"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{57, 26}, {205, 17}}</string> + <string key="NSFrame">{{53, 26}, {205, 17}}</string> <reference key="NSSuperview" ref="1037298196"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="912924051"> @@ -364,7 +364,7 @@ <reference key="NSSuperview" ref="1037298196"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="520371744"> - <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags">604110336</int> <int key="NSCellFlags2">134217728</int> <string key="NSContents"/> <reference key="NSSupport" ref="834305099"/> @@ -426,7 +426,7 @@ <reference key="NSSuperview" ref="524366641"/> <bool key="NSEnabled">YES</bool> <object class="NSImageCell" key="NSCell" id="748496408"> - <int key="NSCellFlags">130560</int> + <int key="NSCellFlags">537001472</int> <int key="NSCellFlags2">33554432</int> <object class="NSCustomResource" key="NSContents"> <string key="NSClassName">NSImage</string> @@ -458,7 +458,7 @@ <reference key="NSSuperview" ref="524366641"/> <bool key="NSEnabled">YES</bool> <object class="NSImageCell" key="NSCell" id="586411677"> - <int key="NSCellFlags">130560</int> + <int key="NSCellFlags">537001472</int> <int key="NSCellFlags2">33554432</int> <object class="NSCustomResource" key="NSContents"> <string key="NSClassName">NSImage</string> @@ -490,7 +490,7 @@ <reference key="NSSuperview" ref="524366641"/> <bool key="NSEnabled">YES</bool> <object class="NSImageCell" key="NSCell" id="1020196943"> - <int key="NSCellFlags">130560</int> + <int key="NSCellFlags">537001472</int> <int key="NSCellFlags2">33554432</int> <object class="NSCustomResource" key="NSContents"> <string key="NSClassName">NSImage</string> @@ -570,7 +570,7 @@ <reference key="NSSuperview" ref="524366641"/> <bool key="NSEnabled">YES</bool> <object class="NSImageCell" key="NSCell" id="456356155"> - <int key="NSCellFlags">130560</int> + <int key="NSCellFlags">537001472</int> <int key="NSCellFlags2">33554432</int> <object class="NSCustomResource" key="NSContents"> <string key="NSClassName">NSImage</string> @@ -624,37 +624,33 @@ <int key="NSTitlePosition">2</int> <bool key="NSTransparent">NO</bool> </object> - <object class="NSImageView" id="773331922"> + <object class="NSButton" id="832480426"> <reference key="NSNextResponder" ref="1037298196"/> <int key="NSvFlags">268</int> - <object class="NSMutableSet" key="NSDragTypes"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMutableArray" key="set.sortedObjects"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>Apple PDF pasteboard type</string> - <string>Apple PICT pasteboard type</string> - <string>Apple PNG pasteboard type</string> - <string>NSFilenamesPboardType</string> - <string>NeXT Encapsulated PostScript v1.2 pasteboard type</string> - <string>NeXT TIFF v4.0 pasteboard type</string> - </object> - </object> - <string key="NSFrame">{{20, 20}, {32, 32}}</string> + <string key="NSFrame">{{18, 17}, {32, 32}}</string> <reference key="NSSuperview" ref="1037298196"/> <bool key="NSEnabled">YES</bool> - <object class="NSImageCell" key="NSCell" id="762926357"> - <int key="NSCellFlags">130560</int> - <int key="NSCellFlags2">33554432</int> - <object class="NSCustomResource" key="NSContents"> + <object class="NSButtonCell" key="NSCell" id="724626920"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="834305099"/> + <reference key="NSControlView" ref="832480426"/> + <int key="NSButtonFlags">1211912447</int> + <int key="NSButtonFlags2">130</int> + <object class="NSCustomResource" key="NSNormalImage"> <string key="NSClassName">NSImage</string> <string key="NSResourceName">lock_32</string> </object> - <int key="NSAlign">0</int> - <int key="NSScale">0</int> - <int key="NSStyle">0</int> - <bool key="NSAnimates">NO</bool> + <object class="NSCustomResource" key="NSAlternateImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">ulock_32</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> </object> - <bool key="NSEditable">YES</bool> </object> </object> <string key="NSFrameSize">{661, 345}</string> @@ -743,14 +739,6 @@ </object> <object class="IBConnectionRecord"> <object class="IBActionConnection" key="connection"> - <string key="label">onRestartService:</string> - <reference key="source" ref="294453543"/> - <reference key="destination" ref="627609165"/> - </object> - <int key="connectionID">164</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> <string key="label">onStopService:</string> <reference key="source" ref="294453543"/> <reference key="destination" ref="39267976"/> @@ -763,8 +751,24 @@ <reference key="source" ref="294453543"/> <reference key="destination" ref="176611005"/> </object> - <int key="connectionID">166</int> + <int key="connectionID">173</int> </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleLock:</string> + <reference key="source" ref="294453543"/> + <reference key="destination" ref="832480426"/> + </object> + <int key="connectionID">176</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">lockToggle</string> + <reference key="source" ref="294453543"/> + <reference key="destination" ref="832480426"/> + </object> + <int key="connectionID">177</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -816,10 +820,10 @@ <reference ref="140310987"/> <reference ref="341207287"/> <reference ref="627609165"/> + <reference ref="582898452"/> + <reference ref="832480426"/> <reference ref="328183076"/> - <reference ref="582898452"/> <reference ref="487703545"/> - <reference ref="773331922"/> <reference ref="58562495"/> </object> <reference key="parent" ref="660800786"/> @@ -1164,18 +1168,18 @@ <reference key="parent" ref="732046822"/> </object> <object class="IBObjectRecord"> - <int key="objectID">160</int> - <reference key="object" ref="773331922"/> + <int key="objectID">174</int> + <reference key="object" ref="832480426"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="762926357"/> + <reference ref="724626920"/> </object> <reference key="parent" ref="1037298196"/> </object> <object class="IBObjectRecord"> - <int key="objectID">161</int> - <reference key="object" ref="762926357"/> - <reference key="parent" ref="773331922"/> + <int key="objectID">175</int> + <reference key="object" ref="724626920"/> + <reference key="parent" ref="832480426"/> </object> </object> </object> @@ -1241,8 +1245,8 @@ <string>157.IBPluginDependency</string> <string>158.IBPluginDependency</string> <string>159.IBPluginDependency</string> - <string>160.IBPluginDependency</string> - <string>161.IBPluginDependency</string> + <string>174.IBPluginDependency</string> + <string>175.IBPluginDependency</string> <string>6.IBPluginDependency</string> <string>6.ImportedFromIB2</string> </object> @@ -1274,9 +1278,9 @@ <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> - <string>{{561, 541}, {661, 345}}</string> + <string>{{4, 459}, {661, 345}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{561, 541}, {661, 345}}</string> + <string>{{4, 459}, {661, 345}}</string> <reference ref="9"/> <reference ref="9"/> <string>{3.40282e+38, 3.40282e+38}</string> @@ -1332,7 +1336,7 @@ </object> </object> <nil key="sourceID"/> - <int key="maxID">166</int> + <int key="maxID">179</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -1382,6 +1386,7 @@ <string>onStartService:</string> <string>onStopService:</string> <string>onTimedUpdate:</string> + <string>toggleLock:</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -1390,6 +1395,7 @@ <string>id</string> <string>id</string> <string>id</string> + <string>id</string> </object> </object> <object class="NSMutableDictionary" key="outlets"> @@ -1398,6 +1404,7 @@ <bool key="EncodedWithXMLCoder">YES</bool> <string>addServer</string> <string>autostartOption</string> + <string>lockToggle</string> <string>progress</string> <string>refresh</string> <string>restartService</string> @@ -1418,6 +1425,7 @@ <bool key="EncodedWithXMLCoder">YES</bool> <string>NSButton</string> <string>NSButton</string> + <string>NSButton</string> <string>NSProgressIndicator</string> <string>NSButton</string> <string>NSButton</string> Modified: trunk/PreferencePane/PostgreSQL Server/PostgreSQL Server.xcodeproj/project.pbxproj =================================================================== --- trunk/PreferencePane/PostgreSQL Server/PostgreSQL Server.xcodeproj/project.pbxproj 2008-11-06 22:14:53 UTC (rev 213) +++ trunk/PreferencePane/PostgreSQL Server/PostgreSQL Server.xcodeproj/project.pbxproj 2008-11-12 02:50:10 UTC (rev 214) @@ -25,6 +25,7 @@ 434CF8B10E4CAC130040ED14 /* data-folder.png in Resources */ = {isa = PBXBuildFile; fileRef = 434CF8B00E4CAC130040ED14 /* data-folder.png */; }; 434CF8B30E4CAC570040ED14 /* security_32.png in Resources */ = {isa = PBXBuildFile; fileRef = 434CF8B20E4CAC570040ED14 /* security_32.png */; }; 434CF8B50E4CAC890040ED14 /* prefs_32.png in Resources */ = {isa = PBXBuildFile; fileRef = 434CF8B40E4CAC890040ED14 /* prefs_32.png */; }; + 43AFFB260ECA7AE500FF139F /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 43AFFB250ECA7AE500FF139F /* CHANGELOG */; }; 43B1AB790EC1E204002D4317 /* StartupHelper in Resources */ = {isa = PBXBuildFile; fileRef = 43B1AB5E0EC13A66002D4317 /* StartupHelper */; }; 43B5F6890EC354EB00AE6451 /* PostgreSQLPrefPane.icns in Resources */ = {isa = PBXBuildFile; fileRef = 43B5F6880EC354EB00AE6451 /* PostgreSQLPrefPane.icns */; }; 43B5F6B20EC355CA00AE6451 /* PostgreSQL_ServerPref.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 43B5F6B10EC355CA00AE6451 /* PostgreSQL_ServerPref.tiff */; }; @@ -79,6 +80,7 @@ 434CF8B00E4CAC130040ED14 /* data-folder.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "data-folder.png"; sourceTree = "<group>"; }; 434CF8B20E4CAC570040ED14 /* security_32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = security_32.png; sourceTree = "<group>"; }; 434CF8B40E4CAC890040ED14 /* prefs_32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = prefs_32.png; sourceTree = "<group>"; }; + 43AFFB250ECA7AE500FF139F /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; }; 43B1AB590EC13A66002D4317 /* StartupHelper.xcode */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = StartupHelper.xcode; path = ../../StartupHelper/StartupHelper.xcode; sourceTree = SOURCE_ROOT; }; 43B5F6880EC354EB00AE6451 /* PostgreSQLPrefPane.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = PostgreSQLPrefPane.icns; path = ../../../../../../Desktop/PostgreSQLPrefPane.icns; sourceTree = SOURCE_ROOT; }; 43B5F6B10EC355CA00AE6451 /* PostgreSQL_ServerPref.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = PostgreSQL_ServerPref.tiff; sourceTree = "<group>"; }; @@ -107,6 +109,7 @@ 089C166AFE841209C02AAC07 /* PostgreSQL Server */ = { isa = PBXGroup; children = ( + 43AFFB250ECA7AE500FF139F /* CHANGELOG */, 08FB77AFFE84173DC02AAC07 /* Classes */, 32DBCFA10370C40200C91783 /* Other Sources */, 089C167CFE841241C02AAC07 /* Resources */, @@ -250,6 +253,9 @@ /* Begin PBXProject section */ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + }; buildConfigurationList = 1DBD214C08BA80EA00186707 /* Build configuration list for PBXProject "PostgreSQL Server" */; compatibilityVersion = "Xcode 3.1"; hasScannedForEncodings = 1; @@ -303,6 +309,7 @@ 434CF8B50E4CAC890040ED14 /* prefs_32.png in Resources */, 43B5F6890EC354EB00AE6451 /* PostgreSQLPrefPane.icns in Resources */, 43B5F6B20EC355CA00AE6451 /* PostgreSQL_ServerPref.tiff in Resources */, + 43AFFB260ECA7AE500FF139F /* CHANGELOG in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; Modified: trunk/PreferencePane/PostgreSQL Server/PostgreSQL_ServerPref.h =================================================================== --- trunk/PreferencePane/PostgreSQL Server/PostgreSQL_ServerPref.h 2008-11-06 22:14:53 UTC (rev 213) +++ trunk/PreferencePane/PostgreSQL Server/PostgreSQL_ServerPref.h 2008-11-12 02:50:10 UTC (rev 214) @@ -32,20 +32,27 @@ IBOutlet NSTextField *stopServiceLabel; IBOutlet NSWindow *window; IBOutlet NSProgressIndicator *working; + IBOutlet NSButton *lockToggle; NSBundle *thisBundle; + AuthorizationFlags myFlags; AuthorizationRef myAuthorizationRef; - NSString *command; NSString *operation; + BOOL isLocked; + double updateInterval; } - (void) mainViewDidLoad; +- (BOOL)unlockPane; +- (BOOL)lockPane; +- (IBAction)toggleLock:(id)sender; + - (BOOL)checkPostmasterStatus; - (void)updateButtonStatus:(BOOL)isRunning; Modified: trunk/PreferencePane/PostgreSQL Server/PostgreSQL_ServerPref.m =================================================================== --- trunk/PreferencePane/PostgreSQL Server/PostgreSQL_ServerPref.m 2008-11-06 22:14:53 UTC (rev 213) +++ trunk/PreferencePane/PostgreSQL Server/PostgreSQL_ServerPref.m 2008-11-12 02:50:10 UTC (rev 214) @@ -23,10 +23,83 @@ updateInterval = 0.5; thisBundle = [NSBundle bundleWithIdentifier:@"com.druware.postgresqlserverpreferences"]; + isLocked = YES; + [self performSelector:@selector(onTimedUpdate:) withObject:self afterDelay:0.1]; } #pragma mark -- +#pragma mark Lock Management Handlers + +- (BOOL)unlockPane +{ + OSStatus myStatus; + myFlags = kAuthorizationFlagDefaults; + + NSString *pathToHelper = [thisBundle pathForResource:@"StartupHelper" ofType:nil]; + + // myAuthorizationItem.AuthorizationString = "@ + myStatus = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, + myFlags, &myAuthorizationRef); + if (myStatus != errAuthorizationSuccess) + return NO; + + AuthorizationItem myItems = {kAuthorizationRightExecute, [pathToHelper length], (char *)[pathToHelper cString], 0}; + AuthorizationRights myRights = {1, &myItems}; + + myFlags = kAuthorizationFlagDefaults | + kAuthorizationFlagInteractionAllowed | + kAuthorizationFlagPreAuthorize | + kAuthorizationFlagExtendRights; + + + // this pops the dialog. If the above AuthItemRIghts includes more than one item, then it will auth all or none. + myStatus = AuthorizationCopyRights (myAuthorizationRef, &myRights, + kAuthorizationEmptyEnvironment, myFlags, NULL ); // this pops the dialog + + if (myStatus == errAuthorizationSuccess) + { + isLocked = NO; + return YES; + } + + + isLocked = YES; + return NO; +} + +- (BOOL)lockPane +{ + if (!isLocked) + { + AuthorizationFree (myAuthorizationRef, kAuthorizationFlagDefaults); + isLocked = YES; + return YES; + } + + return NO; +} + +- (IBAction)toggleLock:(id)sender +{ + NSLog(@"got isLocked"); + if (isLocked) + { + [self unlockPane]; + } else { + [self lockPane]; + } + + if (isLocked) + { + [lockToggle setState:NSOffState]; + } + + return; +} + + +#pragma mark -- #pragma mark Status Update Handlers - (void)updateButtonStatus:(BOOL)isRunning @@ -92,6 +165,17 @@ - (IBAction)onRestartService:(id)sender { + // if locked, need to unlock before calling exec + if (isLocked) + { + [self toggleLock:sender]; + } + + if (isLocked) + { + return; + } + if (command != nil) { [command release]; @@ -106,13 +190,24 @@ } operation = [[NSString alloc] initWithString:@"restart"]; - [NSThread detachNewThreadSelector:@selector(execWithRights) toTarget:self withObject:operation]; + [NSThread detachNewThreadSelector:@selector(execStartupWithRights) toTarget:self withObject:operation]; return; } - (IBAction)onStartService:(id)sender { + // if locked, need to unlock before calling exec + if (isLocked) + { + [self toggleLock:sender]; + } + + if (isLocked) + { + return; + } + if (command != nil) { [command release]; @@ -127,12 +222,23 @@ } operation = [[NSString alloc] initWithString:@"start"]; - [NSThread detachNewThreadSelector:@selector(execWithRights) toTarget:self withObject:operation]; + [NSThread detachNewThreadSelector:@selector(execStartupWithRights) toTarget:self withObject:operation]; return; } - (IBAction)onStopService:(id)sender { + // if locked, need to unlock before calling exec + if (isLocked) + { + [self toggleLock:sender]; + } + + if (isLocked) + { + return; + } + if (command != nil) { [command release]; @@ -149,75 +255,44 @@ [working startAnimation:sender]; - [NSThread detachNewThreadSelector:@selector(execWithRights) toTarget:self withObject:operation]; + [NSThread detachNewThreadSelector:@selector(execStartupWithRights) toTarget:self withObject:operation]; return; } -- (void)execWithRights +- (void)execStartupWithRights { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; OSStatus myStatus; - AuthorizationFlags myFlags = kAuthorizationFlagDefaults; + + NSString *pathToHelper = [thisBundle pathForResource:@"StartupHelper" ofType:nil]; + + const char *myToolPath = [pathToHelper cString]; + char *myArguments[4]; - NSString *pathToHelper = [thisBundle pathForResource:@"StartupHelper" ofType:nil]; + myArguments[0] = (char *)[command cString]; + myArguments[1] = (char *)[operation cString]; + myArguments[2] = "MANUAL"; + myArguments[3] = NULL; - // myAuthorizationItem.AuthorizationString = "@ - myStatus = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, - myFlags, &myAuthorizationRef); - if (myStatus != errAuthorizationSuccess) - return; + FILE *myCommunicationsPipe = NULL; - do - { - AuthorizationItem myItems = {kAuthorizationRightExecute, [pathToHelper length], (char *)[pathToHelper cString], 0}; - AuthorizationRights myRights = {1, &myItems}; - - myFlags = kAuthorizationFlagDefaults | - kAuthorizationFlagInteractionAllowed | - kAuthorizationFlagPreAuthorize | - kAuthorizationFlagExtendRights; - - - // this pops the dialog. If the above AuthItemRIghts includes more than one item, then it will auth all or none. - myStatus = AuthorizationCopyRights (myAuthorizationRef, &myRights, - kAuthorizationEmptyEnvironment, myFlags, NULL ); // this pops the dialog - - if (myStatus == errAuthorizationSuccess) + myFlags = kAuthorizationFlagDefaults; + myStatus = AuthorizationExecuteWithPrivileges(myAuthorizationRef, + myToolPath, myFlags, myArguments, &myCommunicationsPipe); + + if (myStatus == errAuthorizationSuccess) + for(;;) { - const char *myToolPath = [pathToHelper cString]; - char *myArguments[4]; - myArguments[0] = (char *)[command cString]; - myArguments[1] = (char *)[operation cString]; - myArguments[2] = "MANUAL"; - myArguments[3] = NULL; + char myReadBuffer[4096]; - FILE *myCommunicationsPipe = NULL; - - myFlags = kAuthorizationFlagDefaults; - myStatus = AuthorizationExecuteWithPrivileges(myAuthorizationRef, - myToolPath, myFlags, myArguments, &myCommunicationsPipe); - - if (myStatus == errAuthorizationSuccess) - for(;;) - { - - char myReadBuffer[4096]; - - int bytesRead = read(fileno(myCommunicationsPipe), - myReadBuffer, sizeof(myReadBuffer)); - if (bytesRead < 1) break; - } - - } - } while (0); + int bytesRead = read(fileno(myCommunicationsPipe), + myReadBuffer, sizeof(myReadBuffer)); + if (bytesRead < 1) break; + } - AuthorizationFree (myAuthorizationRef, kAuthorizationFlagDefaults); - - if (myStatus) NSLog(@"Status: %i\n", myStatus); - // update the buttons [working stopAnimation:nil]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |