Der Leerstellen-Fehler tritt bei folgendem Code auf.
Code: Alles auswählen
[XMLPatch_Config]
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 false
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname:"users"
all_childelements_with:
elementname:"userGroup"
all_childelements_with:
elementname:"users"
all_childelements_with:
elementname:"user"
attribute:"name" value="$line$"
attribute:"allowAllCommands" value="true"
all_childelements_with:
elementname:"commands"
all_childelements_with:
elementname:"command"
attribute:"path" value="c:\windows\system32\cmd.exe"
end
Dies erstellt nun all das hier neu:
Code: Alles auswählen
<user allowAllCommands="true" name="$line$">
<commands>
<command path="c:\windows\system32\cmd.exe"> </command>
</commands>
</user>
während das Programm das Format
Code: Alles auswählen
<user allowAllCommands="true" name="$line$">
<commands>
<command path="c:\windows\system32\cmd.exe" />
</commands>
</user>
erwartet
Die Fehlermeldung des XML Patches lautet:
Code: Alles auswählen
[5] [Jun 19 12:16:32:846] [sudowin] Execution of XMLPatch_Config
[6] [Jun 19 12:16:32:847] [sudowin] c:\opsi.org\tmp\_winstbat_Al14Mz67.cmd saved back
[6] [Jun 19 12:16:32:847] [sudowin] Executing "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\opsiwinstxmlplugin.exe" --xmlfile="C:\Program Files (x86)\Sudowin\Server\sudoers.xml" --scriptfile="c:\opsi.org\tmp\_winstbat_Al14Mz67.cmd"
[6] [Jun 19 12:16:33:275] [sudowin] ExitCode 0
[6] [Jun 19 12:16:33:275] [sudowin]
[6] [Jun 19 12:16:33:275] [sudowin] output:
[6] [Jun 19 12:16:33:275] [sudowin] --------------
[6] [Jun 19 12:16:33:275] [sudowin]
[6] [Jun 19 12:16:33:280] [sudowin] Delete "c:\opsi.org\tmp\_winstbat_*"
[6] [Jun 19 12:16:33:280] [sudowin] Search "c:\opsi.org\tmp\"
[5] [Jun 19 12:16:33:285] [sudowin] Start including tail of LogFile "c:\opsi.org\log\opsiwinstxmlplugin.log with encoding: cp1252"
[5] [Jun 19 12:16:33:285] [sudowin] ################################################################
[5] [Jun 19 12:16:33:285] [sudowin] ==>: [5] --
[5] [Jun 19 12:16:33:285] [sudowin] ==>: [5] --
[5] [Jun 19 12:16:33:285] [sudowin] ==>: EInOutError:E/A-Fehler 103
[5] [Jun 19 12:16:33:285] [sudowin] ==>: [5]
[5] [Jun 19 12:16:33:285] [sudowin] ==>: [5] Execution of
[5] [Jun 19 12:16:33:285] [sudowin] ==>: [5] FILE C:\Program Files (x86)\Sudowin\Server\sudoers.xml
[5] [Jun 19 12:16:33:285] [sudowin] ==>: [6] DOM Vendor Open XML
[5] [Jun 19 12:16:33:285] [sudowin] ==>: [6] XML Options [doNodeAutoIndent, doAutoPrefix, doNamespaceDecl]
[5] [Jun 19 12:16:33:285] [sudowin] ==>: [3] Error: Could not construct XML Document from C:\Program Files (x86)\Sudowin\Server\sudoers.xml info: KRITISCHER FEHLER in Zeile 1, zwischen Position 1 und 2 -- Zeichen außerhalb des Wurzel-Elements: ?
[5] [Jun 19 12:16:33:285] [sudowin] ==>: Linie: 1
[5] [Jun 19 12:16:33:285] [sudowin] ==>: ?
[5] [Jun 19 12:16:33:285] [sudowin] ################################################################
[5] [Jun 19 12:16:33:285] [sudowin] End including LogFile "c:\opsi.org\log\opsiwinstxmlplugin.log"
[5] [Jun 19 12:16:33:287] [sudowin]
Die Datei bei der dies Auftritt sieht wie folgt aus:
Code: Alles auswählen
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
Copyright (c) 2005-2008, Schley Andrew Kutz <akutz@lostcreations.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of l o s t c r e a t i o n s nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-->
<sudoers xmlns="http://sudowin.sourceforge.net/schemas/XmlAuthorizationPlugin/"
privilegesGroup="Administratoren"
invalidLogons="3"
timesExceededInvalidLogons="3"
invalidLogonTimeout="180"
lockoutTimeout="180"
logonTimeout="180"
startTime="00:00:00.00000"
endTime="23:59:59.99999"
loggingLevel="Both"
allowAllCommands="false">
<users>
<userGroup name="sudoers" allowAllCommands="true">
<users>
</users>
<commandGroupRefs>
<commandGroupRef commandGroupName="standard"/>
</commandGroupRefs>
</userGroup>
</users>
<commands>
<commandGroup name="standard">
</commandGroup>
</commands>
</sudoers>
(ich kann die originale Datei auch gerne als email oder ähnliches an sie versenden, oder soll ich gleich ein Beispielpaket, welches diese Fehler beinhaltet bauen?)
Ich kopiere diese Datei auf den Client und probiere sie dann zu bearbeiten, bekomme dann jedoch die Fehlermeldung von oben.
wie schon gesagt, durch voranstellen des TextFilePatches:
Code: Alles auswählen
[PatchTextFile_PreConfig]
GoToTop
AdvanceLine 1
DeleteTheLine
tritt diese Fehlermeldung nicht mehr auf, wobei in der herüberkopierten Datei dann diese "Headerzeile" wieder vorhanden ist, Windows sie also
anscheinend selbst wieder erstellt.