-
Notifications
You must be signed in to change notification settings - Fork 3
/
Common.h
72 lines (60 loc) · 2 KB
/
Common.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* Common.h
* yarg
*
* Created by Alex Pretzlav on 4/28/08.
* Copyright 2008 Alex Pretzlav. All rights reserved.
*
*/
#ifndef _YARGCOMMON_H
#define _YARGCOMMON_H
#include "BetterAuthorizationSampleLib.h"
/*
Commands passed between Yargcontroller and HelperTool
to host priveledged rsync parties and write launchd
tasks to root's LaunchAgents.
*/
#define kRunRsyncCommand "RunRsync"
// inputs:
// kBASCommandKey (CFString)
// (CFString) -- arguments to pass to rsync binary
#define kRsyncArgs "RsyncArgs"
// outputs:
// kBASErrorKey (CFNumber)
// kBASDescriptorArrayKey (CFArray of CFNumber) -- one entry, rsync's in/out pipe
// (CFNumber) PID of the rsync task launched
#define kRsyncPID "RsyncPID"
// authorization right
#define kRunRsyncCommandRightName "com.pretz.yarg.RunRsync"
#define kStopRsyncCommand "StopRsync"
// inputs:
// kBASCommandKey (CFString)
// kRsyncPID (CFNumber) PID of rsync to SIGTERM
// outputs:
// kBASErrorKey (CFNumber)
// kBASDescriptorArrayKey (CFArray of CFNumber) -- one entry, rsync's in/out pipe
// authorization right
#define kStopRsyncCommandRightName "com.pretz.yarg.StopRsync"
#define kWriteLaunchdJobCommand "WriteLaunchdJob"
// inputs:
// kBASCommandKey (CFString)
// (CFDictionary) -- Dictionary to write to file
#define kLaunchdDictionary "LaunchdDictionary"
// (CFString) -- name to give to dictionary file
#define kNameOfDictionary "NameOfDict"
// outputs:
// kBASErrorKey (CFNumber)
// authorization right
#define kWriteLaunchdJobCommandRightName "com.pretz.yarg.WriteLaunchdJob"
#define kDeleteLaunchdJobCommand "DeleteLaunchdJob"
// inputs:
// kBASCommandKey (CFString)
// (CFDictionary) -- Dictionary to write to file
// (CFString) -- name to give to dictionary file
// #define kNameOfDictionary "NameOfDict"
// outputs:
// kBASErrorKey (CFNumber)
// authorization right
#define kDeleteLaunchdJobCommandRightName "com.pretz.yarg.DeleteLaunchdJob"
extern const BASCommandSpec kYargCommandSet[];
#endif