Initial commit.

This commit is contained in:
2021-05-24 22:18:33 +03:00
commit e2954d55f4
3701 changed files with 330017 additions and 0 deletions

134
vmware-tools/poweroff-vm-default Executable file
View File

@@ -0,0 +1,134 @@
#!/bin/sh
##########################################################
# Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation version 2.1 and no later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
##########################################################
##########################################################################
# DO NOT modify this file directly as it will be overwritten the next
# time the VMware Tools are installed.
##########################################################################
#
# statechange.sh
#
# This script is a refactored version of the legacy power scripts (e.g.,
# poweron-vm-default). It expects to be installed in their places --
# in other words, `basename "$0"` might be poweron-vm-default.
#
# Handy reference/shorthand used in this doc/scripts:
# TOOLS_CONFDIR ::= Depends on platform and installation settings. Likely
# "/etc/vmware-tools" or
# "/Library/Application Support/VMware Tools"
# powerOp ::= One of "poweron-vm", "poweroff-vm", "suspend-vm", and
# "resume-vm".
# vmwScriptDir ::= $TOOLS_CONFDIR/scripts/vmware
# userScriptDir ::= $TOOLS_CONFDIR/scripts/${powerOp}-default.d
#
# End users may install scripts of their own under $userScriptDir. They
# are executed in alphabetical order with "$powerOp" as the only argument.
#
# NB: This directory layout remains to preserve backwards compatibility. End
# users are free to write a single script which uses its only parameter
# (${powerOp}) as a discriminator, and then install symlinks to it in each
# of the ${powerOp}-default.d directories.
#
# On power-on and resume, VMware's scripts execute before the end user's. On
# suspend and power-off, the end user's execute before VMware's. (This way,
# VMware stops services only after the user's scripts have finished their
# work, and conversely restores the same services before the user's scripts
# attempt to use them.)
#
# Should any script exit non-zero, only its value will be saved to exitCode.
# (Any further non-zero exits will have no effect on exitCode.) This script
# exits with $exitCode.
#
# XXX Consider using the available/enabled pattern for VMware's scripts.
#
# XXX This should be staged as a single executable whereby the desired
# power operation is passed in as a parameter. (I.e., one would run
# "/path/to/statechange.sh suspend-vm" rather than having to install
# statechange.sh as suspend-vm-default.)
#
echo `date` ": Executing '$0'"
# See above.
TOOLS_CONFDIR=`dirname "$0"`
export TOOLS_CONFDIR
# Pull in subroutines like Panic.
. "$TOOLS_CONFDIR"/statechange.subr
#
# RunScripts --
#
# Executes scripts installed under $scriptDir.
#
# Side effects:
# exitCode may be incremented.
#
RunScripts() {
scriptDir="$1"
if [ -d "$scriptDir" ]; then
for scriptFile in "$scriptDir"/*; do
if [ -x "$scriptFile" ]; then
"$scriptFile" $powerOp
exitCode=`expr $exitCode \| $?`
fi
done
fi
}
#
# main --
#
# Entry point. See comments at top of file for details.
#
# Results:
# Exits with $exitCode.
#
main() {
# This is sanity checked in the case/esac bit below.
powerOp=`basename "$0" | sed 's,-default,,'`
exitCode=0
vmwScriptDir="$TOOLS_CONFDIR/scripts/vmware"
userScriptDir="$TOOLS_CONFDIR/scripts/${powerOp}-default.d"
case "$powerOp" in
poweron-vm|resume-vm)
RunScripts "$vmwScriptDir"
RunScripts "$userScriptDir"
;;
poweroff-vm|suspend-vm)
RunScripts "$userScriptDir"
RunScripts "$vmwScriptDir"
;;
*)
Panic "Invalid argument: $powerOp"
;;
esac
return $exitCode
}
main

134
vmware-tools/poweron-vm-default Executable file
View File

@@ -0,0 +1,134 @@
#!/bin/sh
##########################################################
# Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation version 2.1 and no later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
##########################################################
##########################################################################
# DO NOT modify this file directly as it will be overwritten the next
# time the VMware Tools are installed.
##########################################################################
#
# statechange.sh
#
# This script is a refactored version of the legacy power scripts (e.g.,
# poweron-vm-default). It expects to be installed in their places --
# in other words, `basename "$0"` might be poweron-vm-default.
#
# Handy reference/shorthand used in this doc/scripts:
# TOOLS_CONFDIR ::= Depends on platform and installation settings. Likely
# "/etc/vmware-tools" or
# "/Library/Application Support/VMware Tools"
# powerOp ::= One of "poweron-vm", "poweroff-vm", "suspend-vm", and
# "resume-vm".
# vmwScriptDir ::= $TOOLS_CONFDIR/scripts/vmware
# userScriptDir ::= $TOOLS_CONFDIR/scripts/${powerOp}-default.d
#
# End users may install scripts of their own under $userScriptDir. They
# are executed in alphabetical order with "$powerOp" as the only argument.
#
# NB: This directory layout remains to preserve backwards compatibility. End
# users are free to write a single script which uses its only parameter
# (${powerOp}) as a discriminator, and then install symlinks to it in each
# of the ${powerOp}-default.d directories.
#
# On power-on and resume, VMware's scripts execute before the end user's. On
# suspend and power-off, the end user's execute before VMware's. (This way,
# VMware stops services only after the user's scripts have finished their
# work, and conversely restores the same services before the user's scripts
# attempt to use them.)
#
# Should any script exit non-zero, only its value will be saved to exitCode.
# (Any further non-zero exits will have no effect on exitCode.) This script
# exits with $exitCode.
#
# XXX Consider using the available/enabled pattern for VMware's scripts.
#
# XXX This should be staged as a single executable whereby the desired
# power operation is passed in as a parameter. (I.e., one would run
# "/path/to/statechange.sh suspend-vm" rather than having to install
# statechange.sh as suspend-vm-default.)
#
echo `date` ": Executing '$0'"
# See above.
TOOLS_CONFDIR=`dirname "$0"`
export TOOLS_CONFDIR
# Pull in subroutines like Panic.
. "$TOOLS_CONFDIR"/statechange.subr
#
# RunScripts --
#
# Executes scripts installed under $scriptDir.
#
# Side effects:
# exitCode may be incremented.
#
RunScripts() {
scriptDir="$1"
if [ -d "$scriptDir" ]; then
for scriptFile in "$scriptDir"/*; do
if [ -x "$scriptFile" ]; then
"$scriptFile" $powerOp
exitCode=`expr $exitCode \| $?`
fi
done
fi
}
#
# main --
#
# Entry point. See comments at top of file for details.
#
# Results:
# Exits with $exitCode.
#
main() {
# This is sanity checked in the case/esac bit below.
powerOp=`basename "$0" | sed 's,-default,,'`
exitCode=0
vmwScriptDir="$TOOLS_CONFDIR/scripts/vmware"
userScriptDir="$TOOLS_CONFDIR/scripts/${powerOp}-default.d"
case "$powerOp" in
poweron-vm|resume-vm)
RunScripts "$vmwScriptDir"
RunScripts "$userScriptDir"
;;
poweroff-vm|suspend-vm)
RunScripts "$userScriptDir"
RunScripts "$vmwScriptDir"
;;
*)
Panic "Invalid argument: $powerOp"
;;
esac
return $exitCode
}
main

134
vmware-tools/resume-vm-default Executable file
View File

@@ -0,0 +1,134 @@
#!/bin/sh
##########################################################
# Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation version 2.1 and no later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
##########################################################
##########################################################################
# DO NOT modify this file directly as it will be overwritten the next
# time the VMware Tools are installed.
##########################################################################
#
# statechange.sh
#
# This script is a refactored version of the legacy power scripts (e.g.,
# poweron-vm-default). It expects to be installed in their places --
# in other words, `basename "$0"` might be poweron-vm-default.
#
# Handy reference/shorthand used in this doc/scripts:
# TOOLS_CONFDIR ::= Depends on platform and installation settings. Likely
# "/etc/vmware-tools" or
# "/Library/Application Support/VMware Tools"
# powerOp ::= One of "poweron-vm", "poweroff-vm", "suspend-vm", and
# "resume-vm".
# vmwScriptDir ::= $TOOLS_CONFDIR/scripts/vmware
# userScriptDir ::= $TOOLS_CONFDIR/scripts/${powerOp}-default.d
#
# End users may install scripts of their own under $userScriptDir. They
# are executed in alphabetical order with "$powerOp" as the only argument.
#
# NB: This directory layout remains to preserve backwards compatibility. End
# users are free to write a single script which uses its only parameter
# (${powerOp}) as a discriminator, and then install symlinks to it in each
# of the ${powerOp}-default.d directories.
#
# On power-on and resume, VMware's scripts execute before the end user's. On
# suspend and power-off, the end user's execute before VMware's. (This way,
# VMware stops services only after the user's scripts have finished their
# work, and conversely restores the same services before the user's scripts
# attempt to use them.)
#
# Should any script exit non-zero, only its value will be saved to exitCode.
# (Any further non-zero exits will have no effect on exitCode.) This script
# exits with $exitCode.
#
# XXX Consider using the available/enabled pattern for VMware's scripts.
#
# XXX This should be staged as a single executable whereby the desired
# power operation is passed in as a parameter. (I.e., one would run
# "/path/to/statechange.sh suspend-vm" rather than having to install
# statechange.sh as suspend-vm-default.)
#
echo `date` ": Executing '$0'"
# See above.
TOOLS_CONFDIR=`dirname "$0"`
export TOOLS_CONFDIR
# Pull in subroutines like Panic.
. "$TOOLS_CONFDIR"/statechange.subr
#
# RunScripts --
#
# Executes scripts installed under $scriptDir.
#
# Side effects:
# exitCode may be incremented.
#
RunScripts() {
scriptDir="$1"
if [ -d "$scriptDir" ]; then
for scriptFile in "$scriptDir"/*; do
if [ -x "$scriptFile" ]; then
"$scriptFile" $powerOp
exitCode=`expr $exitCode \| $?`
fi
done
fi
}
#
# main --
#
# Entry point. See comments at top of file for details.
#
# Results:
# Exits with $exitCode.
#
main() {
# This is sanity checked in the case/esac bit below.
powerOp=`basename "$0" | sed 's,-default,,'`
exitCode=0
vmwScriptDir="$TOOLS_CONFDIR/scripts/vmware"
userScriptDir="$TOOLS_CONFDIR/scripts/${powerOp}-default.d"
case "$powerOp" in
poweron-vm|resume-vm)
RunScripts "$vmwScriptDir"
RunScripts "$userScriptDir"
;;
poweroff-vm|suspend-vm)
RunScripts "$userScriptDir"
RunScripts "$vmwScriptDir"
;;
*)
Panic "Invalid argument: $powerOp"
;;
esac
return $exitCode
}
main

View File

@@ -0,0 +1,623 @@
#!/bin/sh -x
##########################################################
# Copyright (C) 2001-2018 VMware, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation version 2.1 and no later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
##########################################################
#
# network (Linux)
#
# Using a combination of a system networking script, ifconfig, ifup, ifdown
# and the ip command, attempt to release and renew DHCP leases upon receipt
# of suspend and resume events, respectively.
#
logbase=/var/log/vmware-network
logfile=$logbase.log
#
# Rotate any logs
#
rotate_logfile() {
max=9
max=`expr $max - 1`
for s in `seq $max -1 1`; do
d=`expr $s + 1`
mv -f $logbase.$s.log $logbase.$d.log
done
mv -f $logbase.log $logbase.1.log
}
rotate_logfile
# redirect stdio
exec > $logfile 2>&1
chmod 0600 $logfile
echo `date` ": Executing '$0 $*'"
echo
. `dirname "$0"`/../../statechange.subr
#
# find_networking_script --
#
# Searches common Linux distro init/rc paths to find a singular network
# services script.
#
# Result:
# Returns a valid networking script path on success or "error" on failure.
#
# Side effects:
# None.
#
find_networking_script() {
local script="error"
for dir in "/etc/init.d" "/sbin/init.d" "/etc" "/etc/rc.d" ; do
if [ -d "$dir/rc0.d" ] &&
[ -d "$dir/rc1.d" ] &&
[ -d "$dir/rc2.d" ] &&
[ -d "$dir/rc3.d" ] &&
[ -d "$dir/rc4.d" ] &&
[ -d "$dir/rc5.d" ] &&
[ -d "$dir/rc6.d" ]; then
# Now find the appropriate networking script.
if [ -d "$dir/init.d" ]; then
if [ -x "$dir/init.d/network" ]; then
script="$dir/init.d/network"
elif [ -x "$dir/init.d/networking" ]; then
script="$dir/init.d/networking"
fi
else
if [ -x "$dir/network" ]; then
script="$dir/network"
elif [ -x "$dir/networking" ]; then
script="$dir/networking"
fi
fi
fi
done
echo "$script"
}
#
# exec_networking_script --
#
# Execute the networking script to bring network interfaces up or down
# based on the given input action argument.
#
exec_networking_script()
{
local script=$1
local action=$2
# Using SysV "service" if it exists, otherwise fall back to run the
# script directly
service=`which service 2>/dev/null`
if [ $? = 0 -a -n "$service" ]; then
serviceName=`basename "$script"`
"$service" "$serviceName" "$action"
else
"$script" "$action"
fi
return $?
}
#
# exec_systemctl_service --
#
# Handle linux distributions that use systemd to replace the legacy
# system V startup scripts. The previous network script searching
# approach is no longer viable in these systems. Invoke the systemctl
# command to control the network service instead.
#
exec_systemctl_service()
{
local rc=1
local action=$1
local ctlcmd=$(which systemctl 2>/dev/null)
local service
[ -z "$ctlcmd" ] && return $rc
for svc in systemd-networkd network; do
if ! $ctlcmd status $svc | grep -iq 'not-found'; then
service=$svc && break
fi
done
[ -z "$service" ] && return $rc
$ctlcmd $action $service; rc=$?
# When use the systemd-networkd service to shut down interfaces, interface
# address and state remain unchanged. Need to use ip command to change its
# address and state.
if [ $rc = 0 -a $service = 'systemd-networkd' -a $action = 'stop' ]; then
config_network_intfs $action; rc=$?
fi
return $rc
}
#
# del_intf_ip --
#
# Use the ip command to remove all the addresses of an interface.
#
del_intf_ip()
{
local nic=$1
$ip_cmd addr flush dev $nic
return $?
}
#
# ip_intf_ops --
#
# Use the ip command to change the state of an interface to up or down.
#
ip_intf_ops()
{
local rc=1
local nic=$1
local ops=$2
[ -z "$ip_cmd" ] && return $rc
$ip_cmd link set $nic $ops; rc=$?
# Remove interface addresses when taking an interface down.
if [ $rc = 0 -a $ops = down ]; then
del_intf_ip $nic; rc=$?
fi
return $rc
}
#
# intf_ops --
#
# Execute the specified command (ifup or ifdown) if available, otherwise use
# the ip command as fallback. If ifup or ifdown fails, run the ip command to
# retry the intended operation.
#
intf_ops()
{
local rc=0
local cmd=$1
local ops=$2
local nic=$3
local tmp
if [ ! -z "$cmd" ]; then
tmp=$($cmd $nic 2>&1); rc=$?
# Some systems still return a successful status even the command fails
# because the interface is not configured in the configuration file. So
# have to examine the command output to determine the actual status.
if [ $rc = 0 ]; then
echo $tmp | egrep -iq 'not configured|ignoring unknown' && rc=1
fi
fi
# If ifup/ifdown fails, try the ip fallback.
if [ -z "$cmd" -o $rc != 0 ]; then
ip_intf_ops $nic $ops; rc=$?
fi
return $rc
}
#
# exec_intf_ops --
#
# Perform an operation to bring an individual interface up or down.
#
exec_intf_ops()
{
local rc=0
local action=$1
local nic=$2
case $action in
start)
intf_ops "$ifup_cmd" up $nic; rc=$?
;;
stop)
intf_ops "$ifdown_cmd" down $nic; rc=$?
;;
*)
Panic "Illegal interface action: $action"
;;
esac
return $rc
}
#
# config_network_intfs --
#
# For Linux systems not supporting networking scripts to bring interfaces
# up or down, provide a way to change the interface state individually.
#
config_network_intfs()
{
local rc=0
local action=$1
if [ -f "$activeList" ]; then
while read nic; do
exec_intf_ops $action $nic
rc=$(expr $rc \| $?)
done < $activeList
fi
return $rc
}
#
# run_network_script --
#
# Finds out how to run the system's script used to control networking, and
# runs it with the given argument (which should be one of the usual SysV
# init script arguments). If it does not work, tries the other alternatives.
# So far, our alternatives are (a) systemctl (b) network script (c) perform
# an individual interface state change.
#
run_network_script()
{
local action=$1
local rc=0
local script
while true; do
exec_systemctl_service $action
[ $? != 0 ] || break
script=`find_networking_script`
if [ $script != "error" ]; then
exec_networking_script $script $action
[ $? != 0 ] || break
fi
# Since all the other alternatives fail, need to manually change
# individual interface state.
config_network_intfs $action; rc=$?
break
done
return $rc
}
#
# save_active_NIC_list --
#
# Records a list of every active NIC to /var/run/vmware-active-nics.
#
# XXX What's the story on aliases? Should they still be included, or will
# they be recreated automatically upon resume?
#
# Results:
# $activeList has, one per line, a list of all active NICs.
#
# Side effects:
# None.
#
save_active_NIC_list()
{
local intf_out
>$activeList
# Find out all the non-loopback up interfaces. Use ip if available
# otherwise fall back to the ifconfig command.
# ifconfig is buggy on some platforms and truncates long
# network names
if [ -n "$ip_cmd" ]; then
for nic in $($ip_cmd link show up | egrep '\bUP\b' | awk -F: '{print $2}'); do
$ip_cmd link show ${nic%@*} | grep -iq 'link/ether' && echo ${nic%@*} >> $activeList
done
else
for nic in $($ifconfig_cmd | sed -n 's/^\([^: \t]*\).*$/\1/p'); do
intf_out=$($ifconfig_cmd $nic)
echo $intf_out | grep -iq loopback && continue
echo $intf_out | egrep -q '\bUP\b' && echo $nic >> $activeList
done
fi
}
#
# rescue_NIC --
#
# For each NIC recorded in $activeList that is not currently "up", run
# "ifup $nic" or "ip link set $nic up" to bring the interface up.
#
# Results:
# All downed NICs should be active.
#
rescue_NIC()
{
local rc=0
local intf_out
if [ -f "$activeList" ]; then
while read nic; do
if [ -n "$ip_cmd" ]; then
intf_out=$($ip_cmd link show $nic up)
else
intf_out=$($ifconfig_cmd $nic)
fi
if echo $intf_out | grep -q 'UP'; then
echo `date` "[rescue_nic] $nic is already active."
else
echo `date` "[rescue_nic] activating $nic ..."
# Our best effort to activate interfaces, use ifup if available
# otherwise use the ip command as fallback.
intf_ops "$ifup_cmd" up $nic
rc=$(expr $rc \| $?)
fi
done < $activeList
rm -f $activeList
fi
return $rc
}
#
# TranquilizeNetworkManager --
#
# Put the NetworkManager daemon to sleep (maybe).
#
# See http://projects.gnome.org/NetworkManager/developers/spec.html .
#
# Results:
# Sleep(true) request is sent to the NetworkManager D-Bus interface.
#
# Side effects:
# None.
#
TranquilizeNetworkManager()
{
# `which' may be a bit noisy, so we'll shush it.
dbusSend=`which dbus-send 2>/dev/null`
rc=$?
if [ $rc -ne 0 ]; then
return $rc
fi
# Check NetworkManager state before disabling it.
nm_state=`$dbusSend --system --print-reply \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.DBus.Properties.Get \
string:'org.freedesktop.NetworkManager' \
string:'State' \
| awk '/variant/ {print $3;}'`
if [ -z "$nm_state" ]; then
return 1
fi
# NetworkManager API 0.7/0.8 0.9
# NM_STATE_ASLEEP 1 10
# NM_STATE_DISCONNECTED 4 20
case $nm_state in
1|4|10|20)
# Nothing needs to be done.
return 0
;;
esac
# NetworkManager 0.8.0 and above
$dbusSend --system --print-reply \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager.Enable boolean:false
rc=$?
if [ $rc -eq 0 ]; then
return $rc
fi
# NetworkManager 0.7.0
$dbusSend --system --print-reply \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager.Sleep boolean:true
rc=$?
if [ $rc -eq 0 ]; then
return $rc
fi
# NetworkManager 0.6
$dbusSend --system --print-reply \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager.sleep
rc=$?
return $rc
}
#
# WakeNetworkManager --
#
# Wake the NetworkManager daemon (maybe).
#
# See http://projects.gnome.org/NetworkManager/developers/spec.html .
#
# Results:
# Sleep(false)request is sent to the NetworkManager D-Bus interface.
#
# Side effects:
# None.
#
WakeNetworkManager()
{
# `which' may be a bit noisy, so we'll shush it.
dbusSend=`which dbus-send 2>/dev/null`
rc=$?
if [ $rc = 0 ]; then
# NetworkManager 0.8.0
$dbusSend --system --print-reply \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager.Enable boolean:true
rc=$?
if [ $rc = 0 ]; then
return $rc
fi
# NetworkManager 0.7.0
$dbusSend --system --print-reply \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager.Sleep boolean:false
rc=$?
if [ $rc = 0 ]; then
return $rc
fi
# NetworkManager 0.6
$dbusSend --system --print-reply \
--dest=org.freedesktop.NetworkManager \
/org/freedesktop/NetworkManager \
org.freedesktop.NetworkManager.wake
rc=$?
fi
return $rc
}
#
# sanity_check --
#
# Check if the script has all the commands it needs to carry out the
# request. So far, it requires either ip or ifconfig command to read
# interface configuration. Ifup is not checked here. It is checked at
# the place where we need to do individual interface state change.
#
sanity_check()
{
ip_cmd=$(which ip 2>/dev/null)
ifconfig_cmd=$(which ifconfig 2>/dev/null)
ifup_cmd=$(which ifup 2>/dev/null)
ifdown_cmd=$(which ifdown 2>/dev/null)
[ -z "$ifconfig_cmd" -a -z "$ip_cmd" ] && \
Panic "ip and ifconfig not in search path."
}
#
# main --
#
# Main entry point. Perform some sanity checking, then map state change
# events to relevant networking operations.
#
# Results:
# See comment at top of file.
#
main() {
exitCode=0
activeList=/var/run/vmware-active-nics
case "$1" in
poweron-vm)
rm -f $activeList
;;
suspend-vm)
TranquilizeNetworkManager
exitCode=$?
if [ $exitCode != 0 ]; then
sanity_check suspend-vm
save_active_NIC_list
run_network_script stop
exitCode=$?
fi
;;
resume-vm)
WakeNetworkManager
exitCode=$?
if [ $exitCode != 0 ]; then
sanity_check resume-vm
# According to hfu, "/etc/init.d/networking restart" on Debian 5.0
# may bring down ethernet interfaces tagged as "allow-hotplug" without
# bringing them back up.
#
# This is especially a problem when reverting to a live, running
# VM snapshot where an active NIC list hadn't yet been generated,
# resulting in sudden loss of an otherwise operational NIC.
#
# So, if the active list doesn't exist, assume we're coming back to
# a live snapshot and capture the current active list now for
# rescue later.
if [ ! -s $activeList ]; then
save_active_NIC_list
fi
# We shall use start not restart here. Otherwise we may not be able
# to bring back active list on distros like sles11sp2
# -- PR 816791
run_network_script start
rescue_NIC
exitCode=$?
fi
;;
*)
echo "No argument supplied."
;;
esac
return $exitCode
}
main "$@"
echo `date` ": Finished '$0 $*'"

47
vmware-tools/statechange.subr Executable file
View File

@@ -0,0 +1,47 @@
#!/bin/sh
##########################################################
# Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation version 2.1 and no later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
##########################################################
##########################################################################
# DO NOT modify this file directly as it will be overwritten the next
# time the VMware Tools are installed.
##########################################################################
#
# Panic --
#
# Write a formatted error message to stderr and exit.
#
# Results:
# Stderr is spammed, program exits with exit code 1.
#
# Side effects:
# None.
#
Panic() {
fmt="`date '+%b %d %H:%M:%S'` `basename \"$0\"`"
if [ -n "$1" ]; then
fmt="${fmt}: $1"
shift
fi
printf >&2 "${fmt}\n" "$@"
exit 1
}

134
vmware-tools/suspend-vm-default Executable file
View File

@@ -0,0 +1,134 @@
#!/bin/sh
##########################################################
# Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation version 2.1 and no later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
##########################################################
##########################################################################
# DO NOT modify this file directly as it will be overwritten the next
# time the VMware Tools are installed.
##########################################################################
#
# statechange.sh
#
# This script is a refactored version of the legacy power scripts (e.g.,
# poweron-vm-default). It expects to be installed in their places --
# in other words, `basename "$0"` might be poweron-vm-default.
#
# Handy reference/shorthand used in this doc/scripts:
# TOOLS_CONFDIR ::= Depends on platform and installation settings. Likely
# "/etc/vmware-tools" or
# "/Library/Application Support/VMware Tools"
# powerOp ::= One of "poweron-vm", "poweroff-vm", "suspend-vm", and
# "resume-vm".
# vmwScriptDir ::= $TOOLS_CONFDIR/scripts/vmware
# userScriptDir ::= $TOOLS_CONFDIR/scripts/${powerOp}-default.d
#
# End users may install scripts of their own under $userScriptDir. They
# are executed in alphabetical order with "$powerOp" as the only argument.
#
# NB: This directory layout remains to preserve backwards compatibility. End
# users are free to write a single script which uses its only parameter
# (${powerOp}) as a discriminator, and then install symlinks to it in each
# of the ${powerOp}-default.d directories.
#
# On power-on and resume, VMware's scripts execute before the end user's. On
# suspend and power-off, the end user's execute before VMware's. (This way,
# VMware stops services only after the user's scripts have finished their
# work, and conversely restores the same services before the user's scripts
# attempt to use them.)
#
# Should any script exit non-zero, only its value will be saved to exitCode.
# (Any further non-zero exits will have no effect on exitCode.) This script
# exits with $exitCode.
#
# XXX Consider using the available/enabled pattern for VMware's scripts.
#
# XXX This should be staged as a single executable whereby the desired
# power operation is passed in as a parameter. (I.e., one would run
# "/path/to/statechange.sh suspend-vm" rather than having to install
# statechange.sh as suspend-vm-default.)
#
echo `date` ": Executing '$0'"
# See above.
TOOLS_CONFDIR=`dirname "$0"`
export TOOLS_CONFDIR
# Pull in subroutines like Panic.
. "$TOOLS_CONFDIR"/statechange.subr
#
# RunScripts --
#
# Executes scripts installed under $scriptDir.
#
# Side effects:
# exitCode may be incremented.
#
RunScripts() {
scriptDir="$1"
if [ -d "$scriptDir" ]; then
for scriptFile in "$scriptDir"/*; do
if [ -x "$scriptFile" ]; then
"$scriptFile" $powerOp
exitCode=`expr $exitCode \| $?`
fi
done
fi
}
#
# main --
#
# Entry point. See comments at top of file for details.
#
# Results:
# Exits with $exitCode.
#
main() {
# This is sanity checked in the case/esac bit below.
powerOp=`basename "$0" | sed 's,-default,,'`
exitCode=0
vmwScriptDir="$TOOLS_CONFDIR/scripts/vmware"
userScriptDir="$TOOLS_CONFDIR/scripts/${powerOp}-default.d"
case "$powerOp" in
poweron-vm|resume-vm)
RunScripts "$vmwScriptDir"
RunScripts "$userScriptDir"
;;
poweroff-vm|suspend-vm)
RunScripts "$userScriptDir"
RunScripts "$vmwScriptDir"
;;
*)
Panic "Invalid argument: $powerOp"
;;
esac
return $exitCode
}
main

View File

@@ -0,0 +1,317 @@
# Copyright (c) 2019-2020 VMware, Inc. All rights reserved.
# "CAUTION: tools.conf is highly syntax sensitive file. Use extreme caution
# while editing it. If modified, it is automatically re-loaded by
# VMware Tools services every 5 seconds."
#
# Lines must not end with trailing white space.
[unsetenvironment]
# Defines environment variables to be removed from the service reading
# the configuration file. Supported formats are:
#
# 1. <variableName>=
# 2. <serviceName>.<variableName>=
#
# Where <serviceName> refers to the 'vmsvc' and 'vmusr',
# <variableName> refers to the name of the environment
# variable to be removed. '=' sign after <variableName>
# is mandatory to maintain the configuration file syntax.
# However, anything after '=' is ignored.
#
# Case-sensitive behavior is defined by the operating system.
#
# Note: unsetenvironment group is processed before setenvironment group.
# As the service environment is setup at start up time, any changes
# in this group require service to be restarted in order to take effect.
#
# Unsetting PATH for all services:
# PATH=
#
# Unsetting PATH for vmsvc only:
# vmsvc.PATH=
#
# Unsetting PATH for vmusr only:
# vmusr.PATH=
[setenvironment]
# Defines environment variables to be set for the service reading
# the configuration file. Supported formats are:
#
# 1. <variableName>=<variableValue>
# 2. <serviceName>.<variableName>=<variableValue>
#
# Where <serviceName> refers to the 'vmsvc' and 'vmusr',
# <variableName> refers to the name of the environment
# variable to be set, and <variableValue> refers to the
# value to be assigned to the environment variable.
#
# Case-sensitive behavior is defined by the operating system.
#
# Note: setenvironment group is processed after unsetenvironment group.
# As the service environment is setup at start up time, any changes
# in this group require service to be restarted in order to take effect.
#
# Setting TMPDIR for all services:
# TMPDIR=/vmware/temp
#
# Setting TMPDIR for vmsvc only:
# vmsvc.TMPDIR=/vmware/vmsvc/temp
#
# Setting TMPDIR for vmusr only:
# vmusr.TMPDIR=/vmware/vmusr/temp
[logging]
# set to false to disable logging
#log = true
# Log destinations for various services
# By default, logs go to
# %windir%/temp/vmware-<servicename>.log
# for Windows, and
# /var/log/vmware-<servicename>-<username>.log
# for Linux, MacOS and Solaris.
# Possible values for handler are:
# file: logs to a file. Set *.data to the file name
# file+: same as 'file', but appends to the file
# All file paths used in *.data value need to be in Unix
# format (forward slashes) and in utf-8, for all operating
# systems.
# vmx: logs to the host (ESXi, Workstation, Fusion)
# std: Logs to stdout for level >= 'message',
# and to stderr for more severe than 'message'.
# syslog: logs to syslog
# outputdebugstring: uses OutputDebugString (Windows only)
# If handler is 'syslog' and the OS is Linux, the facility
# can be set with <domain>.facility. The facility value can be one of
# 'local0'..'local7', 'daemon' or 'user'. The default is 'user'.
#vmtoolsd.facility = user
# possible values for level are:
# debug, info, message, warning, critical, error
# Note that "debug" level logs generate huge amounts of logs and may also
# include sensitive data required for diagnosis. Therefore, this level should
# be used only for the duration of diagnosis of an issue and reverted back to
# default setting post diagnosis.
# Enable tools service logging to a file.
#vmtoolsd.level = debug
#vmtoolsd.handler = file
#vmtoolsd.data = c:/tmp/vmtoolsd-${USER}.log
# Enable 'vmsvc' service logging to a file.
#vmsvc.level = debug
#vmsvc.handler = file
#vmsvc.data = c:/tmp/vmsvc.log
# Enable VMwareResolutionSet.exe logging to a file.
# Comment this for Linux guest, sometimes vmusr logs are not generated due
# to this being uncommented
#vmresset.level = debug
#vmresset.handler = file+
#vmresset.data = c:/tmp/vmresset.log
# Enable new "vmusr" service logging to a file.
#vmusr.level = debug
#vmusr.handler = file
#vmusr.data = c:/tmp/vmusr.${USER}.log
# Set the following configuration if you want to collect the logs for
# vmware-toolbox-cmd utility
#toolboxcmd.level = debug
#toolboxcmd.handler = file
#toolboxcmd.data = c:/tmp/vmtoolboxcmd-${USER}.log
# Enable old VMwareUser/vmware-user logging to file.
#log.file = c:/tmp/vmtools.log
# Enable "hgfsServer" request handling logging to the appropriate service file.
#hgfsServer.level = debug
# Enable "hgfs" manager and transport logging to the appropriate service file.
#hgfsd.level = debug
#vmbackup.level = debug
#vmbackup.handler = vmx
#vmvss.level = debug
#vmvss.handler = vmx
# Default 4096, 0=> disable log caching
#maxCacheEntries=4096
[powerops]
# Custom scripts for power operations
# This can be an absolute path, or a path relative to the tools
# install path (/etc/vmware-tools/ for Linux).
# For more information on configuring and querying custom scripts with
# VMware Tools, see the "Use Custom VMware Tools Scripts" section of the
# "VMware Tools Configuration Utility User's Guide".
# Runs when the virtual machine is being powered on rather than resumed.
# Also runs after virtual machine restarts.
# The default script has no effect on networking for the virtual machine.
#poweron-script=poweron-vm-default
# Runs when the virtual machine is being powered off or reset.
# The default script has no effect on networking for the virtual machine.
#poweroff-script=poweroff-vm-default
# Runs when the virtual machine is resumed after it was suspended.
# On Windows guest operating systems, if the virtual machine is configured to
# use DHCP, the default script renews the IP address of the virtual machine.
# On Linux, Mac OS X, Solaris, and FreeBSD guest operating systems,
# this script starts networking for the virtual machine.
#resume-script=resume-vm-default
# Runs when the virtual machine is being suspended.
# On Windows guest operating systems, if the virtual machine is configured
# to use DHCP, the default script releases the IP address of the virtual
# machine.
# On Linux, Mac OS X, Solaris, and FreeBSD, this script stops networking for
# the virtual machine.
#suspend-script=suspend-vm-default
[guestinfo]
# Set to true to disable the perf monitor.
#disable-perf-mon=false
# Set to true to disable DiskInfo.
#disable-query-diskinfo=false
# User-defined poll interval in seconds. Set to 0 to disable polling.
#poll-interval=30
# User-defined stats interval in seconds. Set to 0 to disable stats collection.
#stats-interval=20
# Whether stat results should be written to the log.
#enable-stat-logging=false
# Set a comma separated list of network interface names that can be the
# primary ones. These will be sorted to the top. Interface names can use
# wildcards like '*' and '?'. Default is no value.
#primary-nics=
# Set a comma separated list of network interface names that have low priority
# (so they will be sorted to the end). Interface names can use wildcards like
# '*' and '?'. Default is no value.
#low-priority-nics=
# Set a comma separated list of network interface names that shall be ignored.
# Interface names can use wildcards like '*' and '?'.
# Default for Linux and all non-Windows:
#exclude-nics=veth*,docker*,virbr*
# Default for Windows:
#exclude-nics=vEthernet*
# max umber of IPv4 routes to gather.
#max-ipv4-routes=100
# max umber of IPv6 routes to gather.
#max-ipv6-routes=100
# whether to include reserved space in diskInfo space metrics on Linux
#diskinfo-include-reserved=false
[unity]
#
# Unity is available for Windows only.
#
# Set to true to override system decisions about whether unity should be available.
#forceEnable=false
# Override the desktop background color when in Unity mode.
#desktop.backgroundColor=
# The socket type can be 'ipsocket' or 'vsocket':
#pbrpc.socketType
[resolutionKMS]
# Default is true if tools finds an xf86-video-vmware driver with
# version >= 13.2.0. If you don't have X installed, set this to true manually.
# This only affects tools for Linux.
#enable=true
[guestosinfo]
# Override the short OS name sent by tools.
#short-name=
# Override the long OS name sent by tools.
#long-name=
[vmbackup]
# enableSyncDriver is not available for Windows:
#enableSyncDriver=true
# enableVSS is Windows only:
#enableVSS=true
# See https://kb.vmware.com/s/article/2146204
# can be used to fallback to FS quiescing forcely when there are app quiescing
# problems for specific Windows systems
#vss.disableAppQuiescing=false
#execScripts=true
#scriptArg=
# Linux only
# The value of excludedFileSystems is a comma-separated list of glob-style
# patterns specifying the file systems to be excluded from quiesced snapshots.
# The patterns may use '*' (wildcard) to represent any string of characters
# and '?" (joker) to represent any single character. Note that the characters
# represented by these patters, '*' and '?" may include any characters,
# including '/'
#excludedFileSystems=
# Whether to execute scripts on quiescing.
# Scripts are executed from /etc/vmware-tools/backupScripts.d on Linux and
# %installpath%\backupScripts.d on Windows, and the legacy scripts
# "c:\windows\pre-freeze-script.bat"
# "c:\windows\post-thaw-script.bat"
#
# Linux:
# "/usr/sbin/pre-freeze-script"
# "/usr/sbin/post-thaw-script"
#
# Scripts will be called with "freeze", "freezeFail" or "thaw" as their first
# arguments.
#execScripts=true
# additional argument to be passed to scripts
#scriptArg=
[guestoperations]
# to disable all guest ops
#disabled=false
# Whether to use vgauth for guest op authentication
#useVGAuth=true
[autoupgrade]
# The autoupgrade plugin is only available for Windows.
# The "allow-upgrade" option controls whether automatic upgrades (or reinstalls)
# are allowed. The two options "allow-add-feature" and "allow-remove-feature"
# control whether adding or removing a feature will be allowed. The two latter
# ones only affect Windows tools.
#allow-upgrade=true
#allow-add-feature=true
#allow-remove-feature=true
[deployPkg]
# to disable guest customization
#enable-customization=false

3
vmware-tools/vgauth.conf Normal file
View File

@@ -0,0 +1,3 @@
[service]
samlSchemaDir = /etc/vmware-tools/vgauth/schemas

View File

@@ -0,0 +1,142 @@
<?xml version='1.0'?>
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [
<!ENTITY % s ''>
<!ENTITY % p ''>
<!-- keep this XML 1.0 correct -->
<!ATTLIST schema xmlns:hfp CDATA #IMPLIED
xmlns:xhtml CDATA #IMPLIED
xmlns:xsi CDATA #IMPLIED
xsi:schemaLocation CDATA #IMPLIED>
<!ELEMENT xhtml:p ANY>
<!ELEMENT xhtml:em ANY>
]>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/1999/xhtml.xsd">
<annotation>
<documentation>
<xhtml:p> This schema defines 2 elements for use in the
appinfo portion section of (potentially) all builtin datatypes in the schema
for XML Schema Part 2: Datatypes. </xhtml:p>
<xhtml:p> One intended use of
this appinfo is in the generation of the HTML version of the XML Schema Part 2:
Datatypes specification itself. All portions of the HTML text which describe
the facets and/or properties of each datatype is generated by an XSLT
transformation which keys off of this appinfo. </xhtml:p>
<xhtml:p> Schema
processors may have another use for this appinfo (although one certainly not
required in any way by the specification). The information may be useful in
dynamically building validation modules/classes and/or user-interfaces for
schema creation. </xhtml:p>
</documentation>
</annotation>
<element name="hasFacet">
<annotation>
<documentation>
<xhtml:p>
hasFacet is used to signal that the contraining facet
given in the name attribute is applicable to a primitive
datatype (and all types derived from it).
</xhtml:p>
<xhtml:p>
Note: this element will only appear in the appinfo of
primitive types or built-in types derived by "list".
</xhtml:p>
<xhtml:p>
A schema processor (or the XSLT which generates the
HTML version of the XML Schema Part 2: Datatypes
specification) which reads a derived simpleType
definition should walk up the base type chain until
it reaches the primitive type at the top of the chain
and "push" all facets found their down to all derived
types in the chain.
</xhtml:p>
</documentation>
</annotation>
<complexType>
<attribute name="name" use="required">
<simpleType>
<annotation>
<documentation>
<xhtml:p>
This datatype names all existing contraining facets.
</xhtml:p>
<xhtml:p>
Question: should each of the enumerations below be
given a documentation annotation, which would contain
the text to be used in the definition of the facet
in the XML Schema Part 2: Datatypes specification?
Might be nice to try to collect all of that information
together here.
</xhtml:p>
</documentation>
</annotation>
<restriction base="NMTOKEN">
<enumeration value="length"/>
<enumeration value="minLength"/>
<enumeration value="maxLength"/>
<enumeration value="pattern"/>
<enumeration value="enumeration"/>
<enumeration value="maxInclusive"/>
<enumeration value="maxExclusive"/>
<enumeration value="minInclusive"/>
<enumeration value="minExclusive"/>
<enumeration value="totalDigits"/>
<enumeration value="fractionDigits"/>
<enumeration value="whiteSpace"/>
<enumeration value="maxScale"/>
<enumeration value="minScale"/>
</restriction>
</simpleType>
</attribute>
</complexType>
</element>
<element name="hasProperty">
<annotation>
<documentation>
<xhtml:p> hasProperty is used to signal that the property
given in the name attribute has the value given in the value attribute for the
datatype in which it occurs (and all types derived from it, which do not
override the value of the property). </xhtml:p>
<xhtml:p> Note: this element
may appear in the appinfo of primitive and built-in derived types. </xhtml:p>
<xhtml:p> A schema processor (or the XSLT which generates the HTML version of
the XML Schema Part 2: Datatypes specification) which reads a simpleType
definition should gather the information from any occurances of hasProperty in
that simpleType definition, and then walk up the base type chain gathering
information from any occurances of hasProperty (unless a value was given to the
name in a dervied type) until either it reaches the primitive type at the top
of the chain or it has gathered values for all existing properties. </xhtml:p>
</documentation>
</annotation>
<complexType>
<attribute name="name" use="required">
<simpleType>
<annotation>
<documentation>
<xhtml:p> This datatype names all existing fundamental
facets, otherwise known as properties (with the exception of
<xhtml:em>equality</xhtml:em>, a property which has no
<xhtml:em>value</xhtml:em>). </xhtml:p>
<xhtml:p> Question: should each of
the enumerations below be given a documentation annotation, which would contain
the text to be used in the definition of the properties in the XML Schema Part
2: Datatypes specification? Might be nice to try to collect all of that
information together here. </xhtml:p>
</documentation>
</annotation>
<restriction base="NMTOKEN">
<enumeration value="ordered"/>
<enumeration value="bounded"/>
<enumeration value="cardinality"/>
<enumeration value="numeric"/>
</restriction>
</simpleType>
</attribute>
<attribute name="value" type="normalizedString" use="required"/>
</complexType>
</element>
</schema>

View File

@@ -0,0 +1,37 @@
<?xml version='1.0'?>
<!DOCTYPE xs:schema SYSTEM "XMLSchema.dtd" [
<!ELEMENT p ANY>
<!ELEMENT a ANY>
<!ATTLIST a href CDATA #IMPLIED>
<!ELEMENT hr ANY>
<!ELEMENT h1 ANY>
<!ELEMENT br ANY>
]>
<xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1999/xhtml">
<xs:annotation>
<xs:documentation>
<h1>XML Schema instance namespace</h1>
<p>See <a href="http://www.w3.org/TR/xmlschema-1/">the XML Schema
Recommendation</a> for an introduction</p>
<hr />
$Date: 2001/03/16 20:25:57 $<br />
$Id: XMLSchema-instance.xsd,v 1.4 2001/03/16 20:25:57 ht Exp $
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation><p>This schema should never be used as such:
<a href="http://www.w3.org/TR/xmlschema-1/#no-xsi">the XML
Schema Recommendation</a> forbids the declaration of
attributes in this namespace</p>
</xs:documentation>
</xs:annotation>
<xs:attribute name="nil"/>
<xs:attribute name="type"/>
<xs:attribute name="schemaLocation"/>
<xs:attribute name="noNamespaceSchemaLocation"/>
</xs:schema>

View File

@@ -0,0 +1,402 @@
<!-- DTD for XML Schemas: Part 1: Structures
Public Identifier: "-//W3C//DTD XMLSCHEMA 200102//EN"
Official Location: http://www.w3.org/2001/XMLSchema.dtd -->
<!-- $Id: XMLSchema.dtd,v 1.31 2001/10/24 15:50:16 ht Exp $ -->
<!-- Note this DTD is NOT normative, or even definitive. --> <!--d-->
<!-- prose copy in the structures REC is the definitive version --> <!--d-->
<!-- (which shouldn't differ from this one except for this --> <!--d-->
<!-- comment and entity expansions, but just in case) --> <!--d-->
<!-- With the exception of cases with multiple namespace
prefixes for the XML Schema namespace, any XML document which is
not valid per this DTD given redefinitions in its internal subset of the
'p' and 's' parameter entities below appropriate to its namespace
declaration of the XML Schema namespace is almost certainly not
a valid schema. -->
<!-- The simpleType element and its constituent parts
are defined in XML Schema: Part 2: Datatypes -->
<!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' >
<!ENTITY % p 'xs:'> <!-- can be overriden in the internal subset of a
schema document to establish a different
namespace prefix -->
<!ENTITY % s ':xs'> <!-- if %p is defined (e.g. as foo:) then you must
also define %s as the suffix for the appropriate
namespace declaration (e.g. :foo) -->
<!ENTITY % nds 'xmlns%s;'>
<!-- Define all the element names, with optional prefix -->
<!ENTITY % schema "%p;schema">
<!ENTITY % complexType "%p;complexType">
<!ENTITY % complexContent "%p;complexContent">
<!ENTITY % simpleContent "%p;simpleContent">
<!ENTITY % extension "%p;extension">
<!ENTITY % element "%p;element">
<!ENTITY % unique "%p;unique">
<!ENTITY % key "%p;key">
<!ENTITY % keyref "%p;keyref">
<!ENTITY % selector "%p;selector">
<!ENTITY % field "%p;field">
<!ENTITY % group "%p;group">
<!ENTITY % all "%p;all">
<!ENTITY % choice "%p;choice">
<!ENTITY % sequence "%p;sequence">
<!ENTITY % any "%p;any">
<!ENTITY % anyAttribute "%p;anyAttribute">
<!ENTITY % attribute "%p;attribute">
<!ENTITY % attributeGroup "%p;attributeGroup">
<!ENTITY % include "%p;include">
<!ENTITY % import "%p;import">
<!ENTITY % redefine "%p;redefine">
<!ENTITY % notation "%p;notation">
<!-- annotation elements -->
<!ENTITY % annotation "%p;annotation">
<!ENTITY % appinfo "%p;appinfo">
<!ENTITY % documentation "%p;documentation">
<!-- Customisation entities for the ATTLIST of each element type.
Define one of these if your schema takes advantage of the
anyAttribute='##other' in the schema for schemas -->
<!ENTITY % schemaAttrs ''>
<!ENTITY % complexTypeAttrs ''>
<!ENTITY % complexContentAttrs ''>
<!ENTITY % simpleContentAttrs ''>
<!ENTITY % extensionAttrs ''>
<!ENTITY % elementAttrs ''>
<!ENTITY % groupAttrs ''>
<!ENTITY % allAttrs ''>
<!ENTITY % choiceAttrs ''>
<!ENTITY % sequenceAttrs ''>
<!ENTITY % anyAttrs ''>
<!ENTITY % anyAttributeAttrs ''>
<!ENTITY % attributeAttrs ''>
<!ENTITY % attributeGroupAttrs ''>
<!ENTITY % uniqueAttrs ''>
<!ENTITY % keyAttrs ''>
<!ENTITY % keyrefAttrs ''>
<!ENTITY % selectorAttrs ''>
<!ENTITY % fieldAttrs ''>
<!ENTITY % includeAttrs ''>
<!ENTITY % importAttrs ''>
<!ENTITY % redefineAttrs ''>
<!ENTITY % notationAttrs ''>
<!ENTITY % annotationAttrs ''>
<!ENTITY % appinfoAttrs ''>
<!ENTITY % documentationAttrs ''>
<!ENTITY % complexDerivationSet "CDATA">
<!-- #all or space-separated list drawn from derivationChoice -->
<!ENTITY % blockSet "CDATA">
<!-- #all or space-separated list drawn from
derivationChoice + 'substitution' -->
<!ENTITY % mgs '%all; | %choice; | %sequence;'>
<!ENTITY % cs '%choice; | %sequence;'>
<!ENTITY % formValues '(qualified|unqualified)'>
<!ENTITY % attrDecls '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'>
<!ENTITY % particleAndAttrs '((%mgs; | %group;)?, %attrDecls;)'>
<!-- This is used in part2 -->
<!ENTITY % restriction1 '((%mgs; | %group;)?)'>
%xs-datatypes;
<!-- the duplication below is to produce an unambiguous content model
which allows annotation everywhere -->
<!ELEMENT %schema; ((%include; | %import; | %redefine; | %annotation;)*,
((%simpleType; | %complexType;
| %element; | %attribute;
| %attributeGroup; | %group;
| %notation; ),
(%annotation;)*)* )>
<!ATTLIST %schema;
targetNamespace %URIref; #IMPLIED
version CDATA #IMPLIED
%nds; %URIref; #FIXED 'http://www.w3.org/2001/XMLSchema'
xmlns CDATA #IMPLIED
finalDefault %complexDerivationSet; ''
blockDefault %blockSet; ''
id ID #IMPLIED
elementFormDefault %formValues; 'unqualified'
attributeFormDefault %formValues; 'unqualified'
xml:lang CDATA #IMPLIED
%schemaAttrs;>
<!-- Note the xmlns declaration is NOT in the Schema for Schemas,
because at the Infoset level where schemas operate,
xmlns(:prefix) is NOT an attribute! -->
<!-- The declaration of xmlns is a convenience for schema authors -->
<!-- The id attribute here and below is for use in external references
from non-schemas using simple fragment identifiers.
It is NOT used for schema-to-schema reference, internal or
external. -->
<!-- a type is a named content type specification which allows attribute
declarations-->
<!-- -->
<!ELEMENT %complexType; ((%annotation;)?,
(%simpleContent;|%complexContent;|
%particleAndAttrs;))>
<!ATTLIST %complexType;
name %NCName; #IMPLIED
id ID #IMPLIED
abstract %boolean; #IMPLIED
final %complexDerivationSet; #IMPLIED
block %complexDerivationSet; #IMPLIED
mixed (true|false) 'false'
%complexTypeAttrs;>
<!-- particleAndAttrs is shorthand for a root type -->
<!-- mixed is disallowed if simpleContent, overriden if complexContent
has one too. -->
<!-- If anyAttribute appears in one or more referenced attributeGroups
and/or explicitly, the intersection of the permissions is used -->
<!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))>
<!ATTLIST %complexContent;
mixed (true|false) #IMPLIED
id ID #IMPLIED
%complexContentAttrs;>
<!-- restriction should use the branch defined above, not the simple
one from part2; extension should use the full model -->
<!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))>
<!ATTLIST %simpleContent;
id ID #IMPLIED
%simpleContentAttrs;>
<!-- restriction should use the simple branch from part2, not the
one defined above; extension should have no particle -->
<!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))>
<!ATTLIST %extension;
base %QName; #REQUIRED
id ID #IMPLIED
%extensionAttrs;>
<!-- an element is declared by either:
a name and a type (either nested or referenced via the type attribute)
or a ref to an existing element declaration -->
<!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,
(%unique; | %key; | %keyref;)*)>
<!-- simpleType or complexType only if no type|ref attribute -->
<!-- ref not allowed at top level -->
<!ATTLIST %element;
name %NCName; #IMPLIED
id ID #IMPLIED
ref %QName; #IMPLIED
type %QName; #IMPLIED
minOccurs %nonNegativeInteger; #IMPLIED
maxOccurs CDATA #IMPLIED
nillable %boolean; #IMPLIED
substitutionGroup %QName; #IMPLIED
abstract %boolean; #IMPLIED
final %complexDerivationSet; #IMPLIED
block %blockSet; #IMPLIED
default CDATA #IMPLIED
fixed CDATA #IMPLIED
form %formValues; #IMPLIED
%elementAttrs;>
<!-- type and ref are mutually exclusive.
name and ref are mutually exclusive, one is required -->
<!-- In the absence of type AND ref, type defaults to type of
substitutionGroup, if any, else the ur-type, i.e. unconstrained -->
<!-- default and fixed are mutually exclusive -->
<!ELEMENT %group; ((%annotation;)?,(%mgs;)?)>
<!ATTLIST %group;
name %NCName; #IMPLIED
ref %QName; #IMPLIED
minOccurs %nonNegativeInteger; #IMPLIED
maxOccurs CDATA #IMPLIED
id ID #IMPLIED
%groupAttrs;>
<!ELEMENT %all; ((%annotation;)?, (%element;)*)>
<!ATTLIST %all;
minOccurs (1) #IMPLIED
maxOccurs (1) #IMPLIED
id ID #IMPLIED
%allAttrs;>
<!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
<!ATTLIST %choice;
minOccurs %nonNegativeInteger; #IMPLIED
maxOccurs CDATA #IMPLIED
id ID #IMPLIED
%choiceAttrs;>
<!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
<!ATTLIST %sequence;
minOccurs %nonNegativeInteger; #IMPLIED
maxOccurs CDATA #IMPLIED
id ID #IMPLIED
%sequenceAttrs;>
<!-- an anonymous grouping in a model, or
a top-level named group definition, or a reference to same -->
<!-- Note that if order is 'all', group is not allowed inside.
If order is 'all' THIS group must be alone (or referenced alone) at
the top level of a content model -->
<!-- If order is 'all', minOccurs==maxOccurs==1 on element/any inside -->
<!-- Should allow minOccurs=0 inside order='all' . . . -->
<!ELEMENT %any; (%annotation;)?>
<!ATTLIST %any;
namespace CDATA '##any'
processContents (skip|lax|strict) 'strict'
minOccurs %nonNegativeInteger; '1'
maxOccurs CDATA '1'
id ID #IMPLIED
%anyAttrs;>
<!-- namespace is interpreted as follows:
##any - - any non-conflicting WFXML at all
##other - - any non-conflicting WFXML from namespace other
than targetNamespace
##local - - any unqualified non-conflicting WFXML/attribute
one or - - any non-conflicting WFXML from
more URI the listed namespaces
references
##targetNamespace ##local may appear in the above list,
with the obvious meaning -->
<!ELEMENT %anyAttribute; (%annotation;)?>
<!ATTLIST %anyAttribute;
namespace CDATA '##any'
processContents (skip|lax|strict) 'strict'
id ID #IMPLIED
%anyAttributeAttrs;>
<!-- namespace is interpreted as for 'any' above -->
<!-- simpleType only if no type|ref attribute -->
<!-- ref not allowed at top level, name iff at top level -->
<!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)>
<!ATTLIST %attribute;
name %NCName; #IMPLIED
id ID #IMPLIED
ref %QName; #IMPLIED
type %QName; #IMPLIED
use (prohibited|optional|required) #IMPLIED
default CDATA #IMPLIED
fixed CDATA #IMPLIED
form %formValues; #IMPLIED
%attributeAttrs;>
<!-- type and ref are mutually exclusive.
name and ref are mutually exclusive, one is required -->
<!-- default for use is optional when nested, none otherwise -->
<!-- default and fixed are mutually exclusive -->
<!-- type attr and simpleType content are mutually exclusive -->
<!-- an attributeGroup is a named collection of attribute decls, or a
reference thereto -->
<!ELEMENT %attributeGroup; ((%annotation;)?,
(%attribute; | %attributeGroup;)*,
(%anyAttribute;)?) >
<!ATTLIST %attributeGroup;
name %NCName; #IMPLIED
id ID #IMPLIED
ref %QName; #IMPLIED
%attributeGroupAttrs;>
<!-- ref iff no content, no name. ref iff not top level -->
<!-- better reference mechanisms -->
<!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)>
<!ATTLIST %unique;
name %NCName; #REQUIRED
id ID #IMPLIED
%uniqueAttrs;>
<!ELEMENT %key; ((%annotation;)?, %selector;, (%field;)+)>
<!ATTLIST %key;
name %NCName; #REQUIRED
id ID #IMPLIED
%keyAttrs;>
<!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)>
<!ATTLIST %keyref;
name %NCName; #REQUIRED
refer %QName; #REQUIRED
id ID #IMPLIED
%keyrefAttrs;>
<!ELEMENT %selector; ((%annotation;)?)>
<!ATTLIST %selector;
xpath %XPathExpr; #REQUIRED
id ID #IMPLIED
%selectorAttrs;>
<!ELEMENT %field; ((%annotation;)?)>
<!ATTLIST %field;
xpath %XPathExpr; #REQUIRED
id ID #IMPLIED
%fieldAttrs;>
<!-- Schema combination mechanisms -->
<!ELEMENT %include; (%annotation;)?>
<!ATTLIST %include;
schemaLocation %URIref; #REQUIRED
id ID #IMPLIED
%includeAttrs;>
<!ELEMENT %import; (%annotation;)?>
<!ATTLIST %import;
namespace %URIref; #IMPLIED
schemaLocation %URIref; #IMPLIED
id ID #IMPLIED
%importAttrs;>
<!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
%attributeGroup; | %group;)*>
<!ATTLIST %redefine;
schemaLocation %URIref; #REQUIRED
id ID #IMPLIED
%redefineAttrs;>
<!ELEMENT %notation; (%annotation;)?>
<!ATTLIST %notation;
name %NCName; #REQUIRED
id ID #IMPLIED
public CDATA #REQUIRED
system %URIref; #IMPLIED
%notationAttrs;>
<!-- Annotation is either application information or documentation -->
<!-- By having these here they are available for datatypes as well
as all the structures elements -->
<!ELEMENT %annotation; (%appinfo; | %documentation;)*>
<!ATTLIST %annotation; %annotationAttrs;>
<!-- User must define annotation elements in internal subset for this
to work -->
<!ELEMENT %appinfo; ANY> <!-- too restrictive -->
<!ATTLIST %appinfo;
source %URIref; #IMPLIED
id ID #IMPLIED
%appinfoAttrs;>
<!ELEMENT %documentation; ANY> <!-- too restrictive -->
<!ATTLIST %documentation;
source %URIref; #IMPLIED
id ID #IMPLIED
xml:lang CDATA #IMPLIED
%documentationAttrs;>
<!NOTATION XMLSchemaStructures PUBLIC
'structures' 'http://www.w3.org/2001/XMLSchema.xsd' >
<!NOTATION XML PUBLIC
'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' >

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uri name="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd" uri="xmldsig-core-schema.xsd"/>
<uri name="http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/xenc-schema.xsd" uri="xenc-schema.xsd"/>
</catalog>

View File

@@ -0,0 +1,203 @@
<!--
DTD for XML Schemas: Part 2: Datatypes
$Id: datatypes.dtd,v 1.23 2001/03/16 17:36:30 ht Exp $
Note this DTD is NOT normative, or even definitive. - - the
prose copy in the datatypes REC is the definitive version
(which shouldn't differ from this one except for this comment
and entity expansions, but just in case)
-->
<!--
This DTD cannot be used on its own, it is intended
only for incorporation in XMLSchema.dtd, q.v.
-->
<!-- Define all the element names, with optional prefix -->
<!ENTITY % simpleType "%p;simpleType">
<!ENTITY % restriction "%p;restriction">
<!ENTITY % list "%p;list">
<!ENTITY % union "%p;union">
<!ENTITY % maxExclusive "%p;maxExclusive">
<!ENTITY % minExclusive "%p;minExclusive">
<!ENTITY % maxInclusive "%p;maxInclusive">
<!ENTITY % minInclusive "%p;minInclusive">
<!ENTITY % totalDigits "%p;totalDigits">
<!ENTITY % fractionDigits "%p;fractionDigits">
<!ENTITY % length "%p;length">
<!ENTITY % minLength "%p;minLength">
<!ENTITY % maxLength "%p;maxLength">
<!ENTITY % enumeration "%p;enumeration">
<!ENTITY % whiteSpace "%p;whiteSpace">
<!ENTITY % pattern "%p;pattern">
<!--
Customisation entities for the ATTLIST of each element
type. Define one of these if your schema takes advantage
of the anyAttribute='##other' in the schema for schemas
-->
<!ENTITY % simpleTypeAttrs "">
<!ENTITY % restrictionAttrs "">
<!ENTITY % listAttrs "">
<!ENTITY % unionAttrs "">
<!ENTITY % maxExclusiveAttrs "">
<!ENTITY % minExclusiveAttrs "">
<!ENTITY % maxInclusiveAttrs "">
<!ENTITY % minInclusiveAttrs "">
<!ENTITY % totalDigitsAttrs "">
<!ENTITY % fractionDigitsAttrs "">
<!ENTITY % lengthAttrs "">
<!ENTITY % minLengthAttrs "">
<!ENTITY % maxLengthAttrs "">
<!ENTITY % enumerationAttrs "">
<!ENTITY % whiteSpaceAttrs "">
<!ENTITY % patternAttrs "">
<!-- Define some entities for informative use as attribute
types -->
<!ENTITY % URIref "CDATA">
<!ENTITY % XPathExpr "CDATA">
<!ENTITY % QName "NMTOKEN">
<!ENTITY % QNames "NMTOKENS">
<!ENTITY % NCName "NMTOKEN">
<!ENTITY % nonNegativeInteger "NMTOKEN">
<!ENTITY % boolean "(true|false)">
<!ENTITY % simpleDerivationSet "CDATA">
<!--
#all or space-separated list drawn from derivationChoice
-->
<!--
Note that the use of 'facet' below is less restrictive
than is really intended: There should in fact be no
more than one of each of minInclusive, minExclusive,
maxInclusive, maxExclusive, totalDigits, fractionDigits,
length, maxLength, minLength within datatype,
and the min- and max- variants of Inclusive and Exclusive
are mutually exclusive. On the other hand, pattern and
enumeration may repeat.
-->
<!ENTITY % minBound "(%minInclusive; | %minExclusive;)">
<!ENTITY % maxBound "(%maxInclusive; | %maxExclusive;)">
<!ENTITY % bounds "%minBound; | %maxBound;">
<!ENTITY % numeric "%totalDigits; | %fractionDigits;">
<!ENTITY % ordered "%bounds; | %numeric;">
<!ENTITY % unordered
"%pattern; | %enumeration; | %whiteSpace; | %length; |
%maxLength; | %minLength;">
<!ENTITY % facet "%ordered; | %unordered;">
<!ENTITY % facetAttr
"value CDATA #REQUIRED
id ID #IMPLIED">
<!ENTITY % fixedAttr "fixed %boolean; #IMPLIED">
<!ENTITY % facetModel "(%annotation;)?">
<!ELEMENT %simpleType;
((%annotation;)?, (%restriction; | %list; | %union;))>
<!ATTLIST %simpleType;
name %NCName; #IMPLIED
final %simpleDerivationSet; #IMPLIED
id ID #IMPLIED
%simpleTypeAttrs;>
<!-- name is required at top level -->
<!ELEMENT %restriction; ((%annotation;)?,
(%restriction1; |
((%simpleType;)?,(%facet;)*)),
(%attrDecls;))>
<!ATTLIST %restriction;
base %QName; #IMPLIED
id ID #IMPLIED
%restrictionAttrs;>
<!--
base and simpleType child are mutually exclusive,
one is required.
restriction is shared between simpleType and
simpleContent and complexContent (in XMLSchema.xsd).
restriction1 is for the latter cases, when this
is restricting a complex type, as is attrDecls.
-->
<!ELEMENT %list; ((%annotation;)?,(%simpleType;)?)>
<!ATTLIST %list;
itemType %QName; #IMPLIED
id ID #IMPLIED
%listAttrs;>
<!--
itemType and simpleType child are mutually exclusive,
one is required
-->
<!ELEMENT %union; ((%annotation;)?,(%simpleType;)*)>
<!ATTLIST %union;
id ID #IMPLIED
memberTypes %QNames; #IMPLIED
%unionAttrs;>
<!--
At least one item in memberTypes or one simpleType
child is required
-->
<!ELEMENT %maxExclusive; %facetModel;>
<!ATTLIST %maxExclusive;
%facetAttr;
%fixedAttr;
%maxExclusiveAttrs;>
<!ELEMENT %minExclusive; %facetModel;>
<!ATTLIST %minExclusive;
%facetAttr;
%fixedAttr;
%minExclusiveAttrs;>
<!ELEMENT %maxInclusive; %facetModel;>
<!ATTLIST %maxInclusive;
%facetAttr;
%fixedAttr;
%maxInclusiveAttrs;>
<!ELEMENT %minInclusive; %facetModel;>
<!ATTLIST %minInclusive;
%facetAttr;
%fixedAttr;
%minInclusiveAttrs;>
<!ELEMENT %totalDigits; %facetModel;>
<!ATTLIST %totalDigits;
%facetAttr;
%fixedAttr;
%totalDigitsAttrs;>
<!ELEMENT %fractionDigits; %facetModel;>
<!ATTLIST %fractionDigits;
%facetAttr;
%fixedAttr;
%fractionDigitsAttrs;>
<!ELEMENT %length; %facetModel;>
<!ATTLIST %length;
%facetAttr;
%fixedAttr;
%lengthAttrs;>
<!ELEMENT %minLength; %facetModel;>
<!ATTLIST %minLength;
%facetAttr;
%fixedAttr;
%minLengthAttrs;>
<!ELEMENT %maxLength; %facetModel;>
<!ATTLIST %maxLength;
%facetAttr;
%fixedAttr;
%maxLengthAttrs;>
<!-- This one can be repeated -->
<!ELEMENT %enumeration; %facetModel;>
<!ATTLIST %enumeration;
%facetAttr;
%enumerationAttrs;>
<!ELEMENT %whiteSpace; %facetModel;>
<!ATTLIST %whiteSpace;
%facetAttr;
%fixedAttr;
%whiteSpaceAttrs;>
<!-- This one can be repeated -->
<!ELEMENT %pattern; %facetModel;>
<!ATTLIST %pattern;
%facetAttr;
%patternAttrs;>

View File

@@ -0,0 +1,283 @@
<?xml version="1.0" encoding="US-ASCII"?>
<schema
targetNamespace="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
elementFormDefault="unqualified"
attributeFormDefault="unqualified"
blockDefault="substitution"
version="2.0">
<import namespace="http://www.w3.org/2000/09/xmldsig#"
schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
<import namespace="http://www.w3.org/2001/04/xmlenc#"
schemaLocation="http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/xenc-schema.xsd"/>
<annotation>
<documentation>
Document identifier: saml-schema-assertion-2.0
Location: http://docs.oasis-open.org/security/saml/v2.0/
Revision history:
V1.0 (November, 2002):
Initial Standard Schema.
V1.1 (September, 2003):
Updates within the same V1.0 namespace.
V2.0 (March, 2005):
New assertion schema for SAML V2.0 namespace.
</documentation>
</annotation>
<attributeGroup name="IDNameQualifiers">
<attribute name="NameQualifier" type="string" use="optional"/>
<attribute name="SPNameQualifier" type="string" use="optional"/>
</attributeGroup>
<element name="BaseID" type="saml:BaseIDAbstractType"/>
<complexType name="BaseIDAbstractType" abstract="true">
<attributeGroup ref="saml:IDNameQualifiers"/>
</complexType>
<element name="NameID" type="saml:NameIDType"/>
<complexType name="NameIDType">
<simpleContent>
<extension base="string">
<attributeGroup ref="saml:IDNameQualifiers"/>
<attribute name="Format" type="anyURI" use="optional"/>
<attribute name="SPProvidedID" type="string" use="optional"/>
</extension>
</simpleContent>
</complexType>
<complexType name="EncryptedElementType">
<sequence>
<element ref="xenc:EncryptedData"/>
<element ref="xenc:EncryptedKey" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<element name="EncryptedID" type="saml:EncryptedElementType"/>
<element name="Issuer" type="saml:NameIDType"/>
<element name="AssertionIDRef" type="NCName"/>
<element name="AssertionURIRef" type="anyURI"/>
<element name="Assertion" type="saml:AssertionType"/>
<complexType name="AssertionType">
<sequence>
<element ref="saml:Issuer"/>
<element ref="ds:Signature" minOccurs="0"/>
<element ref="saml:Subject" minOccurs="0"/>
<element ref="saml:Conditions" minOccurs="0"/>
<element ref="saml:Advice" minOccurs="0"/>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="saml:Statement"/>
<element ref="saml:AuthnStatement"/>
<element ref="saml:AuthzDecisionStatement"/>
<element ref="saml:AttributeStatement"/>
</choice>
</sequence>
<attribute name="Version" type="string" use="required"/>
<attribute name="ID" type="ID" use="required"/>
<attribute name="IssueInstant" type="dateTime" use="required"/>
</complexType>
<element name="Subject" type="saml:SubjectType"/>
<complexType name="SubjectType">
<choice>
<sequence>
<choice>
<element ref="saml:BaseID"/>
<element ref="saml:NameID"/>
<element ref="saml:EncryptedID"/>
</choice>
<element ref="saml:SubjectConfirmation" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<element ref="saml:SubjectConfirmation" maxOccurs="unbounded"/>
</choice>
</complexType>
<element name="SubjectConfirmation" type="saml:SubjectConfirmationType"/>
<complexType name="SubjectConfirmationType">
<sequence>
<choice minOccurs="0">
<element ref="saml:BaseID"/>
<element ref="saml:NameID"/>
<element ref="saml:EncryptedID"/>
</choice>
<element ref="saml:SubjectConfirmationData" minOccurs="0"/>
</sequence>
<attribute name="Method" type="anyURI" use="required"/>
</complexType>
<element name="SubjectConfirmationData" type="saml:SubjectConfirmationDataType"/>
<complexType name="SubjectConfirmationDataType" mixed="true">
<complexContent>
<restriction base="anyType">
<sequence>
<any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="NotBefore" type="dateTime" use="optional"/>
<attribute name="NotOnOrAfter" type="dateTime" use="optional"/>
<attribute name="Recipient" type="anyURI" use="optional"/>
<attribute name="InResponseTo" type="NCName" use="optional"/>
<attribute name="Address" type="string" use="optional"/>
<anyAttribute namespace="##other" processContents="lax"/>
</restriction>
</complexContent>
</complexType>
<complexType name="KeyInfoConfirmationDataType" mixed="false">
<complexContent>
<restriction base="saml:SubjectConfirmationDataType">
<sequence>
<element ref="ds:KeyInfo" maxOccurs="unbounded"/>
</sequence>
</restriction>
</complexContent>
</complexType>
<element name="Conditions" type="saml:ConditionsType"/>
<complexType name="ConditionsType">
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="saml:Condition"/>
<element ref="saml:AudienceRestriction"/>
<element ref="saml:OneTimeUse"/>
<element ref="saml:ProxyRestriction"/>
</choice>
<attribute name="NotBefore" type="dateTime" use="optional"/>
<attribute name="NotOnOrAfter" type="dateTime" use="optional"/>
</complexType>
<element name="Condition" type="saml:ConditionAbstractType"/>
<complexType name="ConditionAbstractType" abstract="true"/>
<element name="AudienceRestriction" type="saml:AudienceRestrictionType"/>
<complexType name="AudienceRestrictionType">
<complexContent>
<extension base="saml:ConditionAbstractType">
<sequence>
<element ref="saml:Audience" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<element name="Audience" type="anyURI"/>
<element name="OneTimeUse" type="saml:OneTimeUseType" />
<complexType name="OneTimeUseType">
<complexContent>
<extension base="saml:ConditionAbstractType"/>
</complexContent>
</complexType>
<element name="ProxyRestriction" type="saml:ProxyRestrictionType"/>
<complexType name="ProxyRestrictionType">
<complexContent>
<extension base="saml:ConditionAbstractType">
<sequence>
<element ref="saml:Audience" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Count" type="nonNegativeInteger" use="optional"/>
</extension>
</complexContent>
</complexType>
<element name="Advice" type="saml:AdviceType"/>
<complexType name="AdviceType">
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="saml:AssertionIDRef"/>
<element ref="saml:AssertionURIRef"/>
<element ref="saml:Assertion"/>
<element ref="saml:EncryptedAssertion"/>
<any namespace="##other" processContents="lax"/>
</choice>
</complexType>
<element name="EncryptedAssertion" type="saml:EncryptedElementType"/>
<element name="Statement" type="saml:StatementAbstractType"/>
<complexType name="StatementAbstractType" abstract="true"/>
<element name="AuthnStatement" type="saml:AuthnStatementType"/>
<complexType name="AuthnStatementType">
<complexContent>
<extension base="saml:StatementAbstractType">
<sequence>
<element ref="saml:SubjectLocality" minOccurs="0"/>
<element ref="saml:AuthnContext"/>
</sequence>
<attribute name="AuthnInstant" type="dateTime" use="required"/>
<attribute name="SessionIndex" type="string" use="optional"/>
<attribute name="SessionNotOnOrAfter" type="dateTime" use="optional"/>
</extension>
</complexContent>
</complexType>
<element name="SubjectLocality" type="saml:SubjectLocalityType"/>
<complexType name="SubjectLocalityType">
<attribute name="Address" type="string" use="optional"/>
<attribute name="DNSName" type="string" use="optional"/>
</complexType>
<element name="AuthnContext" type="saml:AuthnContextType"/>
<complexType name="AuthnContextType">
<sequence>
<choice>
<sequence>
<element ref="saml:AuthnContextClassRef"/>
<choice minOccurs="0">
<element ref="saml:AuthnContextDecl"/>
<element ref="saml:AuthnContextDeclRef"/>
</choice>
</sequence>
<choice>
<element ref="saml:AuthnContextDecl"/>
<element ref="saml:AuthnContextDeclRef"/>
</choice>
</choice>
<element ref="saml:AuthenticatingAuthority" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<element name="AuthnContextClassRef" type="anyURI"/>
<element name="AuthnContextDeclRef" type="anyURI"/>
<element name="AuthnContextDecl" type="anyType"/>
<element name="AuthenticatingAuthority" type="anyURI"/>
<element name="AuthzDecisionStatement" type="saml:AuthzDecisionStatementType"/>
<complexType name="AuthzDecisionStatementType">
<complexContent>
<extension base="saml:StatementAbstractType">
<sequence>
<element ref="saml:Action" maxOccurs="unbounded"/>
<element ref="saml:Evidence" minOccurs="0"/>
</sequence>
<attribute name="Resource" type="anyURI" use="required"/>
<attribute name="Decision" type="saml:DecisionType" use="required"/>
</extension>
</complexContent>
</complexType>
<simpleType name="DecisionType">
<restriction base="string">
<enumeration value="Permit"/>
<enumeration value="Deny"/>
<enumeration value="Indeterminate"/>
</restriction>
</simpleType>
<element name="Action" type="saml:ActionType"/>
<complexType name="ActionType">
<simpleContent>
<extension base="string">
<attribute name="Namespace" type="anyURI" use="required"/>
</extension>
</simpleContent>
</complexType>
<element name="Evidence" type="saml:EvidenceType"/>
<complexType name="EvidenceType">
<choice maxOccurs="unbounded">
<element ref="saml:AssertionIDRef"/>
<element ref="saml:AssertionURIRef"/>
<element ref="saml:Assertion"/>
<element ref="saml:EncryptedAssertion"/>
</choice>
</complexType>
<element name="AttributeStatement" type="saml:AttributeStatementType"/>
<complexType name="AttributeStatementType">
<complexContent>
<extension base="saml:StatementAbstractType">
<choice maxOccurs="unbounded">
<element ref="saml:Attribute"/>
<element ref="saml:EncryptedAttribute"/>
</choice>
</extension>
</complexContent>
</complexType>
<element name="Attribute" type="saml:AttributeType"/>
<complexType name="AttributeType">
<sequence>
<element ref="saml:AttributeValue" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Name" type="string" use="required"/>
<attribute name="NameFormat" type="anyURI" use="optional"/>
<attribute name="FriendlyName" type="string" use="optional"/>
<anyAttribute namespace="##other" processContents="lax"/>
</complexType>
<element name="AttributeValue" type="anyType" nillable="true"/>
<element name="EncryptedAttribute" type="saml:EncryptedElementType"/>
</schema>

View File

@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "XMLSchema.dtd" [
<!ATTLIST schema
xmlns:xenc CDATA #FIXED 'http://www.w3.org/2001/04/xmlenc#'
xmlns:ds CDATA #FIXED 'http://www.w3.org/2000/09/xmldsig#'>
<!ENTITY xenc 'http://www.w3.org/2001/04/xmlenc#'>
<!ENTITY % p ''>
<!ENTITY % s ''>
]>
<schema xmlns="http://www.w3.org/2001/XMLSchema" version="1.0" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.w3.org/2001/04/xmlenc#" elementFormDefault="qualified">
<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>
<complexType name="EncryptedType" abstract="true">
<sequence>
<element name="EncryptionMethod" type="xenc:EncryptionMethodType" minOccurs="0"/>
<element ref="ds:KeyInfo" minOccurs="0"/>
<element ref="xenc:CipherData"/>
<element ref="xenc:EncryptionProperties" minOccurs="0"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="Type" type="anyURI" use="optional"/>
<attribute name="MimeType" type="string" use="optional"/>
<attribute name="Encoding" type="anyURI" use="optional"/>
</complexType>
<complexType name="EncryptionMethodType" mixed="true">
<sequence>
<element name="KeySize" minOccurs="0" type="xenc:KeySizeType"/>
<element name="OAEPparams" minOccurs="0" type="base64Binary"/>
<any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<simpleType name="KeySizeType">
<restriction base="integer"/>
</simpleType>
<element name="CipherData" type="xenc:CipherDataType"/>
<complexType name="CipherDataType">
<choice>
<element name="CipherValue" type="base64Binary"/>
<element ref="xenc:CipherReference"/>
</choice>
</complexType>
<element name="CipherReference" type="xenc:CipherReferenceType"/>
<complexType name="CipherReferenceType">
<choice>
<element name="Transforms" type="xenc:TransformsType" minOccurs="0"/>
</choice>
<attribute name="URI" type="anyURI" use="required"/>
</complexType>
<complexType name="TransformsType">
<sequence>
<element ref="ds:Transform" maxOccurs="unbounded"/>
</sequence>
</complexType>
<element name="EncryptedData" type="xenc:EncryptedDataType"/>
<complexType name="EncryptedDataType">
<complexContent>
<extension base="xenc:EncryptedType">
</extension>
</complexContent>
</complexType>
<!-- Children of ds:KeyInfo -->
<element name="EncryptedKey" type="xenc:EncryptedKeyType"/>
<complexType name="EncryptedKeyType">
<complexContent>
<extension base="xenc:EncryptedType">
<sequence>
<element ref="xenc:ReferenceList" minOccurs="0"/>
<element name="CarriedKeyName" type="string" minOccurs="0"/>
</sequence>
<attribute name="Recipient" type="string" use="optional"/>
</extension>
</complexContent>
</complexType>
<element name="AgreementMethod" type="xenc:AgreementMethodType"/>
<complexType name="AgreementMethodType" mixed="true">
<sequence>
<element name="KA-Nonce" minOccurs="0" type="base64Binary"/>
<!-- <element ref="ds:DigestMethod" minOccurs="0"/> -->
<any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
<element name="OriginatorKeyInfo" minOccurs="0" type="ds:KeyInfoType"/>
<element name="RecipientKeyInfo" minOccurs="0" type="ds:KeyInfoType"/>
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<!-- End Children of ds:KeyInfo -->
<element name="ReferenceList">
<complexType>
<choice minOccurs="1" maxOccurs="unbounded">
<element name="DataReference" type="xenc:ReferenceType"/>
<element name="KeyReference" type="xenc:ReferenceType"/>
</choice>
</complexType>
</element>
<complexType name="ReferenceType">
<sequence>
<any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="URI" type="anyURI" use="required"/>
</complexType>
<element name="EncryptionProperties" type="xenc:EncryptionPropertiesType"/>
<complexType name="EncryptionPropertiesType">
<sequence>
<element ref="xenc:EncryptionProperty" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="EncryptionProperty" type="xenc:EncryptionPropertyType"/>
<complexType name="EncryptionPropertyType" mixed="true">
<choice maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/>
</choice>
<attribute name="Target" type="anyURI" use="optional"/>
<attribute name="Id" type="ID" use="optional"/>
<anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/>
</complexType>
</schema>

View File

@@ -0,0 +1,287 @@
<?xml version='1.0'?>
<?xml-stylesheet href="../2008/09/xsd.xsl" type="text/xsl"?>
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns ="http://www.w3.org/1999/xhtml"
xml:lang="en">
<xs:annotation>
<xs:documentation>
<div>
<h1>About the XML namespace</h1>
<div class="bodytext">
<p>
This schema document describes the XML namespace, in a form
suitable for import by other schema documents.
</p>
<p>
See <a href="http://www.w3.org/XML/1998/namespace.html">
http://www.w3.org/XML/1998/namespace.html</a> and
<a href="http://www.w3.org/TR/REC-xml">
http://www.w3.org/TR/REC-xml</a> for information
about this namespace.
</p>
<p>
Note that local names in this namespace are intended to be
defined only by the World Wide Web Consortium or its subgroups.
The names currently defined in this namespace are listed below.
They should not be used with conflicting semantics by any Working
Group, specification, or document instance.
</p>
<p>
See further below in this document for more information about <a
href="#usage">how to refer to this schema document from your own
XSD schema documents</a> and about <a href="#nsversioning">the
namespace-versioning policy governing this schema document</a>.
</p>
</div>
</div>
</xs:documentation>
</xs:annotation>
<xs:attribute name="lang">
<xs:annotation>
<xs:documentation>
<div>
<h3>lang (as an attribute name)</h3>
<p>
denotes an attribute whose value
is a language code for the natural language of the content of
any element; its value is inherited. This name is reserved
by virtue of its definition in the XML specification.</p>
</div>
<div>
<h4>Notes</h4>
<p>
Attempting to install the relevant ISO 2- and 3-letter
codes as the enumerated possible values is probably never
going to be a realistic possibility.
</p>
<p>
See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">
http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a>
and the IANA language subtag registry at
<a href="http://www.iana.org/assignments/language-subtag-registry">
http://www.iana.org/assignments/language-subtag-registry</a>
for further information.
</p>
<p>
The union allows for the 'un-declaration' of xml:lang with
the empty string.
</p>
</div>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:union memberTypes="xs:language">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value=""/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="space">
<xs:annotation>
<xs:documentation>
<div>
<h3>space (as an attribute name)</h3>
<p>
denotes an attribute whose
value is a keyword indicating what whitespace processing
discipline is intended for the content of the element; its
value is inherited. This name is reserved by virtue of its
definition in the XML specification.</p>
</div>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NCName">
<xs:enumeration value="default"/>
<xs:enumeration value="preserve"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="base" type="xs:anyURI"> <xs:annotation>
<xs:documentation>
<div>
<h3>base (as an attribute name)</h3>
<p>
denotes an attribute whose value
provides a URI to be used as the base for interpreting any
relative URIs in the scope of the element on which it
appears; its value is inherited. This name is reserved
by virtue of its definition in the XML Base specification.</p>
<p>
See <a
href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a>
for information about this attribute.
</p>
</div>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="id" type="xs:ID">
<xs:annotation>
<xs:documentation>
<div>
<h3>id (as an attribute name)</h3>
<p>
denotes an attribute whose value
should be interpreted as if declared to be of type ID.
This name is reserved by virtue of its definition in the
xml:id specification.</p>
<p>
See <a
href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a>
for information about this attribute.
</p>
</div>
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup name="specialAttrs">
<xs:attribute ref="xml:base"/>
<xs:attribute ref="xml:lang"/>
<xs:attribute ref="xml:space"/>
<xs:attribute ref="xml:id"/>
</xs:attributeGroup>
<xs:annotation>
<xs:documentation>
<div>
<h3>Father (in any context at all)</h3>
<div class="bodytext">
<p>
denotes Jon Bosak, the chair of
the original XML Working Group. This name is reserved by
the following decision of the W3C XML Plenary and
XML Coordination groups:
</p>
<blockquote>
<p>
In appreciation for his vision, leadership and
dedication the W3C XML Plenary on this 10th day of
February, 2000, reserves for Jon Bosak in perpetuity
the XML name "xml:Father".
</p>
</blockquote>
</div>
</div>
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>
<div xml:id="usage" id="usage">
<h2><a name="usage">About this schema document</a></h2>
<div class="bodytext">
<p>
This schema defines attributes and an attribute group suitable
for use by schemas wishing to allow <code>xml:base</code>,
<code>xml:lang</code>, <code>xml:space</code> or
<code>xml:id</code> attributes on elements they define.
</p>
<p>
To enable this, such a schema must import this schema for
the XML namespace, e.g. as follows:
</p>
<pre>
&lt;schema . . .>
. . .
&lt;import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
</pre>
<p>
or
</p>
<pre>
&lt;import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
</pre>
<p>
Subsequently, qualified reference to any of the attributes or the
group defined below will have the desired effect, e.g.
</p>
<pre>
&lt;type . . .>
. . .
&lt;attributeGroup ref="xml:specialAttrs"/>
</pre>
<p>
will define a type which will schema-validate an instance element
with any of those attributes.
</p>
</div>
</div>
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>
<div id="nsversioning" xml:id="nsversioning">
<h2><a name="nsversioning">Versioning policy for this schema document</a></h2>
<div class="bodytext">
<p>
In keeping with the XML Schema WG's standard versioning
policy, this schema document will persist at
<a href="http://www.w3.org/2009/01/xml.xsd">
http://www.w3.org/2009/01/xml.xsd</a>.
</p>
<p>
At the date of issue it can also be found at
<a href="http://www.w3.org/2001/xml.xsd">
http://www.w3.org/2001/xml.xsd</a>.
</p>
<p>
The schema document at that URI may however change in the future,
in order to remain compatible with the latest version of XML
Schema itself, or with the XML namespace itself. In other words,
if the XML Schema or XML namespaces change, the version of this
document at <a href="http://www.w3.org/2001/xml.xsd">
http://www.w3.org/2001/xml.xsd
</a>
will change accordingly; the version at
<a href="http://www.w3.org/2009/01/xml.xsd">
http://www.w3.org/2009/01/xml.xsd
</a>
will not change.
</p>
<p>
Previous dated (and unchanging) versions of this schema
document are at:
</p>
<ul>
<li><a href="http://www.w3.org/2009/01/xml.xsd">
http://www.w3.org/2009/01/xml.xsd</a></li>
<li><a href="http://www.w3.org/2007/08/xml.xsd">
http://www.w3.org/2007/08/xml.xsd</a></li>
<li><a href="http://www.w3.org/2004/10/xml.xsd">
http://www.w3.org/2004/10/xml.xsd</a></li>
<li><a href="http://www.w3.org/2001/03/xml.xsd">
http://www.w3.org/2001/03/xml.xsd</a></li>
</ul>
</div>
</div>
</xs:documentation>
</xs:annotation>
</xs:schema>

View File

@@ -0,0 +1,308 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "XMLSchema.dtd" [
<!ATTLIST schema
xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#">
<!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
<!ENTITY % p ''>
<!ENTITY % s ''>
]>
<!-- Schema for XML Signatures
http://www.w3.org/2000/09/xmldsig#
$Revision: 1.1 $ on $Date: 2002/02/08 20:32:26 $ by $Author: reagle $
Copyright 2001 The Internet Society and W3C (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved.
http://www.w3.org/Consortium/Legal/
This document is governed by the W3C Software License [1] as described
in the FAQ [2].
[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.w3.org/2000/09/xmldsig#" version="0.1" elementFormDefault="qualified">
<!-- Basic Types Defined for Signatures -->
<simpleType name="CryptoBinary">
<restriction base="base64Binary">
</restriction>
</simpleType>
<!-- Start Signature -->
<element name="Signature" type="ds:SignatureType"/>
<complexType name="SignatureType">
<sequence>
<element ref="ds:SignedInfo"/>
<element ref="ds:SignatureValue"/>
<element ref="ds:KeyInfo" minOccurs="0"/>
<element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="SignatureValue" type="ds:SignatureValueType"/>
<complexType name="SignatureValueType">
<simpleContent>
<extension base="base64Binary">
<attribute name="Id" type="ID" use="optional"/>
</extension>
</simpleContent>
</complexType>
<!-- Start SignedInfo -->
<element name="SignedInfo" type="ds:SignedInfoType"/>
<complexType name="SignedInfoType">
<sequence>
<element ref="ds:CanonicalizationMethod"/>
<element ref="ds:SignatureMethod"/>
<element ref="ds:Reference" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
<complexType name="CanonicalizationMethodType" mixed="true">
<sequence>
<any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
<!-- (0,unbounded) elements from (1,1) namespace -->
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<element name="SignatureMethod" type="ds:SignatureMethodType"/>
<complexType name="SignatureMethodType" mixed="true">
<sequence>
<element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
<any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
<!-- (0,unbounded) elements from (1,1) external namespace -->
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<!-- Start Reference -->
<element name="Reference" type="ds:ReferenceType"/>
<complexType name="ReferenceType">
<sequence>
<element ref="ds:Transforms" minOccurs="0"/>
<element ref="ds:DigestMethod"/>
<element ref="ds:DigestValue"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="URI" type="anyURI" use="optional"/>
<attribute name="Type" type="anyURI" use="optional"/>
</complexType>
<element name="Transforms" type="ds:TransformsType"/>
<complexType name="TransformsType">
<sequence>
<element ref="ds:Transform" maxOccurs="unbounded"/>
</sequence>
</complexType>
<element name="Transform" type="ds:TransformType"/>
<complexType name="TransformType" mixed="true">
<choice minOccurs="0" maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/>
<!-- (1,1) elements from (0,unbounded) namespaces -->
<element name="XPath" type="string"/>
</choice>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<!-- End Reference -->
<element name="DigestMethod" type="ds:DigestMethodType"/>
<complexType name="DigestMethodType" mixed="true">
<sequence>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<element name="DigestValue" type="ds:DigestValueType"/>
<simpleType name="DigestValueType">
<restriction base="base64Binary"/>
</simpleType>
<!-- End SignedInfo -->
<!-- Start KeyInfo -->
<element name="KeyInfo" type="ds:KeyInfoType"/>
<complexType name="KeyInfoType" mixed="true">
<choice maxOccurs="unbounded">
<element ref="ds:KeyName"/>
<element ref="ds:KeyValue"/>
<element ref="ds:RetrievalMethod"/>
<element ref="ds:X509Data"/>
<element ref="ds:PGPData"/>
<element ref="ds:SPKIData"/>
<element ref="ds:MgmtData"/>
<any processContents="lax" namespace="##other"/>
<!-- (1,1) elements from (0,unbounded) namespaces -->
</choice>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="KeyName" type="string"/>
<element name="MgmtData" type="string"/>
<element name="KeyValue" type="ds:KeyValueType"/>
<complexType name="KeyValueType" mixed="true">
<choice>
<element ref="ds:DSAKeyValue"/>
<element ref="ds:RSAKeyValue"/>
<any namespace="##other" processContents="lax"/>
</choice>
</complexType>
<element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
<complexType name="RetrievalMethodType">
<sequence>
<element ref="ds:Transforms" minOccurs="0"/>
</sequence>
<attribute name="URI" type="anyURI"/>
<attribute name="Type" type="anyURI" use="optional"/>
</complexType>
<!-- Start X509Data -->
<element name="X509Data" type="ds:X509DataType"/>
<complexType name="X509DataType">
<sequence maxOccurs="unbounded">
<choice>
<element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
<element name="X509SKI" type="base64Binary"/>
<element name="X509SubjectName" type="string"/>
<element name="X509Certificate" type="base64Binary"/>
<element name="X509CRL" type="base64Binary"/>
<any namespace="##other" processContents="lax"/>
</choice>
</sequence>
</complexType>
<complexType name="X509IssuerSerialType">
<sequence>
<element name="X509IssuerName" type="string"/>
<element name="X509SerialNumber" type="integer"/>
</sequence>
</complexType>
<!-- End X509Data -->
<!-- Begin PGPData -->
<element name="PGPData" type="ds:PGPDataType"/>
<complexType name="PGPDataType">
<choice>
<sequence>
<element name="PGPKeyID" type="base64Binary"/>
<element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<sequence>
<element name="PGPKeyPacket" type="base64Binary"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</choice>
</complexType>
<!-- End PGPData -->
<!-- Begin SPKIData -->
<element name="SPKIData" type="ds:SPKIDataType"/>
<complexType name="SPKIDataType">
<sequence maxOccurs="unbounded">
<element name="SPKISexp" type="base64Binary"/>
<any namespace="##other" processContents="lax" minOccurs="0"/>
</sequence>
</complexType>
<!-- End SPKIData -->
<!-- End KeyInfo -->
<!-- Start Object (Manifest, SignatureProperty) -->
<element name="Object" type="ds:ObjectType"/>
<complexType name="ObjectType" mixed="true">
<sequence minOccurs="0" maxOccurs="unbounded">
<any namespace="##any" processContents="lax"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="MimeType" type="string" use="optional"/> <!-- add a grep facet -->
<attribute name="Encoding" type="anyURI" use="optional"/>
</complexType>
<element name="Manifest" type="ds:ManifestType"/>
<complexType name="ManifestType">
<sequence>
<element ref="ds:Reference" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="SignatureProperties" type="ds:SignaturePropertiesType"/>
<complexType name="SignaturePropertiesType">
<sequence>
<element ref="ds:SignatureProperty" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="SignatureProperty" type="ds:SignaturePropertyType"/>
<complexType name="SignaturePropertyType" mixed="true">
<choice maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/>
<!-- (1,1) elements from (1,unbounded) namespaces -->
</choice>
<attribute name="Target" type="anyURI" use="required"/>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<!-- End Object (Manifest, SignatureProperty) -->
<!-- Start Algorithm Parameters -->
<simpleType name="HMACOutputLengthType">
<restriction base="integer"/>
</simpleType>
<!-- Start KeyValue Element-types -->
<element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
<complexType name="DSAKeyValueType">
<sequence>
<sequence minOccurs="0">
<element name="P" type="ds:CryptoBinary"/>
<element name="Q" type="ds:CryptoBinary"/>
</sequence>
<element name="G" type="ds:CryptoBinary" minOccurs="0"/>
<element name="Y" type="ds:CryptoBinary"/>
<element name="J" type="ds:CryptoBinary" minOccurs="0"/>
<sequence minOccurs="0">
<element name="Seed" type="ds:CryptoBinary"/>
<element name="PgenCounter" type="ds:CryptoBinary"/>
</sequence>
</sequence>
</complexType>
<element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
<complexType name="RSAKeyValueType">
<sequence>
<element name="Modulus" type="ds:CryptoBinary"/>
<element name="Exponent" type="ds:CryptoBinary"/>
</sequence>
</complexType>
<!-- End KeyValue Element-types -->
<!-- End Signature -->
</schema>