I am working on implementing the scripting driver to manage our user
home directories. In the course of this I need to publish a value for
the user's ndsHomeDirectory attribute back to the vault. This value will
contain '=' characters from the volume DN. Unfortunately the simplified
change document accepted by *usclh -t modify ...* appears to choke on
this. For example, given the following:


Code:
--------------------

# echo "ADD_Path=cn=MYVOL,ou=LEF,ou=Servers,o=SCRIPT#0#an drew" | usclh -t modify -c User -a andrew

--------------------


The usclh utility only parses "cn" for the Path attribute value:


Code:
--------------------

Home Directories :Remote Interface Driver: Received.
Home Directories :
<nds dtdversion="1.1" ndsversion="8.6">
<source>
<product build="20110314_1500" version="4.0.1"/>
<contact/>
</source>
<input>
<modify class-name="User" event-id="20121107154707Z#0000144999">
<association>andrew</association>
<modify-attr attr-name="Path">
<add-value>
<value>cn</value>
</add-value>
</modify-attr>
</modify>
</input>
</nds>
...
Home Directories PT:
DirXML Log Event -------------------
Driver: \SCRIPT\SCRIPT\Drivers\Driver Set\Home Directories
Channel: Publisher
Object: (SCRIPT\Users\andrew)
Status: Error
Message: Code(-9001) 3 components are needed for value. 0 found.

--------------------


I have tried various methods of escaping and quoting to no avail. That
leaves me with generating the event XML myself and feeding it to *usclh
-t xds*. That's ok. I can work with XML.

Unfortunately, I cannot get the publish to work at all. For some reason,
it appears that usclh is failing to parse the XML properly. I even tried
executing the exact example listed in the implementation guide 'here'
(http://tinyurl.com/cfacs4s):


Code:
--------------------

# ./usclh -t xds
<nds dtdversion="1.1" ndsversion="8.6">
<input>
<modify class-name="User" event-id="12345">
<association>bob</association>
<modify-attr attr-name="MyAttr">
<remove-all-values/>
<add-value>
<value>some new value</value>
</add-value>
</modify-attr>
</modify>
</input>
</nds>
^d

--------------------


After executing this, the following appears in the scripting driver's
trace log:


Code:
--------------------

2012-11-07 10:22:53 [23441@2914043648]: (trace) --->DriverShim publisher channel: polling...
2012-11-07 10:22:53 [23441@2914043648]: (trace) --->DriverShim publisher channel: executing poll
2012-11-07 10:22:53 [23441@2914043648]: (trace) --->UnixScript Driver publisher channel: executing polling script
2012-11-07 10:22:54 [23441@2914043648]: (trace) --->DriverShim publisher channel: checking change log
2012-11-07 10:22:54 [23441@2914043648]: (trace) --->driver publisher nextEvent, detected an event.
2012-11-07 10:22:54 [23441@2914043648]: (trace) --->driver publisher detected a raw XDS event.
2012-11-07 10:22:54 [23441@2914043648]: (trace) Received document from publicationShim:
2012-11-07 10:22:54 [23441@2914043648]: (trace) <#text />
2012-11-07 10:22:54 [23441@2914043648]: (trace) Sending document to DirXML:
2012-11-07 10:22:54 [23441@2914043648]: (trace) <#text />
2012-11-07 10:22:54 [23441@2914043648]: (trace) Sending...
2012-11-07 10:22:54 [23441@2914043648]: (trace) <#text />
2012-11-07 10:22:54 [23441@2914043648]: (trace) Document sent.
2012-11-07 10:22:54 [23441@2914322176]: (trace) Received.
2012-11-07 10:22:54 [23441@2914322176]: (trace) <nds ndsversion="8.x" dtdversion="4.0">
2012-11-07 10:22:54 [23441@2914322176]: (trace) <source>
2012-11-07 10:22:54 [23441@2914322176]: (trace) <product version="4.0.2.0" edition="Standard">DirXML</product>
2012-11-07 10:22:54 [23441@2914322176]: (trace) <contact>Novell, Inc.</contact>
2012-11-07 10:22:54 [23441@2914322176]: (trace) </source>
2012-11-07 10:22:54 [23441@2914322176]: (trace) <output>
2012-11-07 10:22:54 [23441@2914322176]: (trace) <status level="error">Code(-9042) <nds> element must contain a <input> element.</status>
2012-11-07 10:22:54 [23441@2914322176]: (trace) </output>
2012-11-07 10:22:54 [23441@2914322176]: (trace) </nds>
2012-11-07 10:22:54 [23441@2914322176]: (trace) Received document for publisher channel
2012-11-07 10:22:54 [23441@2914322176]: (trace) Waiting for receive...
2012-11-07 10:22:54 [23441@2914043648]: (trace) DirXML returned:
2012-11-07 10:22:54 [23441@2914043648]: (trace) <nds ndsversion="8.x" dtdversion="4.0">
2012-11-07 10:22:54 [23441@2914043648]: (trace) <source>
2012-11-07 10:22:54 [23441@2914043648]: (trace) <product version="4.0.2.0" edition="Standard">DirXML</product>
2012-11-07 10:22:54 [23441@2914043648]: (trace) <contact>Novell, Inc.</contact>
2012-11-07 10:22:54 [23441@2914043648]: (trace) </source>
2012-11-07 10:22:54 [23441@2914043648]: (trace) <output>
2012-11-07 10:22:54 [23441@2914043648]: (trace) <status level="error">Code(-9042) <nds> element must contain a <input> element.</status>
2012-11-07 10:22:54 [23441@2914043648]: (trace) </output>
2012-11-07 10:22:54 [23441@2914043648]: (trace) </nds>
2012-11-07 10:23:53 [23441@2914043648]: (trace) --->DriverShim publisher channel: polling...
2012-11-07 10:23:53 [23441@2914043648]: (trace) --->DriverShim publisher channel: executing poll
2012-11-07 10:23:53 [23441@2914043648]: (trace) --->UnixScript Driver publisher channel: executing polling script
2012-11-07 10:23:54 [23441@2914043648]: (trace) --->DriverShim publisher channel: checking change log
2012-11-07 10:24:53 [23441@2914043648]: (trace) --->DriverShim publisher channel: polling...
2012-11-07 10:24:53 [23441@2914043648]: (trace) --->DriverShim publisher channel: executing poll
2012-11-07 10:24:53 [23441@2914043648]: (trace) --->UnixScript Driver publisher channel: executing polling script
2012-11-07 10:24:54 [23441@2914043648]: (trace) --->DriverShim publisher channel: checking change log

--------------------


Notice how the XML is parsed as simply *<#text />*. It looks like the
document is being interpreted as a single text blob. I have no idea why
this is happening. I've tried making various changes to the XML, from
including a XML declaration (<?xml version=...) to only giving it the
<modify> element. Same thing each time.

Does anyone have any thoughts on what's going on here?

eDirectory 8.8.7
IDM 4.0.2
SLES 11 SP2 x86_64

Any help would be appreciated.


--
andrewgd
------------------------------------------------------------------------
andrewgd's Profile: https://forums.netiq.com/member.php?userid=2307
View this thread: https://forums.netiq.com/showthread.php?t=46105