xref: /illumos-gate/usr/src/lib/libbrand/dtd/brand.dtd.1 (revision b0fe7b8fa79924061f3bdf7f240ea116c2c0b704)
1<?xml version='1.0' encoding='UTF-8' ?>
2
3<!--
4 CDDL HEADER START
5
6 The contents of this file are subject to the terms of the
7 Common Development and Distribution License (the "License").
8 You may not use this file except in compliance with the License.
9
10 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 or http://www.opensolaris.org/os/licensing.
12 See the License for the specific language governing permissions
13 and limitations under the License.
14
15 When distributing Covered Code, include this CDDL HEADER in each
16 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 If applicable, add the following below this CDDL HEADER, with the
18 fields enclosed by brackets "[]" replaced with your own identifying
19 information: Portions Copyright [yyyy] [name of copyright owner]
20
21 CDDL HEADER END
22
23 Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24 Use is subject to license terms.
25
26 ident	"%Z%%M%	%I%	%E% SMI"
27
28 DO NOT EDIT THIS FILE.
29-->
30
31<!--
32  verify_cfg
33
34    Identifies the program to be invoked by zonecfg to verify that the
35    zone's configuration is legal, and that all the configured devices,
36    attributes, etc. are legal for this brand.
37
38    The program is called with a single argument: the path to a file
39    containing a temporary config.xml file the zone.  It should return 0
40    on success and non-0 on failure.  Any detailed error messages should be
41    displayed to stderr.
42
43    It has no attributes.
44
45-->
46<!ELEMENT verify_cfg	(#PCDATA) >
47<!ATTLIST verify_cfg>
48<!--
49  verify_adm
50
51    Identifies the program invoked by zoneadm to perform brand-specific
52    checks as to the viability of a zone on this specific machine.
53
54    The following replacements are performed:
55
56      %z	Name of zone
57      %R	Root of zone
58      %*	Additional arguments, if any
59
60    The program should return 0 on success and non-0 on failure.  Any
61    detailed error messages should be displayed to stderr.
62
63    It has no attributes.
64
65-->
66<!ELEMENT verify_adm	(#PCDATA) >
67<!ATTLIST verify_adm>
68
69<!--
70  install
71
72    Identifies the program to invoke when installing a zone.  The following
73    replacements are performed:
74
75      %z	Name of zone
76      %R	Root of zone
77      %*	Additional arguments, if any
78
79    It has no attributes.
80-->
81<!ELEMENT install	(#PCDATA) >
82<!ATTLIST install>
83
84<!--
85  installopts
86
87    Identifies the command-line options supported by the brand's
88    installation program, allowing zoneadm to parse the install line
89    properly.
90
91    It has no attributes.
92-->
93<!ELEMENT installopts	(#PCDATA) >
94<!ATTLIST installopts>
95
96<!--
97  boot
98
99    This is a program which gets run by zoneadmd when a zone is booted.
100    The program will be invoked as the last step in the zone booting
101    process before the the first process is spawned inside the zone.
102
103    If this programs succeeds it should not generate any output.
104    If this program returns an error, any output generated by the
105    program will be sent to the zoneadmd message log.
106
107    The following replacements are performed:
108
109      %z	Name of zone
110      %R	Root of zone
111      %*	Additional arguments, if any
112
113    It has no attributes.
114-->
115<!ELEMENT boot	(#PCDATA) >
116<!ATTLIST boot>
117
118<!--
119  halt
120
121    This is a program which gets run by zoneadmd when a zone is being
122    halted.  This callback is provided to allow a brand to cleanup any
123    special configuration that was setup during boot.
124
125    This program will also be invoked by zoneadmd if any part of the zone
126    booting process fail, even if the booting process failed before the
127    brand boot program was invoked.  It is also possible that if the zone
128    fails to halt after invoking this program, future attempts to halt the
129    zone will invoke this program again.  So this program should be
130    designed to clean up any resources allocated to a zone but it should
131    also be able to gracefully handle the case where resources that it
132    expects to release are not actually allocated (or have been already
133    released.)
134
135    If this programs succeeds it should not generate any output.  If this
136    program returns an error, any output generated by the program will be
137    sent to the zoneadmd message log.
138
139    The following replacements are performed:
140
141      %z	Name of zone
142      %R	Root of zone
143      %*	Additional arguments, if any
144
145    It has no attributes.
146-->
147<!ELEMENT halt	(#PCDATA) >
148<!ATTLIST halt>
149
150<!--
151  modname
152
153    Path to the kernel module that implements the kernel-level
154    functionality of the brand.
155
156    It has no attributes.
157-->
158<!ELEMENT modname	(#PCDATA) >
159<!ATTLIST modname>
160
161<!--
162  initname
163
164    Path to the initial executable that should be launched when booting a
165    branded zone.
166
167    It has no attributes.
168-->
169<!ELEMENT initname	(#PCDATA) >
170<!ATTLIST initname>
171
172<!--
173  login_cmd
174
175    Path to the initial login binary that should be executed when
176    attempting to zlogin into a branded zone.
177
178    The following replacements are performed:
179
180      %Z	Name of the current zone
181      %u	User login name
182
183    It has no attributes.
184-->
185<!ELEMENT login_cmd	(#PCDATA) >
186<!ATTLIST login_cmd>
187
188<!--
189  postclone
190
191    Path to a script that will perform any necessary post-processing on
192    a zone after it has been freshly copied.
193
194    The following replacements are performed:
195
196      %z	Name of zone
197      %R	Root of zone
198      %*	Additional arguments, if any
199
200    It has no attributes.
201-->
202<!ELEMENT postclone	(#PCDATA) >
203<!ATTLIST postclone>
204
205<!--
206  privilege
207
208    Add a privilege to the default, prohibited, or required set for all
209    zones of this brand with ip-type matched.  If a privilege is added
210    to the default set all zones of this brand with ip-type matched on
211    the system will inherit this privilege unless the privilege is
212    removed via limitpriv in zonecfg(1m).  If a privilege is added to
213    the prohibited set it can not be added to any zones with ip-type
214    matched via limitpriv in zonecfg(1m).  If a privilege is added to
215    the required set then all zones of this brand with ip-type matched
216    on the system will inherit this privilege and it can't be removed via
217    limitpriv in zonecfg(1m).
218
219    Its attributes are
220      set	The name of the set the privilege should go into.
221      name	The name of the privilege.
222      ip-type	Optional, indicates that adding of the privilege to the
223		set only applies to certain IP types. Can be "shared" or
224		"exclusive". If it is not specified, the default value
225		"all" will be used, which means it is applicable regardless
226		the IP type.
227
228-->
229<!ELEMENT privilege	(#PCDATA) >
230<!ATTLIST privilege	set	( default | prohibited | required ) #REQUIRED
231			name	CDATA #REQUIRED
232			ip-type ( shared | exclusive ) "all" >
233
234<!--
235  brand
236
237    The toplevel container for a brand configuration.
238
239    Its attributes are
240
241      name	The name of the brand.  This must match the name of the
242		directory in which the configuration file is stored.
243-->
244
245<!ELEMENT brand		(modname, initname, login_cmd, install, installopts,
246			boot, halt, verify_cfg, verify_adm, postclone,
247			privilege+)>
248
249<!ATTLIST brand		name		CDATA #REQUIRED>
250