-
Notifications
You must be signed in to change notification settings - Fork 0
/
authtool.h
executable file
·52 lines (38 loc) · 924 Bytes
/
authtool.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* authtool.h
* SleepLess
*
* Created by Alexey Mananikov on 28.12.04.
* Copyright 2004 __MyCompanyName__. All rights reserved.
*
*/
#include <Carbon/Carbon.h>
#include <Security/Authorization.h>
#include <sys/param.h>
// Command Ids
enum
{
kMyAuthorizedLoad = 1,
kMyAuthorizedUnload = 2,
kMyAuthorizedHibernateInstant = 3,
kMyAuthorizedHibernateNormal = 4,
kMyAuthorizedHibernateDisable = 5,
kMyAuthorizedHibernateInstall = 6
};
// Command structure
typedef struct MyAuthorizedCommand
{
int authorizedCommandId;
char file[1024];
} MyAuthorizedCommand;
// Exit codes (positive values) and return codes from exec function
enum
{
kMyAuthorizedCommandInternalError = -1,
kMyAuthorizedCommandSuccess = 0,
kMyAuthorizedCommandExecFailed,
kMyAuthorizedCommandChildError,
kMyAuthorizedCommandAuthFailed,
kMyAuthorizedCommandOperationFailed
};
int myDebug=1;