[Opendnssec-user] Include files in configuration

Jimmy Bergman jimmy at sigint.se
Wed Mar 30 07:11:22 UTC 2011


Hi

Try with the outlined solution and then execute
tr -d "\n" < passwordmysql.xml > passwordmysql.xml.new && mv
passwordmysql.xml.new passwordmysql.xml

to remove all newlines. I bet you are seeing the newline of the single
line where you typed the password.

Entities in xml is textual data, you can't have elements in entities.

Regards,
Jimmy

On Tue, Mar 29, 2011 at 3:04 PM, Casper Gielen <c.gielen at uvt.nl> wrote:
>> Op 24-03-11 14:30, Jimmy Bergman schreef:
>>> Hi
>>>
>>> Never tested this, but it looks like you should have
>>> <Password>&passwordmysql;</Password>
>>>
>>> instead of only the entity. If that solves it, post the fix to the
>>> list to help others.
>>
>> That was it. I originally include the <Password> tags in the include file.
>> Complete solution:
>>
>> At the top of conf.xml (or any other XML file) include the following:
>>
>> <!DOCTYPE Configuration [
>> <!ENTITY passwordmysql SYSTEM "passwordmysql.xml">
>> ]>
>>
>> Add an "ENTITY" line for every file you want to include.
>> The file should contain just the data needed, no tags.
>>
>>
>> Now you can refer to the contents of the file in the following way:
>>
>> <Datastore>
>>         <MySQL>
>>                 <Host port="3306">localhost</Host>
>>                 <Database>opendnssec</Database>
>>                 <Username>opendnssec</Username>
>>                 <Password>&passwordmysql;</Password>
>>         </MySQL>
>> </Datastore>
>
> The solution outlined above does not work properly afterall.
> Unfortunately the &passwordmysql; token has a trailing newline
> character. That character is not in the original file, it must be an
> artifact from including the file.
>
> Next I tried to inlude the entire line, including the <Password> tags.
> Unfortunately that doesn't work at all:
>
>
> Mar 29 14:58:33 metagross ods-enforcerd: Expecting an element , got nothing
> Mar 29 14:58:33 metagross ods-enforcerd: Error validating file
> "/etc/opendnssec/conf.xml"
>
> It appears the validation does not understand this way of nesting
> XML-files.
>
> --
> Casper Gielen <cgielen at uvt.nl> | LIS UNIX
> PGP fingerprint = 16BD 2C9F 8156 C242 F981  63B8 2214 083C F80E 4AF7
>
> Universiteit van Tilburg | Postbus 90153, 5000 LE
> Warandelaan 2 | Telefoon 013 466 4100 | G 236 | http://www.uvt.nl
>
>
>
>
>
>



More information about the Opendnssec-user mailing list