From a49c4c2995d528b0eafaf5a20d746e71cf107f3a Mon Sep 17 00:00:00 2001 From: Claudio Bisegni Date: Sat, 1 Aug 2009 19:43:39 +0200 Subject: [PATCH] AFS Backgrounder implementation & warirng clean Replaced the NSMenuExtra and created the AFSBackgrounder that will do all work for aklog at login and manage the Status menu in menu bar Reviewed-on: http://gerrit.openafs.org/262 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 7868e1961048d2a24bd5d4d5afab07d3dbf54fd2) Change-Id: I379d1091dd8b376d5036e447651465ee9b099863 Reviewed-on: http://gerrit.openafs.org/948 --- .../AFSBackgrounder/AFSBackgrounderDelegate.h | 46 +- .../AFSBackgrounder/AFSBackgrounderDelegate.m | 447 +++++++++++++++++- .../AFSMenuCredentialContoller.h | 0 .../AFSMenuCredentialContoller.m | 0 .../{ => AFSBackgrounder}/AFSMenuExtra.h | 0 .../{ => AFSBackgrounder}/AFSMenuExtra.m | 0 .../AFSBackgrounder/AFSMenuExtraView.h | 20 + .../{ => AFSBackgrounder}/AFSMenuExtraView.m | 46 +- .../CredentialWindowController.h | 0 .../CredentialWindowController.m | 0 .../resource/AFSBackounderMainMenu.xib | 69 ++- .../CredentialWindow.nib/classes.nib | 0 .../resource}/CredentialWindow.nib/info.nib | 0 .../CredentialWindow.nib/keyedobjects.nib | Bin .../AFSBackgrounder/resource/Info.plist | 2 +- .../resource}/hasToken.png | Bin .../resource}/noToken.png | Bin .../DARWIN/AFSPreference/AFSCommanderPref.h | 36 +- .../DARWIN/AFSPreference/AFSCommanderPref.m | 254 ++++------ .../DARWIN/AFSPreference/AFSMenuExtraView.h | 18 - .../AfsMenuExtraResource/Info.plist | 22 - .../MenuCracker.menu/Contents/Info.plist | 28 -- .../Contents/MacOS/MenuCracker | Bin 47328 -> 0 bytes .../Contents/Resources/ReadMe.rtf | 51 -- .../OpenAFS.xcodeproj/project.pbxproj | 333 +++---------- .../DARWIN/AFSPreference/PListManager.h | 16 +- .../DARWIN/AFSPreference/PListManager.m | 24 +- src/platform/DARWIN/AFSPreference/afsltd.m | 4 +- src/platform/DARWIN/AFSPreference/global.h | 22 +- 29 files changed, 804 insertions(+), 634 deletions(-) rename src/platform/DARWIN/AFSPreference/{ => AFSBackgrounder}/AFSMenuCredentialContoller.h (100%) rename src/platform/DARWIN/AFSPreference/{ => AFSBackgrounder}/AFSMenuCredentialContoller.m (100%) rename src/platform/DARWIN/AFSPreference/{ => AFSBackgrounder}/AFSMenuExtra.h (100%) rename src/platform/DARWIN/AFSPreference/{ => AFSBackgrounder}/AFSMenuExtra.m (100%) create mode 100644 src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuExtraView.h rename src/platform/DARWIN/AFSPreference/{ => AFSBackgrounder}/AFSMenuExtraView.m (63%) rename src/platform/DARWIN/AFSPreference/{ => AFSBackgrounder/CredentialWindow}/CredentialWindowController.h (100%) rename src/platform/DARWIN/AFSPreference/{ => AFSBackgrounder/CredentialWindow}/CredentialWindowController.m (100%) rename src/platform/DARWIN/AFSPreference/{AfsMenuExtraResource => AFSBackgrounder/resource}/CredentialWindow.nib/classes.nib (100%) rename src/platform/DARWIN/AFSPreference/{AfsMenuExtraResource => AFSBackgrounder/resource}/CredentialWindow.nib/info.nib (100%) rename src/platform/DARWIN/AFSPreference/{AfsMenuExtraResource => AFSBackgrounder/resource}/CredentialWindow.nib/keyedobjects.nib (100%) rename src/platform/DARWIN/AFSPreference/{ => AFSBackgrounder/resource}/hasToken.png (100%) rename src/platform/DARWIN/AFSPreference/{ => AFSBackgrounder/resource}/noToken.png (100%) delete mode 100644 src/platform/DARWIN/AFSPreference/AFSMenuExtraView.h delete mode 100644 src/platform/DARWIN/AFSPreference/AfsMenuExtraResource/Info.plist delete mode 100644 src/platform/DARWIN/AFSPreference/MenuCracker.menu/Contents/Info.plist delete mode 100755 src/platform/DARWIN/AFSPreference/MenuCracker.menu/Contents/MacOS/MenuCracker delete mode 100644 src/platform/DARWIN/AFSPreference/MenuCracker.menu/Contents/Resources/ReadMe.rtf diff --git a/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.h b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.h index 6c7bfa6ac..d42e52a8b 100644 --- a/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.h +++ b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.h @@ -7,13 +7,53 @@ // #import - +#import "AFSMenuCredentialContoller.h" @interface AFSBackgrounderDelegate : NSObject { +@public IBOutlet NSMenu *backgrounderMenu; + IBOutlet NSMenuItem *startStopMenuItem; + IBOutlet NSMenuItem *getReleaseTokenMenuItem; NSStatusItem *statusItem; - NSImage *statusImage; - NSImage *statusHighlightImage; + + + BOOL afsState; //0-off 1-on + BOOL gotToken; //0-no 1-one o more token + +@protected + NSString *afsSysPath; + NSNumber *useAklogPrefValue; + NSNumber *showStatusMenu; + //Icon for state visualization + NSImage *hasTokenImage; + NSImage *noTokenImage; + + //credential windows mainWindow + AFSMenuCredentialContoller *credentialMenuController; + + //NSTimer for tokens refresh + NSTimer *timerForCheckTokensList; + NSLock *tokensLock; + } +- (void)startTimer; +- (void)stopTimer; +- (BOOL)useAklogPrefValue; +- (void)readPreferenceFile:(NSNotification *)notification; +- (void)getToken:(id)sender; +- (void)releaseToken:(id)sender; +- (void)updateAfsStatus:(NSTimer*)timer; +- (void)klogUserEven:(NSNotification *)notification; +- (void)chageMenuVisibility:(NSNotification *)notification; +- (NSImage*)getImageFromBundle:(NSString*)fileName fileExt:(NSString*)ext; +- (NSImage*)imageToRender; +- (void)updateMenu; +- (void)repairHelperTool; +- (void) afsVolumeMountChange:(NSNotification *)notification; +-(NSStatusItem*)statusItem; +-(void) setStatusItem:(BOOL)show; +-(NSImage*)imageToRender; +-(IBAction) startStopEvent:(id)sender; +-(IBAction) getReleaseTokenEvent:(id)sender; @end diff --git a/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.m b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.m index 3ecfad5d6..73051ca82 100644 --- a/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.m +++ b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSBackgrounderDelegate.m @@ -7,30 +7,447 @@ // #import "AFSBackgrounderDelegate.h" - +#import "AFSMenuExtraView.h" +#import "AFSPropertyManager.h" +#import "TaskUtil.h" +#import "TokenCredentialController.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include @implementation AFSBackgrounderDelegate +#pragma mark NSApp Delegate - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { NSLog(@"applicationDidFinishLaunching"); //Create the NSStatusBar and set its length statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain]; //Used to detect where our files are - NSBundle *bundle = [NSBundle mainBundle]; - - //Allocates and loads the images into the application which will be used for our NSStatusItem - statusImage = [[NSImage alloc] initWithContentsOfFile:[bundle pathForResource:@"hasToken" ofType:@"png"]]; - statusHighlightImage = [[NSImage alloc] initWithContentsOfFile:[bundle pathForResource:@"noToken" ofType:@"png"]]; + //NSBundle *bundle = [NSBundle mainBundle]; //Sets the images in our NSStatusItem - [statusItem setImage:statusImage]; - [statusItem setAlternateImage:statusHighlightImage]; - - //Tells the NSStatusItem what menu to load - [statusItem setMenu:backgrounderMenu]; - //Sets the tooptip for our item - [statusItem setToolTip:@"Andrews Menu Item"]; - //Enables highlighting - [statusItem setHighlightMode:YES]; + statusItem = nil; + + + // Get the imge for menu + //Load image for menu rappresentation + hasTokenImage = [self getImageFromBundle:@"hasToken" + fileExt:@"png"]; + + noTokenImage = [self getImageFromBundle:@"noToken" + fileExt:@"png"]; + + //Start to read the afs path + [self readPreferenceFile:nil]; + [self startTimer]; + + + + // Register for preference user change + [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(readPreferenceFile:) + name:kAFSMenuExtraID object:kPrefChangeNotification]; + + // Register for afs state change + [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(afsVolumeMountChange:) + name:kAFSMenuExtraID object:kMExtraAFSStateChange]; + + // Register for menu state change + [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(chageMenuVisibility:) + name:kAFSMenuExtraID object:kMExtraAFSMenuChangeState]; + + //Register for mount/unmount afs volume + [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self + selector:@selector(afsVolumeMountChange:) + name:NSWorkspaceDidMountNotification object:nil]; + + [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self + selector:@selector(afsVolumeMountChange:) + name:NSWorkspaceDidUnmountNotification object:nil]; + + //try to see if we need tho show the menu at startup + NSLog(@"showStatusMenu %d", [showStatusMenu intValue]); + [self setStatusItem:[showStatusMenu boolValue]]; + +} + +- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { + if(afsSysPath) [afsSysPath release]; + + //release the lock + [self stopTimer]; + + if(hasTokenImage) [hasTokenImage release]; + if(noTokenImage) [noTokenImage release]; + + // Unregister for preference change + [[NSDistributedNotificationCenter defaultCenter] removeObserver:self name:kAFSMenuExtraID object:kPrefChangeNotification]; + [[NSDistributedNotificationCenter defaultCenter] removeObserver:self name:kAFSMenuExtraID object:kMExtraAFSStateChange]; + [[NSDistributedNotificationCenter defaultCenter] removeObserver:self name:kAFSMenuExtraID object:kMExtraAFSMenuChangeState]; + [[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:self name:NSWorkspaceDidMountNotification object:nil]; + [[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:self name:NSWorkspaceDidUnmountNotification object:nil]; + + + // send notify that menuextra has closed + [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAfsCommanderID object:kPrefChangeNotification]; + + return NSTerminateNow; +} +// ------------------------------------------------------------------------------- +// -(void) readPreferenceFile +// ------------------------------------------------------------------------------- +- (void) readPreferenceFile:(NSNotification *)notification +{ + NSLog(@"Reading preference file"); + if(afsSysPath) { + [afsSysPath release]; + afsSysPath = nil; + } + + afsSysPath = PREFERENCE_AFS_SYS_PAT_STATIC; + + // read the preference for aklog use + useAklogPrefValue = (NSNumber*)CFPreferencesCopyValue((CFStringRef)PREFERENCE_USE_AKLOG, + (CFStringRef)kAfsCommanderID, + kCFPreferencesCurrentUser, + kCFPreferencesAnyHost); + + showStatusMenu = (NSNumber*)CFPreferencesCopyValue((CFStringRef)PREFERENCE_SHOW_STATUS_MENU, + (CFStringRef)kAfsCommanderID, + kCFPreferencesCurrentUser, + kCFPreferencesAnyHost); + //set the menu name + [self updateAfsStatus:nil]; +} + +// ------------------------------------------------------------------------------- +// -(void) readPreferenceFile +// ------------------------------------------------------------------------------- +- (void)chageMenuVisibility:(NSNotification *)notification { + NSLog(@"chageMenuVisibility"); + [self readPreferenceFile:nil]; + NSLog(@"showStatusMenu: %d", [showStatusMenu intValue]); + [self setStatusItem:[showStatusMenu boolValue]]; +} + +// ------------------------------------------------------------------------------- +// - (void)startStopAfs:(id)sender +// ------------------------------------------------------------------------------- +- (void)startStopAfs:(id)sender +{ + NSLog(@"startStopAfs: %s",[afsSysPath UTF8String]); + if(!afsSysPath) return; + + OSStatus status = noErr; + NSString *afsdPath = [TaskUtil searchExecutablePath:@"afsd"]; + NSString *rootHelperApp = nil; + BOOL currentAfsState = NO; + + @try { + if(afsdPath == nil) return; + AFSPropertyManager *afsMngr = [[AFSPropertyManager alloc] initWithAfsPath:afsSysPath]; + currentAfsState = [afsMngr checkAfsStatus]; + [afsMngr release]; + + rootHelperApp = [[NSBundle mainBundle] pathForResource:@"afshlp" ofType:@""]; + + //[startStopScript setString: resourcePath]; + //NSLog(@"LAunch repair HelperTool"); + //Check helper app + [self repairHelperTool]; + + // make the parameter to call the root helper app + //NSLog(@"Path installazione afs: %s",[afsSysPath UTF8String]); + //NSLog(@"Path installazione afsd: %s", [afsdPath UTF8String]); + status = [[AuthUtil shared] autorize]; + if(status == noErr){ + if(currentAfsState){ + //shutdown afs + //NSLog(@"Shutting down afs"); + NSMutableString *afsKextPath = [[NSMutableString alloc] initWithCapacity:256]; + [afsKextPath setString:afsSysPath]; + [afsKextPath appendString:@"/etc/afs.kext"]; + + //NSLog(@"executeTaskWithAuth"); + const char *stopAfsArgs[] = {"stop_afs", [afsKextPath UTF8String], [afsdPath UTF8String], 0L}; + [[AuthUtil shared] execUnixCommand:[rootHelperApp UTF8String] + args:stopAfsArgs + output:nil]; + } else { + //NSLog(@"Starting up afs"); + const char *startAfsArgs[] = {[[ [NSBundle mainBundle] pathForResource:@"start_afs" ofType:@"sh"] UTF8String], [afsSysPath UTF8String], [afsdPath UTF8String], 0L}; + [[AuthUtil shared] execUnixCommand:[rootHelperApp UTF8String] + args:startAfsArgs + output:nil]; + } + } + } + @catch (NSException * e) { + NSLog([e reason]); + } + @finally { + [[AuthUtil shared] deautorize]; + [self updateAfsStatus:nil]; + //Send notification to preferencepane + [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAfsCommanderID object:kMenuExtraEventOccured]; + } + +} + +// ------------------------------------------------------------------------------- +// -(void) getToken +// ------------------------------------------------------------------------------- +- (void)getToken:(id)sender +{ + + NSRect globalRect; + globalRect.origin = [[[statusItem view] window] convertBaseToScreen:[[statusItem view] frame].origin]; + globalRect.size = [[statusItem view] frame].size; + AFSPropertyManager *afsPropMngr = [[AFSPropertyManager alloc] initWithAfsPath:afsSysPath ]; + [afsPropMngr loadConfiguration]; + + + if([useAklogPrefValue intValue]==NSOnState ) { + NSLog(@"Use Aklog"); + [afsPropMngr getTokens:false + usr:nil + pwd:nil]; + [self klogUserEven:nil]; + } else { + NSLog(@"Use Klog"); + // register for user event + [[NSDistributedNotificationCenter defaultCenter] addObserver:self + selector:@selector(klogUserEven:) + name:kAFSMenuExtraID + object:kLogWindowClosed]; + + credentialMenuController = [[AFSMenuCredentialContoller alloc] initWhitRec:globalRect + afsPropManager:afsPropMngr]; + [credentialMenuController showWindow]; + } + + //Dispose afs manager + [afsPropMngr release]; +} + +// ------------------------------------------------------------------------------- +// -(void) releaseToken +// ------------------------------------------------------------------------------- +- (void)releaseToken:(id)sender +{ + AFSPropertyManager *afsMngr = [[AFSPropertyManager alloc] initWithAfsPath:afsSysPath]; + [afsMngr unlog:nil]; + [afsMngr release]; + [self updateAfsStatus:nil]; +} + + +// ------------------------------------------------------------------------------- +// -(void) afsVolumeMountChange - Track for mount unmount afs volume +// ------------------------------------------------------------------------------- +- (void) afsVolumeMountChange:(NSNotification *)notification{ + [self updateAfsStatus:nil]; +} + +// ------------------------------------------------------------------------------- +// -(void) updateAfsStatus +// ------------------------------------------------------------------------------- +- (void)updateAfsStatus:(NSTimer*)timer +{ + //Try to locking + if(![tokensLock tryLock]) return; + + // check the afs state in esclusive mode + AFSPropertyManager *afsMngr = [[AFSPropertyManager alloc] initWithAfsPath:afsSysPath]; + afsState = [afsMngr checkAfsStatus]; + + NSArray *tokens = [afsMngr getTokenList]; + [afsMngr release]; + gotToken = [tokens count] > 0; + [tokens release]; + [self updateMenu]; + + //unlock + [tokensLock unlock]; +} + +// ------------------------------------------------------------------------------- +// -(void) klogUserEven +// ------------------------------------------------------------------------------- +-(void) klogUserEven:(NSNotification *)notification +{ + if(credentialMenuController) { + [[NSDistributedNotificationCenter defaultCenter] removeObserver:self name:kAFSMenuExtraID object:kLogWindowClosed]; + [credentialMenuController closeWindow]; + [credentialMenuController release]; + credentialMenuController = nil; + } + //Send notification to PreferencePane + [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAfsCommanderID object:kMenuExtraEventOccured]; + + [self updateAfsStatus:nil]; +} +#pragma mark Operational Function +// ------------------------------------------------------------------------------- +// startTimer: +// ------------------------------------------------------------------------------- +- (void)startTimer{ + //start the time for check tokens validity + if(timerForCheckTokensList) return; + timerForCheckTokensList = [NSTimer scheduledTimerWithTimeInterval:TOKENS_REFRESH_TIME_IN_SEC + target:self + selector:@selector(updateAfsStatus:) + userInfo:nil + repeats:YES]; + [timerForCheckTokensList fire]; +} + +// ------------------------------------------------------------------------------- +// stopTimer: +// ------------------------------------------------------------------------------- +- (void)stopTimer{ + if(!timerForCheckTokensList) return; + [timerForCheckTokensList invalidate]; + timerForCheckTokensList = nil; +} +// ------------------------------------------------------------------------------- +// -(void) getImageFromBundle +// ------------------------------------------------------------------------------- +- (NSImage*)getImageFromBundle:(NSString*)fileName fileExt:(NSString*)ext +{ + return [[NSImage alloc]initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:fileName + ofType:ext]]; +} + + + + +// ------------------------------------------------------------------------------- +// -(void) updateMenu +// ------------------------------------------------------------------------------- +- (void)updateMenu{ + [getReleaseTokenMenuItem setEnabled:afsState]; + [startStopMenuItem setTitle:afsState?kAfsButtonShutdown:kAfsButtonStartup]; + [[statusItem view] setNeedsDisplay:YES]; + +} + + +// ------------------------------------------------------------------------------- +// -(void) useAklogPrefValue +// ------------------------------------------------------------------------------- +- (BOOL)useAklogPrefValue +{ + if(useAklogPrefValue) return [useAklogPrefValue intValue] == NSOnState; + else return NSOffState; +} + +// ------------------------------------------------------------------------------- +// repairHelperTool: +// ------------------------------------------------------------------------------- +- (void) repairHelperTool +{ + struct stat st; + int fdTool; + int status = 0; + NSLog(@"repairHelperTool"); + NSString *afshlpPath = [[NSBundle mainBundle] pathForResource:@"afshlp" ofType:nil]; + + + + // Open tool exclusively, so nobody can change it while we bless it. + fdTool = open([afshlpPath UTF8String], O_NONBLOCK | O_RDONLY | O_EXLOCK, 0); + + if(fdTool == -1) + { + NSLog(@"Exclusive open while repairing tool failed: %d.", errno); + exit(-1); + } + + if(fstat(fdTool, &st)) + { + NSLog(@"fstat failed."); + exit(-1); + } + + if(st.st_uid != 0) + { + status = [[AuthUtil shared] autorize]; + if(status == noErr){ + fchown(fdTool, 0, st.st_gid); + + // Disable group and world writability and make setuid root. + fchmod(fdTool, (st.st_mode & (~(S_IWGRP | S_IWOTH)))/* | S_ISUID*/); + const char *args[] = {"root", [afshlpPath UTF8String],0L}; + [[AuthUtil shared] execUnixCommand:"/usr/sbin/chown" + args:args + output:nil]; + [[AuthUtil shared] deautorize]; + } + } else NSLog(@"st_uid = 0"); + + + + close(fdTool); + + NSLog(@"Self-repair done."); + +} + +#pragma mark accessor +// ------------------------------------------------------------------------------- +// statusItem +// ------------------------------------------------------------------------------- +-(NSStatusItem*)statusItem { + return statusItem; +} + +// ------------------------------------------------------------------------------- +// setStatusItem +// ------------------------------------------------------------------------------- +-(void)setStatusItem:(BOOL)show { + if(show) { + if(statusItem) return; + statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain]; + [statusItem setView:[[AFSMenuExtraView alloc] initWithFrame:[[statusItem view] frame] + backgrounder:self + menu:backgrounderMenu]]; + //Tells the NSStatusItem what menu to load + [statusItem setMenu:backgrounderMenu]; + //Sets the tooptip for our item + [statusItem setToolTip:@"OpenAFS Preference"]; + //Enables highlighting + [statusItem setHighlightMode:YES]; + [statusItem setImage:noTokenImage]; + } else { + if(!statusItem) return; + [statusItem release]; + statusItem = nil; + } +} +// ------------------------------------------------------------------------------- +// -(void) imageToRender +// ------------------------------------------------------------------------------- +- (NSImage*)imageToRender +{ + if(gotToken){ + return hasTokenImage; + } else { + return noTokenImage; + } +} + + +-(IBAction) startStopEvent:(id)sender { + [self startStopAfs:sender]; +} + +-(IBAction) getReleaseTokenEvent:(id)sender { + [self getToken:sender]; } @end diff --git a/src/platform/DARWIN/AFSPreference/AFSMenuCredentialContoller.h b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuCredentialContoller.h similarity index 100% rename from src/platform/DARWIN/AFSPreference/AFSMenuCredentialContoller.h rename to src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuCredentialContoller.h diff --git a/src/platform/DARWIN/AFSPreference/AFSMenuCredentialContoller.m b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuCredentialContoller.m similarity index 100% rename from src/platform/DARWIN/AFSPreference/AFSMenuCredentialContoller.m rename to src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuCredentialContoller.m diff --git a/src/platform/DARWIN/AFSPreference/AFSMenuExtra.h b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuExtra.h similarity index 100% rename from src/platform/DARWIN/AFSPreference/AFSMenuExtra.h rename to src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuExtra.h diff --git a/src/platform/DARWIN/AFSPreference/AFSMenuExtra.m b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuExtra.m similarity index 100% rename from src/platform/DARWIN/AFSPreference/AFSMenuExtra.m rename to src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuExtra.m diff --git a/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuExtraView.h b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuExtraView.h new file mode 100644 index 000000000..d5c839c1a --- /dev/null +++ b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuExtraView.h @@ -0,0 +1,20 @@ +// +// AFSMenuExtraView.h +// AFSCommander +// +// Created by Claudio Bisegni on 11/07/07. +// Copyright 2007 INFN - National Institute of Nuclear Physics. All rights reserved. +// + +#import +#import "AFSBackgrounderDelegate.h" + +@interface AFSMenuExtraView : NSView { + AFSBackgrounderDelegate *backgrounderDelegator; + NSStatusItem *statusItem; + NSMenu *statusItemMenu; + BOOL isMenuVisible; +} +- initWithFrame:(NSRect)myRect backgrounder:(AFSBackgrounderDelegate*)backgrounder menu:(NSMenu*)menu; +- (NSAttributedString*) makeKerberosIndicator:(int*)fontHeight; +@end diff --git a/src/platform/DARWIN/AFSPreference/AFSMenuExtraView.m b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuExtraView.m similarity index 63% rename from src/platform/DARWIN/AFSPreference/AFSMenuExtraView.m rename to src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuExtraView.m index 0c6aee8a3..30cb910eb 100644 --- a/src/platform/DARWIN/AFSPreference/AFSMenuExtraView.m +++ b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/AFSMenuExtraView.m @@ -8,9 +8,13 @@ #import "AFSMenuExtraView.h" #import "AFSPropertyManager.h" +#import "global.h" + @implementation AFSMenuExtraView -- initWithFrame:(NSRect)myRect menuExtra:(AFSMenuExtra*)myExtra { +- initWithFrame:(NSRect)myRect + backgrounder:(AFSBackgrounderDelegate*)backgrounder + menu:(NSMenu*)menu{ // Have super init self = [super initWithFrame:myRect]; @@ -19,9 +23,10 @@ } // Store our extra - theMenuExtra = myExtra; - - // Send it on back + backgrounderDelegator = backgrounder; + statusItem = [backgrounderDelegator statusItem]; + statusItemMenu = menu; + isMenuVisible = NO; return self; } // initWithFrame @@ -38,18 +43,22 @@ int fontHeight = 0; NSAttributedString *kerberosStringIndicator = nil; - image = [theMenuExtra imageToRender]; + //check if we nedd to simulate the background menu clicked + [statusItem drawStatusBarBackgroundInRect:[self bounds] + withHighlight:isMenuVisible]; + + image = [backgrounderDelegator imageToRender]; if (image) { // Live updating even when menu is down handled by making the extra - // draw the background if needed. - if ([theMenuExtra isMenuDown]) { - [theMenuExtra drawMenuBackground:YES]; - } + // draw the background if needed. [image compositeToPoint:NSMakePoint(0, 0) operation:NSCompositeSourceOver]; } + + + //Draw, if necessary, the kerberos indicator for aklog usage for get token - if([theMenuExtra useAklogPrefValue] == NSOnState) { + if([backgrounderDelegator useAklogPrefValue] == NSOnState) { kerberosStringIndicator = [[self makeKerberosIndicator:&fontHeight] autorelease]; if(kerberosStringIndicator) [kerberosStringIndicator drawAtPoint:NSMakePoint(0, kMenuBarHeight-fontHeight)]; } @@ -69,4 +78,21 @@ *fontHeight = [attrString size].height; return attrString; } + +-(void)mouseDown:(NSEvent *)event { + [statusItemMenu setDelegate:self]; + [statusItem popUpStatusItemMenu:statusItemMenu]; + [self setNeedsDisplay:YES]; +} + +- (void)menuWillOpen:(NSMenu *)menu { + isMenuVisible = YES; + [self setNeedsDisplay:YES]; +} + +- (void)menuDidClose:(NSMenu *)menu { + isMenuVisible = NO; + [statusItemMenu setDelegate:nil]; + [self setNeedsDisplay:YES]; +} @end diff --git a/src/platform/DARWIN/AFSPreference/CredentialWindowController.h b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/CredentialWindow/CredentialWindowController.h similarity index 100% rename from src/platform/DARWIN/AFSPreference/CredentialWindowController.h rename to src/platform/DARWIN/AFSPreference/AFSBackgrounder/CredentialWindow/CredentialWindowController.h diff --git a/src/platform/DARWIN/AFSPreference/CredentialWindowController.m b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/CredentialWindow/CredentialWindowController.m similarity index 100% rename from src/platform/DARWIN/AFSPreference/CredentialWindowController.m rename to src/platform/DARWIN/AFSPreference/AFSBackgrounder/CredentialWindow/CredentialWindowController.m diff --git a/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/AFSBackounderMainMenu.xib b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/AFSBackounderMainMenu.xib index 53f0dc979..3780fc7f5 100644 --- a/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/AFSBackounderMainMenu.xib +++ b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/AFSBackounderMainMenu.xib @@ -8,6 +8,7 @@ 353.00 YES + YES @@ -95,6 +96,38 @@ 12 + + + startStopEvent: + + + + 15 + + + + getReleaseTokenEvent: + + + + 16 + + + + getReleaseTokenMenuItem + + + + 17 + + + + startStopMenuItem + + + + 18 + @@ -179,7 +212,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilderKit com.apple.InterfaceBuilderKit - {{244, 767}, {125, 53}} + {{113, 626}, {125, 53}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -207,7 +240,7 @@ - 12 + 18 @@ -215,9 +248,37 @@ AFSBackgrounderDelegate NSObject + + YES + + YES + getReleaseTokenEvent: + getToken: + releaseToken: + startStopEvent: + + + YES + id + id + id + id + + - backgrounderMenu - NSMenu + YES + + YES + backgrounderMenu + getReleaseTokenMenuItem + startStopMenuItem + + + YES + NSMenu + NSMenuItem + NSMenuItem + IBProjectSource diff --git a/src/platform/DARWIN/AFSPreference/AfsMenuExtraResource/CredentialWindow.nib/classes.nib b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/CredentialWindow.nib/classes.nib similarity index 100% rename from src/platform/DARWIN/AFSPreference/AfsMenuExtraResource/CredentialWindow.nib/classes.nib rename to src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/CredentialWindow.nib/classes.nib diff --git a/src/platform/DARWIN/AFSPreference/AfsMenuExtraResource/CredentialWindow.nib/info.nib b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/CredentialWindow.nib/info.nib similarity index 100% rename from src/platform/DARWIN/AFSPreference/AfsMenuExtraResource/CredentialWindow.nib/info.nib rename to src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/CredentialWindow.nib/info.nib diff --git a/src/platform/DARWIN/AFSPreference/AfsMenuExtraResource/CredentialWindow.nib/keyedobjects.nib b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/CredentialWindow.nib/keyedobjects.nib similarity index 100% rename from src/platform/DARWIN/AFSPreference/AfsMenuExtraResource/CredentialWindow.nib/keyedobjects.nib rename to src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/CredentialWindow.nib/keyedobjects.nib diff --git a/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/Info.plist b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/Info.plist index 676dfad87..8755bbade 100644 --- a/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/Info.plist +++ b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:identifier} + it.infn.lnf.network.${PRODUCT_NAME:identifier} CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType diff --git a/src/platform/DARWIN/AFSPreference/hasToken.png b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/hasToken.png similarity index 100% rename from src/platform/DARWIN/AFSPreference/hasToken.png rename to src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/hasToken.png diff --git a/src/platform/DARWIN/AFSPreference/noToken.png b/src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/noToken.png similarity index 100% rename from src/platform/DARWIN/AFSPreference/noToken.png rename to src/platform/DARWIN/AFSPreference/AFSBackgrounder/resource/noToken.png diff --git a/src/platform/DARWIN/AFSPreference/AFSCommanderPref.h b/src/platform/DARWIN/AFSPreference/AFSCommanderPref.h index a6e03f2fc..7280d407e 100644 --- a/src/platform/DARWIN/AFSPreference/AFSCommanderPref.h +++ b/src/platform/DARWIN/AFSPreference/AFSCommanderPref.h @@ -25,6 +25,7 @@ int CoreMenuExtraRemoveMenuExtra(void *menuExtra, int whoCares); //for check system version int prefStartUp; // Main View + BOOL startAFSAtLogin; IBOutlet NSView *afsCommanderView; IBOutlet NSSearchField *textSearchField; IBOutlet NSTextField *afsDefaultCellLabel; @@ -34,11 +35,19 @@ int CoreMenuExtraRemoveMenuExtra(void *menuExtra, int whoCares); IBOutlet NSButton *installKRB5AuthAtLoginButton; IBOutlet NSButton *useAklogCheck; IBOutlet NSTextField *afsVersionLabel; - BOOL startAFSAtLogin; IBOutlet NSButton *checkButtonAfsAtBootTime; IBOutlet NSTextField *textFieldDevInfoLabel; + IBOutlet NSTextField *statCacheEntry; + IBOutlet NSTextField *dCacheDim; + IBOutlet NSTextField *cacheDimension; + IBOutlet NSTextField *daemonNumber; + IBOutlet NSTextField *afsRootMountPoint; + IBOutlet NSTextField *nVolEntry; + IBOutlet NSButton *dynRoot; + IBOutlet NSButton *afsDB; + IBOutlet NSButton *verbose; + IBOutlet NSBox *groupsBox; - //NSString *appID; //id installationPathTextField; id startStopButton; id cellList; @@ -52,18 +61,6 @@ int CoreMenuExtraRemoveMenuExtra(void *menuExtra, int whoCares); id tokensTable; id afsMenucheckBox; - //cache manager IBOutlet - IBOutlet NSTextField *statCacheEntry; - IBOutlet NSTextField *dCacheDim; - IBOutlet NSTextField *cacheDimension; - IBOutlet NSTextField *daemonNumber; - IBOutlet NSTextField *afsRootMountPoint; - IBOutlet NSTextField *nVolEntry; - IBOutlet NSButton *dynRoot; - IBOutlet NSButton *afsDB; - IBOutlet NSButton *verbose; - IBOutlet NSBox *groupsBox; - //Configuration sheet id ipConfigurationSheet; id ipConfControllerCommander; @@ -133,13 +130,14 @@ int CoreMenuExtraRemoveMenuExtra(void *menuExtra, int whoCares); - (void) manageButtonState:(int) rowSelected; - (void) setAfsStatus; - (void) refreshTokens:(NSTimer*)theTimer; -- (BOOL) isAFSMenuExtraLoaded; -- (void) addAFSMenuExtra; -- (void) removeAFSMenuExtra; - (void) repairHelperTool; - (void) writePreferenceFile; - (void) readPreferenceFile; -- (void) mextraChangeActivation:(NSNotification *)notification; - (void) refreshGui:(NSNotification *)notification; - (void) afsVolumeMountChange:(NSNotification *)notification; -@end \ No newline at end of file +@end + +@interface AFSCommanderPref (NSTableDataSource) +- (id) getTableTokensListValue:(int) colId row:(int)row; +- (id) getTableCelListValue:(int) colId row:(int)row; +@end; \ No newline at end of file diff --git a/src/platform/DARWIN/AFSPreference/AFSCommanderPref.m b/src/platform/DARWIN/AFSPreference/AFSCommanderPref.m index 09b65b0f7..96fd0fa49 100644 --- a/src/platform/DARWIN/AFSPreference/AFSCommanderPref.m +++ b/src/platform/DARWIN/AFSPreference/AFSCommanderPref.m @@ -51,7 +51,7 @@ - (id)initWithBundle:(NSBundle *)bundle { if ( ( self = [super initWithBundle:bundle] ) != nil ) { - //appID = afsCommanderID; + //appID = kAfsCommanderID; prefStartUp = 1; } return self; @@ -66,8 +66,6 @@ SInt32 osxMnVers = 0; if (Gestalt(gestaltSystemVersionMajor, &osxMJVers) == noErr && Gestalt(gestaltSystemVersionMinor, &osxMnVers) == noErr) { if (osxMJVers == 10 && osxMnVers>= 5) { - // we are working on leopard - NSLog(@"Leopard AFSCommander adapting"); [afsCommanderView setFrameSize:NSMakeSize(668, [afsCommanderView frame].size.height)]; prefStartUp = 0; } @@ -95,6 +93,28 @@ // ------------------------------------------------------------------------------- - (void) didSelect { + //try to install the launchd file for backgrounder + //Remove launchd ctrl file + @try { + [PListManager installBackgrounderLaunchdFile:YES + resourcePath:[[self bundle] resourcePath]]; + } + @catch (NSException * e) { + NSDictionary *excecptDic = [e userInfo]; + NSNumber *keyNum = [excecptDic objectForKey:@"agent_folder_error"]; + if(keyNum && [keyNum boolValue]) { + // the dir HOME_LAUNCHD_AGENT_FOLDER (PListManager.h) must be created + NSBeginAlertSheet([[NSString stringWithString:kDoYouWantCreateTheDirectory] stringByAppendingString:HOME_LAUNCHD_AGENT_FOLDER], + @"Create", @"Cancel", nil, + [[self mainView] window], self, @selector(credentialAtLoginTimeEventCreationLaunchAgentDir:returnCode:contextInfo:), NULL, + nil, @"", nil); + } + } + @finally { + + } + + // Set Developer info [textFieldDevInfoLabel setStringValue:kDevelopInfo]; // creating the lock @@ -110,14 +130,14 @@ afsProperty = [[AFSPropertyManager alloc] init]; // register preference pane to detect menuextra killed by user - [[NSDistributedNotificationCenter defaultCenter] addObserver:self +/* [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(mextraChangeActivation:) - name:afsCommanderID - object:kMExtraClosedNotification]; + name:kAfsCommanderID + object:kMExtraClosedNotification];*/ [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshGui:) - name:afsCommanderID + name:kAfsCommanderID object:kMenuExtraEventOccured]; //Register for mount/unmount afs volume @@ -136,9 +156,6 @@ //check the afs state [self setAfsStatus]; - // check the MenuExtra state - [self mextraChangeActivation:nil]; - // let show the configuration after prefpane is open [self refreshConfiguration:nil]; @@ -149,6 +166,33 @@ [self searchCellTextEvent:nil]; } +// ------------------------------------------------------------------------------- +// credentialAtLoginTimeEventCreationLaunchAgentDir: +// ------------------------------------------------------------------------------- +- (void) credentialAtLoginTimeEventCreationLaunchAgentDir:(NSWindow*)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo { + [alert close]; + switch (returnCode) { + case 1: + NSLog(@"Yes"); + if([[NSFileManager defaultManager] createDirectoryAtPath:[HOME_LAUNCHD_AGENT_FOLDER stringByExpandingTildeInPath] + attributes:nil]) { + + //Create the file + [PListManager installBackgrounderLaunchdFile:YES + resourcePath:[[self bundle] resourcePath]]; + [self showMessage:kDirectoryCreated]; + } else { + [self showMessage:kErrorCreatingDirectory]; + } + break; + case 0: + NSLog(@"No"); + + break; + } +} + + // ------------------------------------------------------------------------------- // willUnselect: // ------------------------------------------------------------------------------- @@ -170,10 +214,10 @@ // unregister preference pane to detect menuextra killed by user [[NSDistributedNotificationCenter defaultCenter] removeObserver:self - name:afsCommanderID + name:kAfsCommanderID object:kMExtraClosedNotification]; [[NSDistributedNotificationCenter defaultCenter] removeObserver:self - name:afsCommanderID + name:kAfsCommanderID object:kMenuExtraEventOccured]; [[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:self name:NSWorkspaceDidMountNotification object:nil]; @@ -216,41 +260,37 @@ { // read the preference for afs path - //NSString *afsSysPath = PREFERENCE_AFS_SYS_PAT_STATIC;/*(NSString*)CFPreferencesCopyValue((CFStringRef)PREFERENCE_AFS_SYS_PAT, (CFStringRef)afsCommanderID, + //NSString *afsSysPath = PREFERENCE_AFS_SYS_PAT_STATIC;/*(NSString*)CFPreferencesCopyValue((CFStringRef)PREFERENCE_AFS_SYS_PAT, (CFStringRef)kAfsCommanderID, // kCFPreferencesAnyUser, kCFPreferencesAnyHost);*/ /*if(afsSysPath){ [((NSTextField*) installationPathTextField ) setStringValue:afsSysPath]; }*/ // read the preference for aklog use - NSNumber *useAklogPrefValue = (NSNumber*)CFPreferencesCopyValue((CFStringRef)PREFERENCE_USE_AKLOG, (CFStringRef)afsCommanderID, + NSNumber *useAklogPrefValue = (NSNumber*)CFPreferencesCopyValue((CFStringRef)PREFERENCE_USE_AKLOG, (CFStringRef)kAfsCommanderID, + kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + NSNumber *aklogTokenAtLogin = (NSNumber*)CFPreferencesCopyValue((CFStringRef)PREFERENCE_AKLOG_TOKEN_AT_LOGIN, (CFStringRef)kAfsCommanderID, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + [useAklogCheck setState:[useAklogPrefValue intValue]]; if(useAklogPrefValue){ - [useAklogCheck setState:[useAklogPrefValue intValue]]; - [aklogCredentialAtLoginTime setEnabled:[useAklogPrefValue intValue]]; + [aklogCredentialAtLoginTime setEnabled:[aklogTokenAtLogin boolValue]]; } else { - [useAklogCheck setState:NSOffState]; [aklogCredentialAtLoginTime setEnabled:NSOffState]; [aklogCredentialAtLoginTime setState:NSOffState]; - [PListManager installLaunchdFile:NO - resourcePath:nil]; } - //check if krb5 at startup is enable at system level - [installKRB5AuthAtLoginButton setState:[PListManager checkKrb5AtLoginTimeLaunchdEnable]]; - - //check if the user has installed and enabled the afs agent - [aklogCredentialAtLoginTime setState:[PListManager checkAklogAtLoginTimeLaunchdEnable]]; - //check for AFS enable at startup NSNumber *afsEnableStartupTime = (NSNumber*)CFPreferencesCopyValue((CFStringRef)PREFERENCE_START_AFS_AT_STARTUP, - (CFStringRef)afsCommanderID, kCFPreferencesAnyUser, kCFPreferencesAnyHost); + (CFStringRef)kAfsCommanderID, kCFPreferencesAnyUser, kCFPreferencesAnyHost); if(afsEnableStartupTime) startAFSAtLogin = [afsEnableStartupTime boolValue]; else startAFSAtLogin = false; //set the check button state [checkButtonAfsAtBootTime setState:startAFSAtLogin]; + + NSNumber *showStatusMenu = (NSNumber*)CFPreferencesCopyValue((CFStringRef)PREFERENCE_SHOW_STATUS_MENU, (CFStringRef)kAfsCommanderID, kCFPreferencesAnyUser, kCFPreferencesAnyHost); + [(NSButton*)afsMenucheckBox setState: [showStatusMenu boolValue]]; } // ------------------------------------------------------------------------------- @@ -261,24 +301,32 @@ //Set the preference for afs path /*CFPreferencesSetValue((CFStringRef)PREFERENCE_AFS_SYS_PAT, (CFStringRef)[((NSTextField*) installationPathTextField ) stringValue], - (CFStringRef)afsCommanderID, kCFPreferencesAnyUser, kCFPreferencesAnyHost);*/ + (CFStringRef)kAfsCommanderID, kCFPreferencesAnyUser, kCFPreferencesAnyHost);*/ //Set the preference for aklog use CFPreferencesSetValue((CFStringRef)PREFERENCE_USE_AKLOG, (CFNumberRef)[NSNumber numberWithInt:[useAklogCheck state]], - (CFStringRef)afsCommanderID, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); - - - // Notify - if ([self isAFSMenuExtraLoaded]) [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAFSMenuExtraID object:kPrefChangeNotification]; - + (CFStringRef)kAfsCommanderID, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + //set AFS enable state at startup CFPreferencesSetValue((CFStringRef)PREFERENCE_START_AFS_AT_STARTUP, (CFNumberRef)[NSNumber numberWithBool:startAFSAtLogin], - (CFStringRef)afsCommanderID, kCFPreferencesAnyUser, kCFPreferencesAnyHost); + (CFStringRef)kAfsCommanderID, kCFPreferencesAnyUser, kCFPreferencesAnyHost); - CFPreferencesSynchronize((CFStringRef)afsCommanderID, kCFPreferencesAnyUser, kCFPreferencesAnyHost); - CFPreferencesSynchronize((CFStringRef)afsCommanderID, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + //set aklog at login + CFPreferencesSetValue((CFStringRef)PREFERENCE_AKLOG_TOKEN_AT_LOGIN, + (CFNumberRef)[NSNumber numberWithBool:[aklogCredentialAtLoginTime state]], + (CFStringRef)kAfsCommanderID, kCFPreferencesAnyUser, kCFPreferencesAnyHost); + + //set aklog at login + CFPreferencesSetValue((CFStringRef)PREFERENCE_SHOW_STATUS_MENU, + (CFNumberRef)[NSNumber numberWithBool:[afsMenucheckBox state]], + (CFStringRef)kAfsCommanderID, kCFPreferencesAnyUser, kCFPreferencesAnyHost); + + CFPreferencesSynchronize((CFStringRef)kAfsCommanderID, kCFPreferencesAnyUser, kCFPreferencesAnyHost); + CFPreferencesSynchronize((CFStringRef)kAfsCommanderID, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + + [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAFSMenuExtraID object:kPrefChangeNotification]; } // ------------------------------------------------------------------------------- @@ -649,7 +697,7 @@ pwd:nil]; [self refreshTokens:nil]; //Inform afs menuextra to updata afs status - if ([self isAFSMenuExtraLoaded]) [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAFSMenuExtraID object:kMExtraAFSStateChange]; + [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAFSMenuExtraID object:kMExtraAFSStateChange]; } else { [NSBundle loadNibNamed:@"CredentialPanel" owner:self]; @@ -682,7 +730,7 @@ } [self refreshTokens:nil]; //Inform afs menuextra to updata afs status - if ([self isAFSMenuExtraLoaded]) [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAFSMenuExtraID object:kMExtraAFSStateChange]; + [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAFSMenuExtraID object:kMExtraAFSStateChange]; } @@ -695,9 +743,6 @@ //afs menu extra is loaded inform it to read preference @try { if(![useAklogCheck state]) { - //Remove launchd ctrl file - [PListManager installLaunchdFile:NO resourcePath:[[self bundle] resourcePath]]; - //deselect the checkbox [aklogCredentialAtLoginTime setState:NO]; } @@ -720,30 +765,7 @@ // credentialAtLoginTimeEvent: // ------------------------------------------------------------------------------- - (IBAction) credentialAtLoginTimeEvent:(id) sender { - @try { - [PListManager installLaunchdFile:[aklogCredentialAtLoginTime state] - resourcePath:[[self bundle] resourcePath]]; - - - - } - @catch (NSException * e) { - if([e userInfo] != nil && [[e userInfo] isKindOfClass:[NSNumber class]]) { - if([((NSNumber*)[e userInfo]) intValue] == 1) { - // the dir HOME_LAUNCHD_AGENT_FOLDER (PListManager.h) must be created - NSBeginAlertSheet([[NSString stringWithString:kDoYouWantCreateTheDirectory] stringByAppendingString:HOME_LAUNCHD_AGENT_FOLDER], - @"Create", @"Cancel", nil, - [[self mainView] window], self, @selector(credentialAtLoginTimeEventCreationLaunchAgentDir:returnCode:contextInfo:), NULL, - nil, @"", nil); - } - } else { - [self showMessage:[e reason]]; - } - } - @finally { - [aklogCredentialAtLoginTime setState:[PListManager checkAklogAtLoginTimeLaunchdEnable]]; - } - + [self writePreferenceFile]; } // ------------------------------------------------------------------------------- @@ -781,34 +803,6 @@ } } -// ------------------------------------------------------------------------------- -// credentialAtLoginTimeEventCreationLaunchAgentDir: -// ------------------------------------------------------------------------------- -- (void) credentialAtLoginTimeEventCreationLaunchAgentDir:(NSWindow*)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo { - [alert close]; - switch (returnCode) { - case 1: - NSLog(@"Yes"); - if([[NSFileManager defaultManager] createDirectoryAtPath:[HOME_LAUNCHD_AGENT_FOLDER stringByExpandingTildeInPath] - attributes:nil]) { - - //Create the file - [PListManager installLaunchdFile:YES - resourcePath:[[self bundle] resourcePath]]; - - //refresh the check box - [aklogCredentialAtLoginTime setState:[PListManager checkAklogAtLoginTimeLaunchdEnable]]; - [self showMessage:kDirectoryCreated]; - } else { - [self showMessage:kErrorCreatingDirectory]; - } - break; - case 0: - NSLog(@"No"); - - break; - } -} // ------------------------------------------------------------------------------- // afsMenuActivationEvent: @@ -835,13 +829,15 @@ // ------------------------------------------------------------------------------- -(IBAction) afsMenuActivationEvent:(id) sender { - if([(NSButton*)afsMenucheckBox state] == NSOffState){ - // must remove the menu - [self removeAFSMenuExtra]; - } else { - // must add the menu - [self addAFSMenuExtra]; - } + CFPreferencesSetValue((CFStringRef)PREFERENCE_SHOW_STATUS_MENU, + (CFNumberRef)[NSNumber numberWithBool:[afsMenucheckBox state]], + (CFStringRef)kAfsCommanderID, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + + CFPreferencesSynchronize((CFStringRef)kAfsCommanderID, kCFPreferencesAnyUser, kCFPreferencesAnyHost); + CFPreferencesSynchronize((CFStringRef)kAfsCommanderID, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + + //notify the backgrounder + [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAFSMenuExtraID object:kMExtraAFSMenuChangeState]; } // ------------------------------------------------------------------------------- @@ -979,41 +975,6 @@ [tokensLock unlock]; } - -// ------------------------------------------------------------------------------- -// isExtraMenuLoaded: -// ------------------------------------------------------------------------------- -- (BOOL) isAFSMenuExtraLoaded -{ - void *menu; - if ((CoreMenuExtraGetMenuExtra((CFStringRef)kAFSMenuExtraID, &menu) == 0) && menu) { - return YES; - } - else { - return NO; - } -} - -// ------------------------------------------------------------------------------- -// isExtraMenuLoaded: -// ------------------------------------------------------------------------------- -- (void)addAFSMenuExtra { - - void *menuCracker = 0L; - - //Check for MenuCracker - if ((CoreMenuExtraGetMenuExtra((CFStringRef)kMenuCrakerMenuExtraID, &menuCracker) != 0) || !menuCracker) { - NSLog(@"MenuCracker not present"); - - // load the MenuCracker.menu menu extra - CoreMenuExtraAddMenuExtra((CFURLRef)kMenuCrakerMenuExtra, 0, 0, 0, 0, 0); - } else NSLog(@"MenuCracker alredy loaded"); - - - //Load the AFSCommander menu extra - CoreMenuExtraAddMenuExtra((CFURLRef)kAFSMenuExtra, 0, 0, 0, 0, 0); -} - // ------------------------------------------------------------------------------- // removeExtra: // ------------------------------------------------------------------------------- @@ -1041,27 +1002,6 @@ - (IBAction) enableLink:(id) sender { } - - -// ------------------------------------------------------------------------------- -// removeExtra: -// ------------------------------------------------------------------------------- -- (void)removeAFSMenuExtra{ - void *menu; - if ((CoreMenuExtraGetMenuExtra((CFStringRef)kAFSMenuExtraID, &menu) == 0) && menu) { - CoreMenuExtraRemoveMenuExtra(menu, 0); - } -} - - -// ------------------------------------------------------------------------------- -// mextraChangeActivation: -// ------------------------------------------------------------------------------- -- (void)mextraChangeActivation:(NSNotification *)notification -{ - // set the afsmenu check state - [(NSButton*)afsMenucheckBox setState: [self isAFSMenuExtraLoaded]?NSOnState:NSOffState]; -} @end @implementation AFSCommanderPref (NSTableDataSource) @@ -1248,7 +1188,7 @@ [sheet orderOut:self]; [self refreshTokens:nil]; //Inform afs menuextra to updata afs status - if ([self isAFSMenuExtraLoaded]) [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAFSMenuExtraID object:kMExtraAFSStateChange]; + [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAFSMenuExtraID object:kMExtraAFSStateChange]; } diff --git a/src/platform/DARWIN/AFSPreference/AFSMenuExtraView.h b/src/platform/DARWIN/AFSPreference/AFSMenuExtraView.h deleted file mode 100644 index 8869c1c71..000000000 --- a/src/platform/DARWIN/AFSPreference/AFSMenuExtraView.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// AFSMenuExtraView.h -// AFSCommander -// -// Created by Claudio Bisegni on 11/07/07. -// Copyright 2007 INFN - National Institute of Nuclear Physics. All rights reserved. -// - -#import -#import "SystemUIPlugin.h" -#import "AFSMenuExtra.h" - -@interface AFSMenuExtraView : NSMenuExtraView { - AFSMenuExtra *theMenuExtra; - -} -- (NSAttributedString*) makeKerberosIndicator:(int*)fontHeight; -@end diff --git a/src/platform/DARWIN/AFSPreference/AfsMenuExtraResource/Info.plist b/src/platform/DARWIN/AFSPreference/AfsMenuExtraResource/Info.plist deleted file mode 100644 index 01c9deabc..000000000 --- a/src/platform/DARWIN/AFSPreference/AfsMenuExtraResource/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - AFSMenuExtra - CFBundleIdentifier - it.infn.lnf.network.AFSMenuExtra - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - INFN - CFBundleVersion - 0.2a - NSPrincipalClass - AFSMenuExtra - - diff --git a/src/platform/DARWIN/AFSPreference/MenuCracker.menu/Contents/Info.plist b/src/platform/DARWIN/AFSPreference/MenuCracker.menu/Contents/Info.plist deleted file mode 100644 index efe0c9edb..000000000 --- a/src/platform/DARWIN/AFSPreference/MenuCracker.menu/Contents/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleExecutable - MenuCracker - CFBundleGetInfoString - MenuCracker 1.4 ©2001-2006, james_007_bond@users.sourceforge.net - CFBundleIdentifier - net.sourceforge.menucracker2 - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - MenuCracker - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.4 - CFBundleSignature - ???? - CFBundleVersion - 6 - NSMenuExtraWidth - 0 - NSPrincipalClass - CPUExtra - - diff --git a/src/platform/DARWIN/AFSPreference/MenuCracker.menu/Contents/MacOS/MenuCracker b/src/platform/DARWIN/AFSPreference/MenuCracker.menu/Contents/MacOS/MenuCracker deleted file mode 100755 index c85b89cd7338b037442ba1d8e64629c4c72efb20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 47328 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 QDS`i89l?-pU}=f}0(HH7%>V!Z diff --git a/src/platform/DARWIN/AFSPreference/MenuCracker.menu/Contents/Resources/ReadMe.rtf b/src/platform/DARWIN/AFSPreference/MenuCracker.menu/Contents/Resources/ReadMe.rtf deleted file mode 100644 index d635393dd..000000000 --- a/src/platform/DARWIN/AFSPreference/MenuCracker.menu/Contents/Resources/ReadMe.rtf +++ /dev/null @@ -1,51 +0,0 @@ -{\rtf1\mac\ansicpg10000\cocoartf102 -{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fnil\fcharset77 Monaco; -} -{\colortbl;\red255\green255\blue255;\red118\green15\blue80;\red0\green0\blue255;\red35\green110\blue37; -} -\margl1440\margr1440\vieww17140\viewh9140\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural - -\f0\fs24 \cf0 Welcome to -\f1\b MenuCracker -\f0\b0 .\ -\ -Menu cracker is a little tool to reenable the menu extra that Apple closed in Mac OS X 10.2 (code named Jaguar). Using MenuCracker you can use all your 10.1 Menu Extras unmodified.\ -\ -If you are an end user and you just want to make sure everything works as it was before 10.2:\ -\ -- first copy MenuCracker.menu anywhere in your home directory (Applications and Library/Bundles are relatively good choices)\ -\ -- Then double click on the installed version or drag it to the menubar.\ -\ -That's it.\ -\ -From then on all your third party menu extra will work.\ -\ -If you are a developer and your menu extra is controlled by an application there is some work for you to do. First add the MenuCracker binary to the resource folder of your application or preference pane. Then before calling -\f2\fs20 \CocoaLigature0 CoreMenuExtraAddMenuExtra() -\f0\fs24 \CocoaLigature1 for your menu extra execute the following code:\ -\ -\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\tx18720\tx19200\tx19680\tx20160\tx20640\tx21120\tx21600\tx22080\tx22560\tx23040\tx23520\tx24000\tx24480\tx24960\tx25440\tx25920\tx26400\tx26880\tx27360\tx27840\tx28320\tx28800\tx29280\tx29760\tx30240\tx30720\tx31200\tx31680\tx32160\tx32640\tx33120\tx33600\tx34080\tx34560\tx35040\tx35520\tx36000\tx36480\tx36960\tx37440\tx37920\tx38400\tx38880\tx39360\tx39840\tx40320\tx40800\tx41280\tx41760\tx42240\tx42720\tx43200\tx43680\tx44160\tx44640\tx45120\tx45600\tx46080\tx46560\tx47040\tx47520\tx48000\li1440\fi-1440\ql\qnatural - -\f2\fs20 \cf0 \CocoaLigature0 NSString *menuExtraPath = [[[\cf2 self\cf0 bundle] resourcePath] stringByAppendingPathComponent:@"MenuCracker.menu"];\ - CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, (CFStringRef)menuExtraPath, kCFURLPOSIXPathStyle, \cf2 NO\cf0 );\ -\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\tx18720\tx19200\tx19680\tx20160\tx20640\tx21120\tx21600\tx22080\tx22560\tx23040\tx23520\tx24000\tx24480\tx24960\tx25440\tx25920\tx26400\tx26880\tx27360\tx27840\tx28320\tx28800\tx29280\tx29760\tx30240\tx30720\tx31200\tx31680\tx32160\tx32640\tx33120\tx33600\tx34080\tx34560\tx35040\tx35520\tx36000\tx36480\tx36960\tx37440\tx37920\tx38400\tx38880\tx39360\tx39840\tx40320\tx40800\tx41280\tx41760\tx42240\tx42720\tx43200\tx43680\tx44160\tx44640\tx45120\tx45600\tx46080\tx46560\tx47040\tx47520\tx48000\li960\fi-960\ql\qnatural -\cf0 \cf2 unsigned\cf0 \cf2 int\cf0 outExtra;\ -\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\tx18720\tx19200\tx19680\tx20160\tx20640\tx21120\tx21600\tx22080\tx22560\tx23040\tx23520\tx24000\tx24480\tx24960\tx25440\tx25920\tx26400\tx26880\tx27360\tx27840\tx28320\tx28800\tx29280\tx29760\tx30240\tx30720\tx31200\tx31680\tx32160\tx32640\tx33120\tx33600\tx34080\tx34560\tx35040\tx35520\tx36000\tx36480\tx36960\tx37440\tx37920\tx38400\tx38880\tx39360\tx39840\tx40320\tx40800\tx41280\tx41760\tx42240\tx42720\tx43200\tx43680\tx44160\tx44640\tx45120\tx45600\tx46080\tx46560\tx47040\tx47520\tx48000\li1440\fi-1440\ql\qnatural -\cf0 \ - CoreMenuExtraAddMenuExtra(url, 0, \cf3 0\cf0 , \cf2 nil\cf0 , \cf3 0\cf0 , &outExtra);\ -\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\tx18720\tx19200\tx19680\tx20160\tx20640\tx21120\tx21600\tx22080\tx22560\tx23040\tx23520\tx24000\tx24480\tx24960\tx25440\tx25920\tx26400\tx26880\tx27360\tx27840\tx28320\tx28800\tx29280\tx29760\tx30240\tx30720\tx31200\tx31680\tx32160\tx32640\tx33120\tx33600\tx34080\tx34560\tx35040\tx35520\tx36000\tx36480\tx36960\tx37440\tx37920\tx38400\tx38880\tx39360\tx39840\tx40320\tx40800\tx41280\tx41760\tx42240\tx42720\tx43200\tx43680\tx44160\tx44640\tx45120\tx45600\tx46080\tx46560\tx47040\tx47520\tx48000\li1920\fi-1920\ql\qnatural -\cf0 -\f0\fs24 \cf4 // Do not check the return value as it is always going to return an error -\f2\fs20 \cf0 \ -\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\tx18720\tx19200\tx19680\tx20160\tx20640\tx21120\tx21600\tx22080\tx22560\tx23040\tx23520\tx24000\tx24480\tx24960\tx25440\tx25920\tx26400\tx26880\tx27360\tx27840\tx28320\tx28800\tx29280\tx29760\tx30240\tx30720\tx31200\tx31680\tx32160\tx32640\tx33120\tx33600\tx34080\tx34560\tx35040\tx35520\tx36000\tx36480\tx36960\tx37440\tx37920\tx38400\tx38880\tx39360\tx39840\tx40320\tx40800\tx41280\tx41760\tx42240\tx42720\tx43200\tx43680\tx44160\tx44640\tx45120\tx45600\tx46080\tx46560\tx47040\tx47520\tx48000\li1440\fi-1440\ql\qnatural -\cf0 CFRelease(url);\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural - -\f0\fs24 \cf0 \CocoaLigature1 \ -That's it.\ -\ -You can find the latest version of MenuCracker at http://sourceforge.net/projects/menucracker.\ -\ --- james_007_bond @ users.sourceforge.net} \ No newline at end of file diff --git a/src/platform/DARWIN/AFSPreference/OpenAFS.xcodeproj/project.pbxproj b/src/platform/DARWIN/AFSPreference/OpenAFS.xcodeproj/project.pbxproj index 123d2801b..c78cfd02c 100644 --- a/src/platform/DARWIN/AFSPreference/OpenAFS.xcodeproj/project.pbxproj +++ b/src/platform/DARWIN/AFSPreference/OpenAFS.xcodeproj/project.pbxproj @@ -18,27 +18,20 @@ 3228B9B4102052A900DF98DA /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 327309620C2AB433008C322B /* Security.framework */; }; 3228B9BE102052BE00DF98DA /* version.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3228B9BD102052BE00DF98DA /* version.plist */; }; 3228B9D5102070A200DF98DA /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3276591D10204E08004CA418 /* Info.plist */; }; - 3228BA1910207A4200DF98DA /* hasToken.png in Resources */ = {isa = PBXBuildFile; fileRef = 3228BA1810207A4200DF98DA /* hasToken.png */; }; - 3228BA1B10207A5200DF98DA /* noToken.png in Resources */ = {isa = PBXBuildFile; fileRef = 3228BA1A10207A5200DF98DA /* noToken.png */; }; 322B90450C2F0A2D0068F99A /* start_afs.sh in Resources */ = {isa = PBXBuildFile; fileRef = 322B90430C2F0A2D0068F99A /* start_afs.sh */; }; 322B90460C2F0A2D0068F99A /* stop_afs.sh in Resources */ = {isa = PBXBuildFile; fileRef = 322B90440C2F0A2D0068F99A /* stop_afs.sh */; }; 322CEF600C211D220060D66D /* DBCellElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 322CEF5F0C211D220060D66D /* DBCellElement.m */; }; 322CEF6E0C211DCC0060D66D /* CellIp.m in Sources */ = {isa = PBXBuildFile; fileRef = 322CEF6D0C211DCC0060D66D /* CellIp.m */; }; + 3231522010243E09005901AA /* AFSMenuCredentialContoller.m in Sources */ = {isa = PBXBuildFile; fileRef = 3231521A10243E09005901AA /* AFSMenuCredentialContoller.m */; }; + 3231522210243E09005901AA /* AFSMenuExtraView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3231521E10243E09005901AA /* AFSMenuExtraView.m */; }; + 3231522610243E10005901AA /* CredentialWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3231522510243E10005901AA /* CredentialWindowController.m */; }; + 3231522810243E21005901AA /* CredentialWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = 3231522710243E21005901AA /* CredentialWindow.nib */; }; + 3231522B10243E2C005901AA /* hasToken.png in Resources */ = {isa = PBXBuildFile; fileRef = 3231522910243E2C005901AA /* hasToken.png */; }; + 3231522C10243E2C005901AA /* noToken.png in Resources */ = {isa = PBXBuildFile; fileRef = 3231522A10243E2C005901AA /* noToken.png */; }; 324D67FD0DA13194007E1561 /* OpenAFSPreference.xib in Resources */ = {isa = PBXBuildFile; fileRef = 324D67FB0DA13194007E1561 /* OpenAFSPreference.xib */; }; 324D683D0DA133A3007E1561 /* IpPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 324D683B0DA133A3007E1561 /* IpPanel.xib */; }; 324D684A0DA133CF007E1561 /* CredentialPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 324D68480DA133CF007E1561 /* CredentialPanel.xib */; }; - 325311AB0C44F38200FAF2F3 /* AFSPropertyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B0AFDE0C01729400272348 /* AFSPropertyManager.m */; }; - 325311AF0C44F38D00FAF2F3 /* CellIp.m in Sources */ = {isa = PBXBuildFile; fileRef = 322CEF6D0C211DCC0060D66D /* CellIp.m */; }; - 325311B00C44F38D00FAF2F3 /* DBCellElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 322CEF5F0C211D220060D66D /* DBCellElement.m */; }; - 325311B10C44F39200FAF2F3 /* TaskUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 327756260C3053A100C15D11 /* TaskUtil.m */; }; - 325311B20C44F39300FAF2F3 /* AuthUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 3213E9400C2ABFD200D3D2F6 /* AuthUtil.m */; }; - 325311B30C44F39400FAF2F3 /* FileUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 3273088C0C2A9B05008C322B /* FileUtil.m */; }; 325311D00C44F4B100FAF2F3 /* licenza.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 325311CF0C44F4B100FAF2F3 /* licenza.rtf */; }; - 325312190C44F7BD00FAF2F3 /* AFSMenuExtraView.m in Sources */ = {isa = PBXBuildFile; fileRef = 325312180C44F7BD00FAF2F3 /* AFSMenuExtraView.m */; }; - 325313520C45153400FAF2F3 /* SecurityFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 327308D20C2AA364008C322B /* SecurityFoundation.framework */; }; - 325313550C45153500FAF2F3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 327309620C2AB433008C322B /* Security.framework */; }; - 3253138D0C45157A00FAF2F3 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; - 325313B10C4516A900FAF2F3 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 325313B00C4516A900FAF2F3 /* Info.plist */; }; 3273088D0C2A9B05008C322B /* FileUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 3273088B0C2A9B05008C322B /* FileUtil.h */; }; 3273088E0C2A9B05008C322B /* FileUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 3273088C0C2A9B05008C322B /* FileUtil.m */; }; 327308C30C2AA2E1008C322B /* FileUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 3273088C0C2A9B05008C322B /* FileUtil.m */; }; @@ -69,37 +62,25 @@ 32B0AFE00C01729400272348 /* AFSPropertyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B0AFDE0C01729400272348 /* AFSPropertyManager.m */; }; 32B565740D8FAF62005255F2 /* NSString+search.h in Headers */ = {isa = PBXBuildFile; fileRef = 32B565720D8FAF62005255F2 /* NSString+search.h */; }; 32B565750D8FAF62005255F2 /* NSString+search.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B565730D8FAF62005255F2 /* NSString+search.m */; }; - 32B565760D8FAF62005255F2 /* NSString+search.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B565730D8FAF62005255F2 /* NSString+search.m */; }; 32C4A9580C268D9B009280A0 /* IpConfiguratorCommander.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C4A9570C268D9B009280A0 /* IpConfiguratorCommander.m */; }; 32C4A9B80C26A0FA009280A0 /* IpConfiguratorCommander.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C4A9570C268D9B009280A0 /* IpConfiguratorCommander.m */; }; 32C4A9B90C26A0FB009280A0 /* IpConfiguratorCommander.h in Headers */ = {isa = PBXBuildFile; fileRef = 32C4A9560C268D9B009280A0 /* IpConfiguratorCommander.h */; }; 32CF013F0C203C5600A8DC58 /* TestLib.m in Sources */ = {isa = PBXBuildFile; fileRef = 32CFFEFD0C20316B00A8DC58 /* TestLib.m */; }; 32CF01460C203CA800A8DC58 /* AFSPropertyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B0AFDE0C01729400272348 /* AFSPropertyManager.m */; }; 32CF014C0C203CBD00A8DC58 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; - 32D45E070C4B4D9C00A1012D /* afshlp in Resources */ = {isa = PBXBuildFile; fileRef = 49683EE40C3446380093C7C8 /* afshlp */; }; 32DE818C0DF573200069A05C /* LynkCreationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 32DE818A0DF573200069A05C /* LynkCreationController.h */; }; 32DE818D0DF573200069A05C /* LynkCreationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32DE818B0DF573200069A05C /* LynkCreationController.m */; }; 32DE81BD0DF57BDA0069A05C /* SymLinkEdit.xib in Resources */ = {isa = PBXBuildFile; fileRef = 32DE81BC0DF57BDA0069A05C /* SymLinkEdit.xib */; }; + 32E299A3102491AA00D2C2E5 /* AFSBackgrounder.app in Resources */ = {isa = PBXBuildFile; fileRef = 3276591B10204E08004CA418 /* AFSBackgrounder.app */; }; 492AFA860C51301D00AEDC93 /* TokenCredentialController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3219259B0C339DAE00B55E86 /* TokenCredentialController.h */; }; 492AFA870C51301E00AEDC93 /* TokenCredentialController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3219259C0C339DAE00B55E86 /* TokenCredentialController.m */; }; - 492AFB280C51483600AEDC93 /* CredentialWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = 492AFB270C51483600AEDC93 /* CredentialWindow.nib */; }; 4934D4170DC38958000511D2 /* PListManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 498DCB420DC2240B00D143C8 /* PListManager.m */; }; 493564E80CE711F300699A24 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 493564E70CE711F300699A24 /* Carbon.framework */; }; 4940075B0CE62EB500F40D0A /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4940075A0CE62EB500F40D0A /* CoreServices.framework */; }; - 4941F4C00C491D2D00B29A73 /* TokenCredentialController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3219259C0C339DAE00B55E86 /* TokenCredentialController.m */; }; - 4941F5100C4929C000B29A73 /* AFSMenuCredentialContoller.m in Sources */ = {isa = PBXBuildFile; fileRef = 4941F50F0C4929C000B29A73 /* AFSMenuCredentialContoller.m */; }; - 4941F6320C49379000B29A73 /* CredentialWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4941F6310C49379000B29A73 /* CredentialWindowController.m */; }; - 494435170DC35D4C00C7A333 /* LoginTimeDaemon in Resources */ = {isa = PBXBuildFile; fileRef = 4998A6860DC33BEC00146652 /* LoginTimeDaemon */; }; - 494BD4880C43EEA400DB0A3A /* SystemUIPlugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 494BD4870C43EEA400DB0A3A /* SystemUIPlugin.framework */; }; - 494BD48C0C43EEC300DB0A3A /* AFSMenuExtra.m in Sources */ = {isa = PBXBuildFile; fileRef = 494BD48B0C43EEC300DB0A3A /* AFSMenuExtra.m */; }; - 494C75110C4605C000D3A2D2 /* AFSMenuExtra.menu in Resources */ = {isa = PBXBuildFile; fileRef = 494C74DE0C46052800D3A2D2 /* AFSMenuExtra.menu */; }; - 49575BB50C53CBDB00B3BC32 /* hasToken.png in Resources */ = {isa = PBXBuildFile; fileRef = 49575BB30C53CBDB00B3BC32 /* hasToken.png */; }; - 49575BB60C53CBDB00B3BC32 /* noToken.png in Resources */ = {isa = PBXBuildFile; fileRef = 49575BB40C53CBDB00B3BC32 /* noToken.png */; }; 495B04400D219A2900F1E328 /* ViewUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 495B043E0D219A2900F1E328 /* ViewUtility.h */; }; 495B04410D219A2900F1E328 /* ViewUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 495B043F0D219A2900F1E328 /* ViewUtility.m */; }; 495B04420D219A2900F1E328 /* ViewUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 495B043F0D219A2900F1E328 /* ViewUtility.m */; }; 495C39470D81EA3C003426FC /* Kerberos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 495C39460D81EA3C003426FC /* Kerberos.framework */; }; - 495C39480D81EA3C003426FC /* Kerberos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 495C39460D81EA3C003426FC /* Kerberos.framework */; }; 495C39490D81EA3C003426FC /* Kerberos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 495C39460D81EA3C003426FC /* Kerberos.framework */; }; 495C39CC0D81F742003426FC /* Kerberos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 495C39460D81EA3C003426FC /* Kerberos.framework */; }; 49683EEC0C3446600093C7C8 /* afshlp.m in Sources */ = {isa = PBXBuildFile; fileRef = 49683EEB0C3446600093C7C8 /* afshlp.m */; }; @@ -140,10 +121,7 @@ 49B766450DCA47A50014A80F /* DialogUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 49B766430DCA47A50014A80F /* DialogUtility.h */; }; 49B766460DCA47A50014A80F /* DialogUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 49B766440DCA47A50014A80F /* DialogUtility.m */; }; 49E05CAD0C2674DA002AAEF2 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8D202CF70486D31800D8A456 /* Info.plist */; }; - 49E43BA60C47D53F00084436 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3223836A0C32A96F00380547 /* Localizable.strings */; }; 49E43BE70C47D9EE00084436 /* global.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E43BE60C47D9EE00084436 /* global.h */; }; - 49E43C730C47E0EA00084436 /* start_afs.sh in Resources */ = {isa = PBXBuildFile; fileRef = 322B90430C2F0A2D0068F99A /* start_afs.sh */; }; - 49E43C740C47E0EC00084436 /* stop_afs.sh in Resources */ = {isa = PBXBuildFile; fileRef = 322B90440C2F0A2D0068F99A /* stop_afs.sh */; }; 49E43D2E0C480B8200084436 /* afshlp in Resources */ = {isa = PBXBuildFile; fileRef = 49683EE40C3446380093C7C8 /* afshlp */; }; 49FFE7D20C2AED7200DF83CF /* AuthUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 3213E9400C2ABFD200D3D2F6 /* AuthUtil.m */; }; 8D202CEA0486D31800D8A456 /* AFSCommander_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32DBCFA20370C41700C91783 /* AFSCommander_Prefix.pch */; }; @@ -154,41 +132,22 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 3279B9800C451A63008FE3FA /* PBXContainerItemProxy */ = { + 32E29A9810249A1200D2C2E5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 089C1669FE841209C02AAC07 /* Project object */; proxyType = 1; - remoteGlobalIDString = 494BD4680C43ED0C00DB0A3A; - remoteInfo = AFSMenuExtra; - }; - 494435680DC35D6F00C7A333 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 089C1669FE841209C02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 4998A6850DC33BEC00146652; - remoteInfo = LoginTimeDaemon; + remoteGlobalIDString = 49683EE30C3446380093C7C8 /* afshlp */; + remoteInfo = afshlp; }; - 49575C270C53CD9A00B3BC32 /* PBXContainerItemProxy */ = { + 32E29A9A10249A1600D2C2E5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 089C1669FE841209C02AAC07 /* Project object */; proxyType = 1; - remoteGlobalIDString = 49683EE30C3446380093C7C8; - remoteInfo = afshlp; + remoteGlobalIDString = 3276591A10204E08004CA418 /* AFSBackgrounder */; + remoteInfo = AFSBackgrounder; }; /* End PBXContainerItemProxy section */ -/* Begin PBXCopyFilesBuildPhase section */ - 494D72C90C350BC400B1FD21 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = MenuCracker.menu; - dstSubfolderSpec = 7; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -203,21 +162,27 @@ 322884020C3E45C800E778CC /* InfoController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InfoController.m; sourceTree = ""; }; 3228B9AF1020526900DF98DA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = AFSBackgrounder/main.m; sourceTree = ""; }; 3228B9BD102052BE00DF98DA /* version.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = version.plist; path = AFSBackgrounder/resource/version.plist; sourceTree = ""; }; - 3228BA1810207A4200DF98DA /* hasToken.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = hasToken.png; sourceTree = ""; }; - 3228BA1A10207A5200DF98DA /* noToken.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = noToken.png; sourceTree = ""; }; 322B90430C2F0A2D0068F99A /* start_afs.sh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = start_afs.sh; sourceTree = ""; }; 322B90440C2F0A2D0068F99A /* stop_afs.sh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = stop_afs.sh; sourceTree = ""; }; 322CEF5E0C211D220060D66D /* DBCellElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBCellElement.h; sourceTree = ""; }; 322CEF5F0C211D220060D66D /* DBCellElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DBCellElement.m; sourceTree = ""; }; 322CEF6C0C211DCC0060D66D /* CellIp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CellIp.h; sourceTree = ""; }; 322CEF6D0C211DCC0060D66D /* CellIp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CellIp.m; sourceTree = ""; }; + 3231521910243E09005901AA /* AFSMenuCredentialContoller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFSMenuCredentialContoller.h; path = AFSBackgrounder/AFSMenuCredentialContoller.h; sourceTree = ""; }; + 3231521A10243E09005901AA /* AFSMenuCredentialContoller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFSMenuCredentialContoller.m; path = AFSBackgrounder/AFSMenuCredentialContoller.m; sourceTree = ""; }; + 3231521B10243E09005901AA /* AFSMenuExtra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFSMenuExtra.h; path = AFSBackgrounder/AFSMenuExtra.h; sourceTree = ""; }; + 3231521C10243E09005901AA /* AFSMenuExtra.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFSMenuExtra.m; path = AFSBackgrounder/AFSMenuExtra.m; sourceTree = ""; }; + 3231521D10243E09005901AA /* AFSMenuExtraView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFSMenuExtraView.h; path = AFSBackgrounder/AFSMenuExtraView.h; sourceTree = ""; }; + 3231521E10243E09005901AA /* AFSMenuExtraView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFSMenuExtraView.m; path = AFSBackgrounder/AFSMenuExtraView.m; sourceTree = ""; }; + 3231522410243E10005901AA /* CredentialWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CredentialWindowController.h; sourceTree = ""; }; + 3231522510243E10005901AA /* CredentialWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CredentialWindowController.m; sourceTree = ""; }; + 3231522710243E21005901AA /* CredentialWindow.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = CredentialWindow.nib; path = AFSBackgrounder/resource/CredentialWindow.nib; sourceTree = ""; }; + 3231522910243E2C005901AA /* hasToken.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = hasToken.png; path = AFSBackgrounder/resource/hasToken.png; sourceTree = ""; }; + 3231522A10243E2C005901AA /* noToken.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = noToken.png; path = AFSBackgrounder/resource/noToken.png; sourceTree = ""; }; 324D67FC0DA13194007E1561 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/OpenAFSPreference.xib; sourceTree = ""; }; 324D683C0DA133A3007E1561 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/IpPanel.xib; sourceTree = ""; }; 324D68490DA133CF007E1561 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/CredentialPanel.xib; sourceTree = ""; }; 325311CF0C44F4B100FAF2F3 /* licenza.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = licenza.rtf; sourceTree = ""; }; - 325312170C44F7BD00FAF2F3 /* AFSMenuExtraView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFSMenuExtraView.h; sourceTree = ""; }; - 325312180C44F7BD00FAF2F3 /* AFSMenuExtraView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFSMenuExtraView.m; sourceTree = ""; }; - 325313B00C4516A900FAF2F3 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; name = Info.plist; path = AfsMenuExtraResource/Info.plist; sourceTree = ""; }; 3273088B0C2A9B05008C322B /* FileUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileUtil.h; sourceTree = ""; }; 3273088C0C2A9B05008C322B /* FileUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileUtil.m; sourceTree = ""; }; 327308D20C2AA364008C322B /* SecurityFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityFoundation.framework; path = /System/Library/Frameworks/SecurityFoundation.framework; sourceTree = ""; }; @@ -241,20 +206,9 @@ 32DE817D0DF571630069A05C /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/SymLinkEdit.xib; sourceTree = ""; }; 32DE818A0DF573200069A05C /* LynkCreationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LynkCreationController.h; sourceTree = ""; }; 32DE818B0DF573200069A05C /* LynkCreationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LynkCreationController.m; sourceTree = ""; }; - 492AFB270C51483600AEDC93 /* CredentialWindow.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = CredentialWindow.nib; path = AfsMenuExtraResource/CredentialWindow.nib; sourceTree = ""; }; 493564E70CE711F300699A24 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 4940075A0CE62EB500F40D0A /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; - 4941F50E0C4929C000B29A73 /* AFSMenuCredentialContoller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFSMenuCredentialContoller.h; sourceTree = ""; }; - 4941F50F0C4929C000B29A73 /* AFSMenuCredentialContoller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFSMenuCredentialContoller.m; sourceTree = ""; }; - 4941F6300C49379000B29A73 /* CredentialWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CredentialWindowController.h; sourceTree = ""; }; - 4941F6310C49379000B29A73 /* CredentialWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CredentialWindowController.m; sourceTree = ""; }; 494BD47B0C43EDF900DB0A3A /* SystemUIPlugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SystemUIPlugin.h; sourceTree = ""; }; - 494BD4870C43EEA400DB0A3A /* SystemUIPlugin.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemUIPlugin.framework; path = /System/Library/PrivateFrameworks/SystemUIPlugin.framework; sourceTree = ""; }; - 494BD48A0C43EEC300DB0A3A /* AFSMenuExtra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFSMenuExtra.h; sourceTree = ""; }; - 494BD48B0C43EEC300DB0A3A /* AFSMenuExtra.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFSMenuExtra.m; sourceTree = ""; }; - 494C74DE0C46052800D3A2D2 /* AFSMenuExtra.menu */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AFSMenuExtra.menu; sourceTree = BUILT_PRODUCTS_DIR; }; - 49575BB30C53CBDB00B3BC32 /* hasToken.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = hasToken.png; sourceTree = ""; }; - 49575BB40C53CBDB00B3BC32 /* noToken.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = noToken.png; sourceTree = ""; }; 495B043E0D219A2900F1E328 /* ViewUtility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewUtility.h; sourceTree = ""; }; 495B043F0D219A2900F1E328 /* ViewUtility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewUtility.m; sourceTree = ""; }; 495C39460D81EA3C003426FC /* Kerberos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kerberos.framework; path = /System/Library/Frameworks/Kerberos.framework; sourceTree = ""; }; @@ -298,18 +252,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 494BD4670C43ED0C00DB0A3A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 494BD4880C43EEA400DB0A3A /* SystemUIPlugin.framework in Frameworks */, - 325313520C45153400FAF2F3 /* SecurityFoundation.framework in Frameworks */, - 325313550C45153500FAF2F3 /* Security.framework in Frameworks */, - 3253138D0C45157A00FAF2F3 /* Cocoa.framework in Frameworks */, - 495C39480D81EA3C003426FC /* Kerberos.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 49683EE20C3446380093C7C8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -357,7 +299,6 @@ children = ( 32CFFEF90C20314100A8DC58 /* Stand Alone Program */, 08FB77AFFE84173DC02AAC07 /* Classes */, - 494BD47A0C43EDD400DB0A3A /* AFSMenuExtra */, 3276591010204DB4004CA418 /* AFSBackgrounder */, 32DBCFA10370C40200C91783 /* Other Sources */, 089C167CFE841241C02AAC07 /* Resources */, @@ -424,7 +365,6 @@ 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = { isa = PBXGroup; children = ( - 494BD4870C43EEA400DB0A3A /* SystemUIPlugin.framework */, 327309620C2AB433008C322B /* Security.framework */, 327308D20C2AA364008C322B /* SecurityFoundation.framework */, 089C1672FE841209C02AAC07 /* Foundation.framework */, @@ -439,7 +379,6 @@ 8D202CF80486D31800D8A456 /* OpenAFS.prefPane */, 32CF01390C203C1800A8DC58 /* Test */, 49683EE40C3446380093C7C8 /* afshlp */, - 494C74DE0C46052800D3A2D2 /* AFSMenuExtra.menu */, 4998A6860DC33BEC00146652 /* LoginTimeDaemon */, 3276591B10204E08004CA418 /* AFSBackgrounder.app */, ); @@ -477,8 +416,9 @@ 3228B9B21020527000DF98DA /* resource */ = { isa = PBXGroup; children = ( - 3228BA1810207A4200DF98DA /* hasToken.png */, - 3228BA1A10207A5200DF98DA /* noToken.png */, + 3231522910243E2C005901AA /* hasToken.png */, + 3231522A10243E2C005901AA /* noToken.png */, + 3231522710243E21005901AA /* CredentialWindow.nib */, 3276591D10204E08004CA418 /* Info.plist */, 3228B9BD102052BE00DF98DA /* version.plist */, 3276592D10204F8D004CA418 /* AFSBackounderMainMenu.xib */, @@ -497,15 +437,14 @@ name = "Afs Element"; sourceTree = ""; }; - 325313A10C4515A700FAF2F3 /* Resource */ = { + 3231522310243E10005901AA /* CredentialWindow */ = { isa = PBXGroup; children = ( - 49575BB30C53CBDB00B3BC32 /* hasToken.png */, - 49575BB40C53CBDB00B3BC32 /* noToken.png */, - 325313B00C4516A900FAF2F3 /* Info.plist */, - 492AFB270C51483600AEDC93 /* CredentialWindow.nib */, + 3231522510243E10005901AA /* CredentialWindowController.m */, + 3231522410243E10005901AA /* CredentialWindowController.h */, ); - name = Resource; + name = CredentialWindow; + path = AFSBackgrounder/CredentialWindow; sourceTree = ""; }; 327308880C2A99A1008C322B /* Utility */ = { @@ -533,8 +472,15 @@ isa = PBXGroup; children = ( 3228B9AF1020526900DF98DA /* main.m */, - 3276592F10204F9E004CA418 /* AFSBackgrounderDelegate.h */, 3276593010204F9E004CA418 /* AFSBackgrounderDelegate.m */, + 3276592F10204F9E004CA418 /* AFSBackgrounderDelegate.h */, + 3231521C10243E09005901AA /* AFSMenuExtra.m */, + 3231521B10243E09005901AA /* AFSMenuExtra.h */, + 3231521E10243E09005901AA /* AFSMenuExtraView.m */, + 3231521D10243E09005901AA /* AFSMenuExtraView.h */, + 3231521A10243E09005901AA /* AFSMenuCredentialContoller.m */, + 3231521910243E09005901AA /* AFSMenuCredentialContoller.h */, + 3231522310243E10005901AA /* CredentialWindow */, 3228B9B21020527000DF98DA /* resource */, ); name = AFSBackgrounder; @@ -586,30 +532,6 @@ name = "Lynk Creation"; sourceTree = ""; }; - 4941F62F0C49377000B29A73 /* CredentialWindow */ = { - isa = PBXGroup; - children = ( - 4941F6300C49379000B29A73 /* CredentialWindowController.h */, - 4941F6310C49379000B29A73 /* CredentialWindowController.m */, - ); - name = CredentialWindow; - sourceTree = ""; - }; - 494BD47A0C43EDD400DB0A3A /* AFSMenuExtra */ = { - isa = PBXGroup; - children = ( - 494BD48A0C43EEC300DB0A3A /* AFSMenuExtra.h */, - 494BD48B0C43EEC300DB0A3A /* AFSMenuExtra.m */, - 325312170C44F7BD00FAF2F3 /* AFSMenuExtraView.h */, - 325312180C44F7BD00FAF2F3 /* AFSMenuExtraView.m */, - 4941F50E0C4929C000B29A73 /* AFSMenuCredentialContoller.h */, - 4941F50F0C4929C000B29A73 /* AFSMenuCredentialContoller.m */, - 4941F62F0C49377000B29A73 /* CredentialWindow */, - 325313A10C4515A700FAF2F3 /* Resource */, - ); - name = AFSMenuExtra; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -673,24 +595,6 @@ productReference = 32CF01390C203C1800A8DC58 /* Test */; productType = "com.apple.product-type.tool"; }; - 494BD4680C43ED0C00DB0A3A /* AFSMenuExtra */ = { - isa = PBXNativeTarget; - buildConfigurationList = 494BD46C0C43ED0D00DB0A3A /* Build configuration list for PBXNativeTarget "AFSMenuExtra" */; - buildPhases = ( - 494BD4650C43ED0C00DB0A3A /* Resources */, - 494BD4660C43ED0C00DB0A3A /* Sources */, - 494BD4670C43ED0C00DB0A3A /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 49575C280C53CD9A00B3BC32 /* PBXTargetDependency */, - ); - name = AFSMenuExtra; - productName = AFSMenuExtra; - productReference = 494C74DE0C46052800D3A2D2 /* AFSMenuExtra.menu */; - productType = "com.apple.product-type.bundle"; - }; 49683EE30C3446380093C7C8 /* afshlp */ = { isa = PBXNativeTarget; buildConfigurationList = 49683EE70C34465D0093C7C8 /* Build configuration list for PBXNativeTarget "afshlp" */; @@ -732,14 +636,12 @@ 8D202CF00486D31800D8A456 /* Sources */, 8D202CF20486D31800D8A456 /* Frameworks */, 8D202CF50486D31800D8A456 /* Rez */, - 494D72C90C350BC400B1FD21 /* CopyFiles */, - 3281A5B00CD7432A00907CF6 /* ShellScript */, ); buildRules = ( ); dependencies = ( - 3279B9810C451A63008FE3FA /* PBXTargetDependency */, - 494435690DC35D6F00C7A333 /* PBXTargetDependency */, + 32E29A9910249A1200D2C2E5 /* PBXTargetDependency */, + 32E29A9B10249A1600D2C2E5 /* PBXTargetDependency */, ); name = OpenAFS; productInstallPath = "$(HOME)/Library/PreferencePanes"; @@ -769,7 +671,6 @@ 8D202CE80486D31800D8A456 /* OpenAFS */, 32CF01380C203C1800A8DC58 /* Test */, 49683EE30C3446380093C7C8 /* afshlp */, - 494BD4680C43ED0C00DB0A3A /* AFSMenuExtra */, 4998A6850DC33BEC00146652 /* LoginTimeDaemon */, 3276591A10204E08004CA418 /* AFSBackgrounder */, ); @@ -784,23 +685,9 @@ 3276592E10204F8D004CA418 /* AFSBackounderMainMenu.xib in Resources */, 3228B9BE102052BE00DF98DA /* version.plist in Resources */, 3228B9D5102070A200DF98DA /* Info.plist in Resources */, - 3228BA1910207A4200DF98DA /* hasToken.png in Resources */, - 3228BA1B10207A5200DF98DA /* noToken.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 494BD4650C43ED0C00DB0A3A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 325313B10C4516A900FAF2F3 /* Info.plist in Resources */, - 49E43BA60C47D53F00084436 /* Localizable.strings in Resources */, - 49E43C730C47E0EA00084436 /* start_afs.sh in Resources */, - 49E43C740C47E0EC00084436 /* stop_afs.sh in Resources */, - 32D45E070C4B4D9C00A1012D /* afshlp in Resources */, - 492AFB280C51483600AEDC93 /* CredentialWindow.nib in Resources */, - 49575BB50C53CBDB00B3BC32 /* hasToken.png in Resources */, - 49575BB60C53CBDB00B3BC32 /* noToken.png in Resources */, + 3231522810243E21005901AA /* CredentialWindow.nib in Resources */, + 3231522B10243E2C005901AA /* hasToken.png in Resources */, + 3231522C10243E2C005901AA /* noToken.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -814,13 +701,12 @@ 322B90460C2F0A2D0068F99A /* stop_afs.sh in Resources */, 3223836C0C32A96F00380547 /* Localizable.strings in Resources */, 325311D00C44F4B100FAF2F3 /* licenza.rtf in Resources */, - 494C75110C4605C000D3A2D2 /* AFSMenuExtra.menu in Resources */, 49E43D2E0C480B8200084436 /* afshlp in Resources */, 324D67FD0DA13194007E1561 /* OpenAFSPreference.xib in Resources */, 324D683D0DA133A3007E1561 /* IpPanel.xib in Resources */, 324D684A0DA133CF007E1561 /* CredentialPanel.xib in Resources */, - 494435170DC35D4C00C7A333 /* LoginTimeDaemon in Resources */, 32DE81BD0DF57BDA0069A05C /* SymLinkEdit.xib in Resources */, + 32E299A3102491AA00D2C2E5 /* AFSBackgrounder.app in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -836,23 +722,6 @@ }; /* End PBXRezBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 3281A5B00CD7432A00907CF6 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - comments = "Copy the menucraker.menu into resources"; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\nif [ \"$ACTION\" = \"build\" ]\nthen\n\techo \"Start coping MenuCraker.menu\"\n\techo $SRCROOT/MenuCracker.menu\n\techo $TARGET_BUILD_DIR/$PRODUCT_NAME.prefPane/Resources/\t\n\tcp -R $SRCROOT/MenuCracker.menu $TARGET_BUILD_DIR/$PRODUCT_NAME.prefPane/Contents/Resources/MenuCracker.menu\nfi\n\n"; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 3276591810204E08004CA418 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -870,6 +739,9 @@ 3276592A10204EE5004CA418 /* DialogUtility.m in Sources */, 3276593110204F9E004CA418 /* AFSBackgrounderDelegate.m in Sources */, 3228B9B01020526900DF98DA /* main.m in Sources */, + 3231522010243E09005901AA /* AFSMenuCredentialContoller.m in Sources */, + 3231522210243E09005901AA /* AFSMenuExtraView.m in Sources */, + 3231522610243E10005901AA /* CredentialWindowController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -891,25 +763,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 494BD4660C43ED0C00DB0A3A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 494BD48C0C43EEC300DB0A3A /* AFSMenuExtra.m in Sources */, - 325311AB0C44F38200FAF2F3 /* AFSPropertyManager.m in Sources */, - 325311AF0C44F38D00FAF2F3 /* CellIp.m in Sources */, - 325311B00C44F38D00FAF2F3 /* DBCellElement.m in Sources */, - 325311B10C44F39200FAF2F3 /* TaskUtil.m in Sources */, - 325311B20C44F39300FAF2F3 /* AuthUtil.m in Sources */, - 325311B30C44F39400FAF2F3 /* FileUtil.m in Sources */, - 325312190C44F7BD00FAF2F3 /* AFSMenuExtraView.m in Sources */, - 4941F4C00C491D2D00B29A73 /* TokenCredentialController.m in Sources */, - 4941F5100C4929C000B29A73 /* AFSMenuCredentialContoller.m in Sources */, - 4941F6320C49379000B29A73 /* CredentialWindowController.m in Sources */, - 32B565760D8FAF62005255F2 /* NSString+search.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 49683EE10C3446380093C7C8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -968,20 +821,15 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 3279B9810C451A63008FE3FA /* PBXTargetDependency */ = { + 32E29A9910249A1200D2C2E5 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 494BD4680C43ED0C00DB0A3A /* AFSMenuExtra */; - targetProxy = 3279B9800C451A63008FE3FA /* PBXContainerItemProxy */; - }; - 494435690DC35D6F00C7A333 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 4998A6850DC33BEC00146652 /* LoginTimeDaemon */; - targetProxy = 494435680DC35D6F00C7A333 /* PBXContainerItemProxy */; + target = 49683EE30C3446380093C7C8 /* afshlp */; + targetProxy = 32E29A9810249A1200D2C2E5 /* PBXContainerItemProxy */; }; - 49575C280C53CD9A00B3BC32 /* PBXTargetDependency */ = { + 32E29A9B10249A1600D2C2E5 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 49683EE30C3446380093C7C8 /* afshlp */; - targetProxy = 49575C270C53CD9A00B3BC32 /* PBXContainerItemProxy */; + target = 3276591A10204E08004CA418 /* AFSBackgrounder */; + targetProxy = 32E29A9A10249A1600D2C2E5 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -1084,7 +932,9 @@ GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + INSTALL_PATH = /Library/PreferencePanes; PREBINDING = NO; + SKIP_INSTALL = NO; }; name = Debug; }; @@ -1197,66 +1047,6 @@ }; name = Release; }; - 494BD46D0C43ED0D00DB0A3A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", - ); - FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\""; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; - INFOPLIST_FILE = "AFSMenuExtra-Info.plist"; - INSTALL_PATH = "$(HOME)/Library/Bundles"; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; - PRODUCT_NAME = AFSMenuExtra; - WRAPPER_EXTENSION = menu; - ZERO_LINK = YES; - }; - name = Debug; - }; - 494BD46E0C43ED0D00DB0A3A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", - ); - FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\""; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; - INFOPLIST_FILE = "AFSMenuExtra-Info.plist"; - INSTALL_PATH = "$(HOME)/Library/Bundles"; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; - PRODUCT_NAME = AFSMenuExtra; - WRAPPER_EXTENSION = menu; - ZERO_LINK = NO; - }; - name = Release; - }; 49683EE80C34465D0093C7C8 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1393,15 +1183,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 494BD46C0C43ED0D00DB0A3A /* Build configuration list for PBXNativeTarget "AFSMenuExtra" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 494BD46D0C43ED0D00DB0A3A /* Debug */, - 494BD46E0C43ED0D00DB0A3A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 49683EE70C34465D0093C7C8 /* Build configuration list for PBXNativeTarget "afshlp" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/src/platform/DARWIN/AFSPreference/PListManager.h b/src/platform/DARWIN/AFSPreference/PListManager.h index dafc026f8..0acdfe485 100644 --- a/src/platform/DARWIN/AFSPreference/PListManager.h +++ b/src/platform/DARWIN/AFSPreference/PListManager.h @@ -17,14 +17,14 @@ #define AUTH_FILE_BK @"/etc/authorization_bk" #define TMP_FILE @"/tmp/authorization" -#define HOME_LAUNCHD_AGENT_FOLDER @"~/Library/LaunchAgents" -#define AKLOG_LAUNCHD_CONTROL_FILE @"~/Library/LaunchAgents/it.infn.lnf.afslogintimedaemon.plist" -#define AKLOG_LAUNCHD_TMP_CONTROL_FILE @"/tmp/it.infn.lnf.afslogintimedaemon.plist" -#define LOGIN_TIME_DAEMON_NAME @"LoginTimeDaemon" +#define HOME_LAUNCHD_AGENT_FOLDER @"~/Library/LaunchAgents" +#define BACKGROUNDER_LAUNCHD_CONTROL_FILE @"~/Library/LaunchAgents/it.infn.lnf.network.AFSBackgrounder.plist" +#define BACKGROUNDER_LAUNCHD_TMP_CONTROL_FILE @"/tmp/it.infn.lnf.network.AFSBackgrounder.plist" +#define BACKGROUNDER_AGENT_NAME @"AFSBackgrounder.app/Contents/MacOS/AFSBackgrounder" #define LAUNCHD_DAEMON_FOLDER @"/Library/LaunchDaemons" -#define AFS_STARTUP_TMP_CONTROL_FILE @"/tmp/it.infn.lnf.afsstartup.plist" -#define AFS_STARTUP_CONTROL_FILE @"/Library/LaunchDaemons/it.infn.lnf.afsstartup.plist" +#define AFS_STARTUP_TMP_CONTROL_FILE @"/tmp/it.infn.lnf.network.afsstartup.plist" +#define AFS_STARTUP_CONTROL_FILE @"/Library/LaunchDaemons/it.infn.lnf.network.afsstartup.plist" /*! @class PListManager @@ -54,13 +54,13 @@ @abstract Install the afs agent launchd config file @discussion <#(comprehensive description)#> */ -+(void) installLaunchdFile:(BOOL)install resourcePath:(NSString*) rsrcPath; ++(void) installBackgrounderLaunchdFile:(BOOL)install resourcePath:(NSString*) rsrcPath; /*! @method checkAklogAtLoginTimeLaunchdEnable @abstract check if the user has installed or enabled the afs agent @discussion <#(comprehensive description)#> */ -+(BOOL) checkAklogAtLoginTimeLaunchdEnable; ++(BOOL) checkLoginTimeLaunchdBackgrounder; /*! @method installAfsStartupLaunchdFile diff --git a/src/platform/DARWIN/AFSPreference/PListManager.m b/src/platform/DARWIN/AFSPreference/PListManager.m index 066ec1067..ef94a6411 100644 --- a/src/platform/DARWIN/AFSPreference/PListManager.m +++ b/src/platform/DARWIN/AFSPreference/PListManager.m @@ -129,30 +129,31 @@ // ------------------------------------------------------------------------------- // installLaunchdFile: // ------------------------------------------------------------------------------- -+(void) installLaunchdFile:(BOOL)install resourcePath:(NSString*) rsrcPath { ++(void) installBackgrounderLaunchdFile:(BOOL)install resourcePath:(NSString*) rsrcPath { NSData *plistData = nil; NSMutableDictionary *launchdDic = nil; NSString *error = nil; - NSString *daemonPath = [[rsrcPath stringByAppendingString:@"/"] stringByAppendingString:LOGIN_TIME_DAEMON_NAME]; + NSString *backgrounderPath = [[rsrcPath stringByAppendingString:@"/"] stringByAppendingString:BACKGROUNDER_AGENT_NAME]; if(![[NSFileManager defaultManager] fileExistsAtPath:[HOME_LAUNCHD_AGENT_FOLDER stringByExpandingTildeInPath]]) { @throw [NSException exceptionWithName:@"PListManager:installLaunchdFile" reason:@"The folder ~/Library/LaunchAgent doesn't exist!" - userInfo:[NSNumber numberWithInt:1]]; + userInfo:[NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] + forKey:@"agent_folder_error"]]; } if(install) { - if(![[NSFileManager defaultManager] fileExistsAtPath:[AKLOG_LAUNCHD_CONTROL_FILE stringByExpandingTildeInPath]]) { + if(![[NSFileManager defaultManager] fileExistsAtPath:[BACKGROUNDER_LAUNCHD_CONTROL_FILE stringByExpandingTildeInPath]]) { launchdDic = [[NSMutableDictionary alloc] init]; - [launchdDic setObject:@"it.infn.lnf.afslogintimedaemon" + [launchdDic setObject:@"it.infn.lnf.network.AFSBackgrounder" forKey:@"Label"]; [launchdDic setObject:@"Aqua" forKey:@"LimitLoadToSessionType"]; - [launchdDic setObject:[NSArray arrayWithObject:daemonPath] + [launchdDic setObject:[NSArray arrayWithObject:backgrounderPath] forKey:@"ProgramArguments"]; [launchdDic setObject:[NSNumber numberWithBool:YES] @@ -169,7 +170,7 @@ } - if(![plistData writeToFile:AKLOG_LAUNCHD_TMP_CONTROL_FILE atomically:NO]) { + if(![plistData writeToFile:BACKGROUNDER_LAUNCHD_TMP_CONTROL_FILE atomically:NO]) { @throw [NSException exceptionWithName:@"PListManager:installLaunchdFile" reason:@"Temp file write error" userInfo:nil]; @@ -177,11 +178,11 @@ } //now we can move the file - [TaskUtil executeTaskSearchingPath:@"mv" args:[NSArray arrayWithObjects:AKLOG_LAUNCHD_TMP_CONTROL_FILE, [HOME_LAUNCHD_AGENT_FOLDER stringByExpandingTildeInPath], nil]]; + [TaskUtil executeTaskSearchingPath:@"mv" args:[NSArray arrayWithObjects:BACKGROUNDER_LAUNCHD_TMP_CONTROL_FILE, [BACKGROUNDER_LAUNCHD_CONTROL_FILE stringByExpandingTildeInPath], nil]]; } } else { // delete launchd configuration file - [TaskUtil executeTaskSearchingPath:@"rm" args:[NSArray arrayWithObjects:[AKLOG_LAUNCHD_CONTROL_FILE stringByExpandingTildeInPath], nil]]; + [TaskUtil executeTaskSearchingPath:@"rm" args:[NSArray arrayWithObjects:[BACKGROUNDER_LAUNCHD_CONTROL_FILE stringByExpandingTildeInPath], nil]]; } } @@ -189,8 +190,8 @@ // ------------------------------------------------------------------------------- // checkAklogAtLoginTimeLaunchdEnable: // ------------------------------------------------------------------------------- -+(BOOL) checkAklogAtLoginTimeLaunchdEnable { - BOOL result = [[NSFileManager defaultManager] fileExistsAtPath:[AKLOG_LAUNCHD_CONTROL_FILE stringByExpandingTildeInPath]]; ++(BOOL) checkLoginTimeLaunchdBackgrounder { + BOOL result = [[NSFileManager defaultManager] fileExistsAtPath:[BACKGROUNDER_LAUNCHD_CONTROL_FILE stringByExpandingTildeInPath]]; return result; } @@ -203,7 +204,6 @@ afsdPath:(NSString*)afsdPath { NSData *plistData = nil; NSMutableDictionary *launchdDic = nil; - NSMutableArray *argDic = nil; NSString *error = nil; OSErr status = noErr; diff --git a/src/platform/DARWIN/AFSPreference/afsltd.m b/src/platform/DARWIN/AFSPreference/afsltd.m index 207dc11f6..c2485e925 100644 --- a/src/platform/DARWIN/AFSPreference/afsltd.m +++ b/src/platform/DARWIN/AFSPreference/afsltd.m @@ -49,11 +49,11 @@ int main(int argc, char *argv[]) void readPreferenceFile() { // read the preference for afs path - afsSysPath = (NSString*)CFPreferencesCopyAppValue((CFStringRef)PREFERENCE_AFS_SYS_PAT, (CFStringRef)afsCommanderID); + afsSysPath = (NSString*)CFPreferencesCopyAppValue((CFStringRef)PREFERENCE_AFS_SYS_PAT, (CFStringRef)kAfsCommanderID); // read the preference for aklog use - NSNumber *useAklogPrefValue = (NSNumber*)CFPreferencesCopyAppValue((CFStringRef)PREFERENCE_USE_AKLOG, (CFStringRef)afsCommanderID); + NSNumber *useAklogPrefValue = (NSNumber*)CFPreferencesCopyAppValue((CFStringRef)PREFERENCE_USE_AKLOG, (CFStringRef)kAfsCommanderID); useAklog = [useAklogPrefValue boolValue]; } diff --git a/src/platform/DARWIN/AFSPreference/global.h b/src/platform/DARWIN/AFSPreference/global.h index 803a5d898..3a8d9bdb2 100644 --- a/src/platform/DARWIN/AFSPreference/global.h +++ b/src/platform/DARWIN/AFSPreference/global.h @@ -30,20 +30,25 @@ // PREFERENCE KEY -#define PREFERENCE_AFS_SYS_PAT @"PREFERENCE_AFS_SYS_PAT" -#define PREFERENCE_AFS_SYS_PAT_STATIC @"/var/db/openafs" -#define PREFERENCE_USE_AKLOG @"PREFERENCE_USE_AKLOG" -#define PREFERENCE_START_AFS_AT_STARTUP @"PREFERENCE_START_AFS_AT_STARTUP" +#define PREFERENCE_AFS_SYS_PAT @"PREFERENCE_AFS_SYS_PAT" +#define PREFERENCE_AFS_SYS_PAT_STATIC @"/var/db/openafs" +#define PREFERENCE_USE_AKLOG @"PREFERENCE_USE_AKLOG" +#define PREFERENCE_START_AFS_AT_STARTUP @"PREFERENCE_START_AFS_AT_STARTUP" +#define PREFERENCE_SHOW_STATUS_MENU @"PREFERENCE_SHOW_STATUS_MENU" +#define PREFERENCE_AKLOG_TOKEN_AT_LOGIN @"PREFERENCE_AKLOG_TOKEN_AT_LOGIN" // AFSMENUEXTRA INFO -#define kAFSMenuExtra [NSURL fileURLWithPath:[[self bundle] pathForResource:@"AFSMenuExtra" ofType:@"menu" inDirectory:@""]] +#define kAFSMenuExtra [NSURL fileURLWithPath:[[self bundle] pathForResource:@"AFSBackgrounder" ofType:@"app" inDirectory:@""]] #define kMenuCrakerMenuExtra [NSURL fileURLWithPath:[[self bundle] pathForResource:@"MenuCracker" ofType:@"menu" inDirectory:@""]] -#define kAFSMenuExtraID @"it.infn.lnf.network.AFSMenuExtra" + +//notification id + #define kMenuCrakerMenuExtraID @"net.sourceforge.menucracker2" //Application id -#define afsCommanderID @"it.infn.lnf.network.openafs" +#define kAFSMenuExtraID @"it.infn.lnf.network.AFSBackgrounder" +#define kAfsCommanderID @"it.infn.lnf.network.openafs" // Changed preference notification key #define kPrefChangeNotification @"preference_changed" //KLog menuextra window close @@ -54,4 +59,5 @@ #define kMExtraClosedNotification @"preference_changed" // Update MenuExtra AfsState notification key #define kMExtraAFSStateChange @"menu_extra_afs_state_change" - +// Update MenuExtra for show menu notification key +#define kMExtraAFSMenuChangeState @"kMExtraAFSMenuChangeState" -- 2.39.5