1/*
2 * Copyright (c) 2010 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Portions Copyright (c) 2010 Apple Inc. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright
13 *    notice, this list of conditions and the following disclaimer.
14 *
15 * 2. Redistributions in binary form must reproduce the above copyright
16 *    notice, this list of conditions and the following disclaimer in the
17 *    documentation and/or other materials provided with the distribution.
18 *
19 * 3. Neither the name of the Institute nor the names of its contributors
20 *    may be used to endorse or promote products derived from this software
21 *    without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 */
35
36command = {
37	name = "principal-create"
38	argument = "record [principal]"
39	min_args = "1"
40	max_args = "2"
41	help = "Create principal."
42}
43command = {
44	name = "principal-delete"
45	argument = "record [principal]"
46	min_args = "1"
47	max_args = "2"
48	help = "Delete principal."
49}
50command = {
51	name = "principal-clearflags"
52	argument = "record flags..."
53	min_args = "2"
54	help = "Clear flags."
55}
56command = {
57	name = "principal-setflags"
58	argument = "record flags..."
59	min_args = "2"
60	help = "Set flags"
61}
62command = {
63	name = "principal-getflags"
64	argument = "record"
65	min_args = "1"
66	help = "Get flags"
67}
68command = {
69	name = "principal-get-keyinfo"
70	argument = "record"
71	min_args = "1"
72	help = "Get key info"
73}
74command = {
75	name = "principal-setacl"
76	argument = "record ace..."
77	min_args = "2"
78	help = "Set ACL"
79}
80command = {
81	name = "principal-getacl"
82	argument = "record"
83	min_args = "1"
84	help = "Get ACL"
85}
86command = {
87	name = "principal-clearacl"
88	argument = "record"
89	min_args = "1"
90	help = "Clear ACL"
91}
92command = {
93	option = {
94		long = "use-default-sharing-identity"
95		type = "flag"
96		help = "use default sharing identity"
97	}
98	name = "principal-add-cert"
99	argument = "record"
100	min_args = "1"
101	help = "add cert to principals ACL"
102}
103command = {
104	name = "alias-add"
105	argument = "record alias..."
106	min_args = "2"
107	help = "Add aliases."
108}
109command = {
110	name = "alias-remove"
111	argument = "record aliases..."
112	min_args = "2"
113	help = "Remove aliases"
114}
115command = {
116	name = "appleid-alias-add"
117	argument = "record ds-id"
118	min_args = "2"
119	help = "Add AppleID aliases."
120}
121command = {
122	name = "appleid-alias-remove"
123	argument = "record ds-id"
124	min_args = "2"
125	help = "Remove AppleID aliases"
126}
127command = {
128	name = "appleid-cert-add"
129	argument = "record cert-subject-name"
130	min_args = "2"
131	help = "Add AppleID cert name"
132}
133command = {
134	name = "appleid-cert-remove"
135	argument = "record cert-subject-name"
136	min_args = "2"
137	help = "Remove AppleID cert name"
138}
139command = {
140	option = {
141		long = "encryption-types"
142		type = "strings"
143		argument = "enctype"
144		help = "encryption types to use"
145	}
146	option = {
147		long = "append"
148		type = "flag"
149		help = "append password (instead of overwrite) entry"
150	}
151	function = "password_command"
152	name = "password"
153	argument = "record password [principal]"
154	min_args = "2"
155	max_args = "3"
156	help = "Change password for node (and if specified, specific principal)."
157}
158command = {
159	name = "dump"
160	argument = "record [principal]"
161	min_args = "1"
162	max_args = "2"
163	help = "Dump entry from database"
164}
165command = {
166	name = "load"
167    option = {
168	long = "append"
169	type = "flag"
170	help = "merge entry, only used for Mac OS X server for Snow Leopard compat"
171    }
172	argument = "record [dump.plist]"
173	min_args = "1"
174	max_args = "2"
175	help = "Load a plist dump info an entry in the database"
176}
177command = {
178	name = "default-enctypes"
179	help = "lists default enctypes"
180}
181command = {
182    name = "keyset"
183    help = "manipulate keysets"
184    option = {
185	long = "append"
186	type = "flag"
187	help = "append password (instead of replace) entry"
188    }
189    option = {
190	long = "old-keyset"
191	type = "strings"
192	help = "old keyset"
193    }
194    option = {
195	long = "enctype"
196	type = "strings"
197	help = "use specified enctype"
198    }
199    option = {
200	long = "delete"
201	type = "flag"
202	help = "delete specififed enctypes (or all enctypes)"
203    }
204    argument = "principal password"
205    min_args = "0"
206    max_args = "2"
207}
208command = {
209    option = {
210	long = "kdc-certificate"
211	type = "flag"
212	help = "force new kdc certificate"
213    }
214    option = {
215	long = "keytab"
216	type = "-flag"
217	help = "dont remove LKDC keytab entries"
218    }
219    option = {
220	long = "verbose"
221	short = "v"
222	type = "flag"
223	help = "verbose logging"
224    }
225    name = "setup-lkdc"
226    help = "setup LKDC on this machine"
227}
228command = {
229	name = "help"
230	name = "?"
231	argument = "[command]"
232	min_args = "0"
233	max_args = "1"
234	help = "Help! I need somebody."
235}
236