Current File : //usr/share/lib/xml/dtd/brand.dtd.1
<?xml version='1.0' encoding='UTF-8' ?>

<!--

 Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.

 DO NOT EDIT THIS FILE.
-->

<!--
  verify_cfg

    Identifies the program to be invoked by zonecfg to verify that the
    zone's configuration is legal, and that all the configured devices,
    attributes, etc. are legal for this brand.

    The program is called with a single argument: the path to a file
    containing a temporary config.xml file the zone.  It should return 0
    on success and non-0 on failure.  Any detailed error messages should be
    displayed to stderr.

    It has no attributes.

-->
<!ELEMENT verify_cfg	(#PCDATA) >
<!ATTLIST verify_cfg>
<!--
  verify_adm

    Identifies the program invoked by zoneadm to perform brand-specific
    checks as to the viability of a zone on this specific machine.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    The program should return 0 on success and non-0 on failure.  Any
    detailed error messages should be displayed to stderr.

    It has no attributes.

-->
<!ELEMENT verify_adm	(#PCDATA) >
<!ATTLIST verify_adm>

<!--
  install

    Identifies the program to invoke when installing a zone.  The following
    replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    It has no attributes.
-->
<!ELEMENT install	(#PCDATA) >
<!ATTLIST install>

<!--
  installopts

    Identifies the command-line options supported by the brand's
    installation program, allowing zoneadm to parse the install line
    properly.

    It has no attributes.
-->
<!ELEMENT installopts	(#PCDATA) >
<!ATTLIST installopts>

<!--
  boot

    This is a program which gets run by zoneadmd when a zone is booted.
    The program will be invoked as the last step in the zone booting
    process before the the first process is spawned inside the zone.

    If this programs succeeds it should not generate any output.
    If this program returns an error, any output generated by the
    program will be sent to the zoneadmd message log.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    It has no attributes.
-->
<!ELEMENT boot	(#PCDATA) >
<!ATTLIST boot>

<!--
  sysboot

    This is a program that will be run by zoneadm during system boot for an
    installed zone that won't automatically boot.

    If the program succeeds, then it should not generate output.
    If the program returns an error, then the output it generates will be
    sent to the zones SMF service's message log.

    The following replacements are performed:

      %z	Name of the target zone
      %R	Zonepath of the target zone
      Additional arguments, if any, are appended.

    This element has no attributes.
-->
<!ELEMENT sysboot	(#PCDATA) >
<!ATTLIST sysboot>

<!--
  halt

    This is a program which gets run by zoneadmd when a zone is being
    halted.  This callback is provided to allow a brand to cleanup any
    special configuration that was setup during boot.

    This program will also be invoked by zoneadmd if any part of the zone
    booting process fail, even if the booting process failed before the
    brand boot program was invoked.  It is also possible that if the zone
    fails to halt after invoking this program, future attempts to halt the
    zone will invoke this program again.  So this program should be
    designed to clean up any resources allocated to a zone but it should
    also be able to gracefully handle the case where resources that it
    expects to release are not actually allocated (or have been already
    released.)

    If this programs succeeds it should not generate any output.  If this
    program returns an error, any output generated by the program will be
    sent to the zoneadmd message log.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    It has no attributes.
-->
<!ELEMENT halt	(#PCDATA) >
<!ATTLIST halt>

<!--
  modname

    Path to the kernel module that implements the kernel-level
    functionality of the brand.

    It has no attributes.
-->
<!ELEMENT modname	(#PCDATA) >
<!ATTLIST modname>

<!--
    config 

    Describes a brand specific resource, property or property value configuration.
    Resources, properties and values can be disabled. Property values can be set
    to fixed values.

    If "state" indicates the configuration is disabled and only the resource is
    specified the entire resource is disabled. Similarly entire properties can
    be disabled if both its resource and the property is specified. Specific
    property values can also be selectively disabled by specifying the entire
    resource, property, value tuple.

    If the "state" indicates the configuration is fixed then resource,
    property and value must all be specified.

    The "scope" attribute defines a scope to which the resource, property or
    property value configuration applies. The scope can be "all" for all
    configuration types or "live" for the live configuration only. If not
    specified the scope applies to "all".

    If resource is not specified the global resource is implied.

    Its attributes are

	resource	The resource being modified, or "global" for global
			scope.

	property	The property being modified.

	value		The value of the property being modified.

	state		The state of the property, resource or value.

	scope		The scope of the resource, property and the property
			value configuration.

-->
<!ELEMENT config	EMPTY >
<!ATTLIST config	resource        CDATA #IMPLIED
                        property        CDATA #IMPLIED
                        value           CDATA #IMPLIED
			state		(disabled | fixed) #REQUIRED
			scope		(all | live) "all" >
<!--
  initname

    Path to the initial executable that should be launched when booting a
    branded zone.

    Its attributes are
	recover		Describes what action to take to recover from an init
			failure. It is optional with a default value of
			"restart_init".
-->
<!ELEMENT initname	(#PCDATA) >
<!ATTLIST initname	recover (restart_init | reboot_zone | halt_zone) "restart_init" >

<!--
  login_cmd

    Path to the initial login binary that should be executed when
    attempting to zlogin into a branded zone.

    The following replacements are performed:

      %Z	Name of the current zone
      %u	User login name

    It has no attributes.
-->
<!ELEMENT login_cmd	(#PCDATA) >
<!ATTLIST login_cmd>

<!--
  forcedlogin_cmd

    Path to the initial login binary that should be executed when
    attempting to zlogin into a branded zone without authentication.

    The following replacements are performed:

      %Z	Name of the current zone
      %u	User login name

    It has no attributes.
-->
<!ELEMENT forcedlogin_cmd	(#PCDATA) >
<!ATTLIST forcedlogin_cmd>

<!--
  failsafe_cmd

    Path to the failsafe binary that should be executed when
    attempting to zlogin into a branded zone in failsafe mode.

    The following replacements are performed:

      %Z	Name of the current zone

    It has no attributes.
-->
<!ELEMENT failsafe_cmd	(#PCDATA) >
<!ATTLIST failsafe_cmd>

<!--
  user_cmd

    Path to the binary that will translate a user name to a passwd(4) entry.

    The following replacements are performed:

      %u        User login name

    It has no attributes.  The passwd(4) entry is used to determine $LOGNAME,
    $HOME, and $SHELL for non-interactive "zlogin -l <user> <cmd>".
-->
<!ELEMENT user_cmd   (#PCDATA) >
<!ATTLIST user_cmd>

<!--
  attach

    Path to a hook that will perform any necessary processing on
    a zone to allow it to be attached.  The zone will be in the "configured"
    state when this hook is run.  This hook is never called when the zone
    is "force attached" (-F).

    If this hook exits with a non-zero exit status, the attach operation
    will fail.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    If no hook is provided, the internal zoneadm attach code will be used.

    It has no attributes.
-->
<!ELEMENT attach	(#PCDATA) >
<!ATTLIST attach>

<!--
  postattach

    Path to a hook that will perform any necessary post-processing on
    a zone after it has been attached.  The zone will be in the "installed"
    state when this hook is run.  This hook is never called when the zone
    is "force attached" (-F).

    If this hook exits with a non-zero exit status, the attach operation
    will fail and the zone state will be reset to "configured".

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    It has no attributes.
-->
<!ELEMENT postattach	(#PCDATA) >
<!ATTLIST postattach>

<!--
  postclone

    Path to a hook that will perform any necessary post-processing on
    a zone after it has been cloned.  The zone will be in the "incomplete"
    state when this hook is run.

    If this hook exits with a non-zero exit status, the clone operation
    will fail and the zone will be left in the "incomplete" state,
    otherwise the state will be changed to the "installed" state.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    It has no attributes.
-->
<!ELEMENT postclone	(#PCDATA) >
<!ATTLIST postclone>

<!--
  postinstall

    Path to a script that will perform any necessary post-processing on
    a zone after it has been freshly installed.  This hook will run after the
    install hook completes and the zone is in the installed state.  The
    additional arguments are the same as what is passed to the install hook.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    It has no attributes.
-->
<!ELEMENT postinstall	(#PCDATA) >
<!ATTLIST postinstall>

<!--
  postmove

    Path to a script that will perform any necessary post-processing on
    a zone after it has been moved.  This hook will run after the zone path
    has been moved and the dataset previously mounted on the old zone root is
    remounted on the new zone root.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    It has no attributes.
-->
<!ELEMENT postmove	(#PCDATA) >
<!ATTLIST postmove>

<!--
  postrename

    Path to a script that will perform any necessary post-processing on
    a zone after it has been renamed.  This hook will run if the zone path
    has been moved and the dataset previously mounted on the old zone root is
    remounted on the new zone root or if the datasets are moved across zpools.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    It has no attributes.
-->
<!ELEMENT postrename	(#PCDATA) >
<!ATTLIST postrename>

<!--
  predetach

    Path to a hook that will perform any necessary pre-processing on
    a zone before it is detached.  The zone will be in the "installed"
    state when this hook is run.

    It is possible that if the zone fails to detach after invoking this
    hook, future attempts to detach the zone will invoke this hook again.
    So this hook should be designed to gracefully handle the case where
    it is run multiple times on the same zone.  If this hook exits with
    a non-zero exit status, the detach operation will fail.

    This hook is most commonly used when there is pre-processing for detaching
    a zone but the built-in detach support will be used for the actual
    detach.  Otherwise, if a detach hook is provided, then it can be used
    to do both preprocessing as well as the actual detach.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    It has no attributes.
-->
<!ELEMENT predetach	(#PCDATA) >
<!ATTLIST predetach>

<!--
  detach

    Path to a hook that will perform any necessary processing on
    a zone to allow it to be detached.  The zone will be in the "installed"
    state when this hook is run.

    It is possible that if the zone fails to detach while running this
    hook, future attempts to detach the zone will invoke this hook again.
    So this hook should be designed to gracefully handle the case where
    it is run multiple times on the same zone.  If this hook exits with
    a non-zero exit status, the detach operation will fail and the zone will
    be left in the "installed" state, otherwise the state will be changed
    to "configured".

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    If no hook is provided, the internal zoneadm detach code will be used.

    It has no attributes.
-->
<!ELEMENT detach	(#PCDATA) >
<!ATTLIST detach>

<!--
  clone
    Path to a hook that will perform any necessary processing on a zone to
    allow it to be installed via cloning.  Cloning is an alternative to
    installing so this hook should result in the same effect for the zone.
    The zone will be in the "incomplete" state when this hook is run.

    If this hook exits with a non-zero exit status, the clone operation
    will fail and the zone will be left in the "incomplete" state, otherwise
    the state will be changed to "installed".

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      1st arg   name of source zone
      Additional arguments, if any, are appended.

    If no hook is provided, the internal zoneadm cloning code will be used.
-->
<!ELEMENT clone	(#PCDATA) >
<!ATTLIST clone>

<!--
  preuninstall

    Path to a script that will perform any necessary pre-processing on
    a zone before it is uninstalled.  The zone will be in the "installed"
    state when this hook is run.

    It is possible that if the zone fails to uninstall after invoking this
    hook, future attempts to uninstall the zone will invoke this hook
    again.  So this hook should be designed to gracefully handle the case
    where it is run multiple times on the same zone.  If this hook exits
    with a non-zero exit status, the uninstall operation will fail.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    It has no attributes.
-->
<!ELEMENT preuninstall	(#PCDATA) >
<!ATTLIST preuninstall>

<!--
  uninstall
    Identifies the hook to invoke when uninstalling a zone.  The zone will
    be in the "incomplete" state when this hook is run.

    If this hook exits with a non-zero exit status, the uninstall operation
    will fail and the zone will be left in the "incomplete" state, otherwise
    the state will be changed to "configured".

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      Additional arguments, if any, are appended.

    If no hook is provided, the internal zoneadm uninstall code will be used.
-->
<!ELEMENT uninstall	(#PCDATA) >
<!ATTLIST uninstall>

<!--
  presnap
    Identifies the hook to invoke before snapshotting a zone using the
    built-in ZFS clone support.

    If this hook exits with a non-zero exit status, the snapshot operation
    will fail and the zfs clone operation will fail.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
-->
<!ELEMENT presnap	(#PCDATA) >
<!ATTLIST presnap>

<!--
  postsnap
    Identifies the hook to invoke after snapshotting a zone using the
    built-in ZFS clone support.

    If this hook exits with a non-zero exit status, the zfs clone operation
    will fail.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
-->
<!ELEMENT postsnap	(#PCDATA) >
<!ATTLIST postsnap>

<!--
  validatesnap
    Identifies the hook to invoke to validate a snapshot of a zone using the
    built-in ZFS clone support.  This will validate a snapshot that was
    explicitly specified to the clone command when the user wants to
    re-use a snapshot from an earlier clone operation.

    If this hook exits with a non-zero exit status, the snapshot validation
    operation will fail, meaning the zfs snapshot cannot be used to install
    the zone.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      1st arg   snapshot name
      2nd arg   snapshot path
-->
<!ELEMENT validatesnap	(#PCDATA) >
<!ATTLIST validatesnap>

<!--
  prestatechange
    Identifies the hook to invoke before zoneadmd makes a state change.
    If this hook exits with a non-zero exit status, the action failed
    and no further state change activity will take place.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
      1st arg   integer representing current state of zone
			2 - installed
			3 - ready
			4 - running
			5 - shutting down
			6 - down
			7 - mounted
      2nd arg   integer representing transition command
			0 - ready
			1 - boot
			4 - halt
      3rd arg   Alternate root (zonepath is mounted under this root)
			empty string if zone not mounted under alternate root
-->
<!ELEMENT prestatechange	(#PCDATA) >
<!ATTLIST prestatechange>

<!--
  poststatechange
    Identifies the hook to invoke after zoneadmd makes a successful state
    change.  If this hook exits with a non-zero exit status, the action failed
    and zoneadmd treats the overall state change as failed, although
    all of the actions up to running the hook will have taken place.

    The following replacements are performed:

      %z	Name of zone
      %R	Zonepath of zone
    See prestatechange comment for 1st, 2nd and 3rd argument values.
-->
<!ELEMENT poststatechange	(#PCDATA) >
<!ATTLIST poststatechange>

<!--
  privilege

    Add a privilege to the default, prohibited, or required set for all
    zones of this brand with ip-type matched.  If a privilege is added
    to the default set all zones of this brand with ip-type matched on
    the system will inherit this privilege unless the privilege is
    removed via limitpriv in zonecfg(1m).  If a privilege is added to
    the prohibited set it can not be added to any zones with ip-type
    matched via limitpriv in zonecfg(1m).  If a privilege is added to
    the required set then all zones of this brand with ip-type matched
    on the system will inherit this privilege and it can't be removed via
    limitpriv in zonecfg(1m).

    Its attributes are
      set	The name of the set the privilege should go into.
      name	The name of the privilege.
      ip-type	Optional, indicates that adding of the privilege to the
		set only applies to certain IP types. Can be "shared" or
		"exclusive". If it is not specified, the default value
		"all" will be used, which means it is applicable regardless
		the IP type.

-->
<!ELEMENT privilege	(#PCDATA) >
<!ATTLIST privilege	set	( default | prohibited | required ) #REQUIRED 
			name	CDATA #REQUIRED
			ip-type ( shared | exclusive | all ) "all" >

<!--
 Support for readonly (read-mostly) zones.

    In order to configure a brand for read-only zones, it should be
    configured with readonly-support enabled and define several
    file-mac-profiles.  A file-mac-profile has two attributes,
    "name" and "trusted-path-safe".  The latter attribute indicates that
    the PRIV_TPD_UNSAFE doesn't need to be set for the Trusted Path Login.
    Typically, if /etc is writable then the attribute should be set to false.

    Each file-mac-profile can have multiple readonly-paths and writable-paths
    defined.  The paths have a property, "zone-type".  It can be set to
    "global", the path is applicable only to the global zone, or
    to "non-global", the path is applicable only the non-global zones
    or "all", the default value.


-->
<!ELEMENT writable-path		EMPTY>
<!ATTLIST writable-path		path	CDATA #REQUIRED
				zone-type ( non-global | global | all ) "all">

<!ELEMENT readonly-path		EMPTY>
<!ATTLIST readonly-path		path	CDATA #REQUIRED
				zone-type ( non-global | global | all ) "all">

<!ELEMENT file-mac-profile	(readonly-path | writable-path)* >

<!ATTLIST file-mac-profile	name	CDATA #REQUIRED
				trusted-path-safe ( false | true ) "true"
				zone-type ( non-global | global | all ) "all">

<!--
  resource
  Resource type as defined in zonecfg(1M)
-->
<!ELEMENT resource              (property+,resource*)>
<!ATTLIST resource              name    CDATA #REQUIRED>

<!ELEMENT property              EMPTY>
<!ATTLIST property              name    CDATA #REQUIRED
				default CDATA #IMPLIED
				reset-on-clone (true | false) "false">


<!--
  brand

    The toplevel container for a brand configuration.

    Its attributes are

      name	The name of the brand.  This must match the name of the
		directory in which the configuration file is stored.
-->

<!ELEMENT brand		(modname?, initname, login_cmd, forcedlogin_cmd,
			failsafe_cmd, user_cmd, install,
			installopts?, boot?, sysboot?, halt?, verify_cfg?,
			verify_adm?, postattach?, postclone?, postinstall?,
			postmove?, postrename?, predetach?, attach?, detach?,
			clone?, presnap?, postsnap?, validatesnap?,
			preuninstall?, uninstall?,
			prestatechange?, poststatechange?, query?,
			privilege+, file-mac-profile*, config*,resource*)>

<!ATTLIST brand		name		CDATA #REQUIRED
                        supports_zonestatd (true | false) #REQUIRED
			requires_hostid (true | false) #REQUIRED>