5 // Created by Claudio Bisegni LNF - INFN on 25/04/08.
6 // Copyright 2008 Infn. All rights reserved.
9 #import <Cocoa/Cocoa.h>
11 #define DELETE_IN_10_4 @"authinternal"
12 #define DELETE_IN_10_5 @"builtin:authenticate,privileged"
13 #define ADD_IN_PLIST @"builtin:krb5authnoverify,privileged"
15 #define AUTH_FILE_DIR @"/etc"
16 #define AUTH_FILE @"/etc/authorization"
17 #define AUTH_FILE_BK @"/etc/authorization_bk"
18 #define TMP_FILE @"/tmp/authorization"
20 #define BACKGROUNDER_P_FILE @"it.infn.lnf.network.AFSBackgrounder"
21 #define HOME_LAUNCHD_AGENT_FOLDER @"~/Library/LaunchAgents"
22 #define BACKGROUNDER_LAUNCHD_CONTROL_FILE @"~/Library/LaunchAgents/it.infn.lnf.network.AFSBackgrounder.plist"
23 #define BACKGROUNDER_LAUNCHD_TMP_CONTROL_FILE @"/tmp/it.infn.lnf.network.AFSBackgrounder.plist"
25 #define LAUNCHD_DAEMON_FOLDER @"/Library/LaunchDaemons"
26 #define AFS_STARTUP_TMP_CONTROL_FILE @"/tmp/it.infn.lnf.network.afsstartup.plist"
27 #define AFS_STARTUP_CONTROL_FILE @"/Library/LaunchDaemons/it.infn.lnf.network.afsstartup.plist"
31 @abstract Utility class for modify the plist used by sistem for make login
32 @discussion <#(comprehensive description)#>
35 @interface PListManager : NSObject {
39 @method krb5TiketAtLoginTime
40 @abstract Enable or disable the system to get kerberos ticket at login time
41 @discussion <#(comprehensive description)#>
43 +(void) krb5TiketAtLoginTime:(BOOL)enable;
46 @method checkKrb5AtLoginTimeLaunchdEnable
47 @abstract check if the system is configured to ket krb5 ticket at login
48 @discussion <#(comprehensive description)#>
50 +(BOOL) checkKrb5AtLoginTimeLaunchdEnable;
53 @method installLaunchdFile
54 @abstract Install the afs agent launchd config file
55 @discussion <#(comprehensive description)#>
57 +(void) installBackgrounderLaunchdFile:(BOOL)install resourcePath:(NSString*) rsrcPath;
59 @method checkAklogAtLoginTimeLaunchdEnable
60 @abstract check if the user has installed or enabled the afs agent
61 @discussion <#(comprehensive description)#>
63 +(BOOL) checkLoginTimeLaunchdBackgrounder;
66 @method installAfsStartupLaunchdFile
67 @abstract Install the afs daemon launchd config file for startup afs at boot
68 @discussion <#(comprehensive description)#>
70 +(void) manageAfsStartupLaunchdFile:(BOOL)enable afsStartupScript:(NSString*)afsStartupScript afsBasePath:(NSString*)afsBasePath afsdPath:(NSString*)afsdPath;
73 @method launchctlCommand
74 @abstract exec the launchctl command on a particular plist job
75 @discussion <#(comprehensive description)#>
77 +(void) launchctlCommand:(BOOL)enable userDomain:(BOOL)userDomain option:(NSArray*)option plistName:(NSString*)plistName;
79 @method launchctlCommand
80 @abstract exec the launchctl command on a particular plist job
81 @discussion <#(comprehensive description)#>
83 +(void) launchctlStringCommand:(NSString*)operation
84 option:(NSArray*)option
85 plistName:(NSString*)plistName;
87 @method launchdJobState
88 @abstract check is a job has been submitted to launchd
89 @discussion <#(comprehensive description)#>
91 +(BOOL) launchdJobState:(NSString*)jobName;