[Exim] NUL in keys

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Patrice Fournier
Date:  
À: exim-users
Sujet: [Exim] NUL in keys
Hi all,

Is there a way to enter NULs in a key when doing a dbm lookup? I'm trying
to lookup /etc/sasldb2 (from Cyrus) to know if the user has an account in
sasl (I'd also like to use it for a password later in my auths, but let's
first take care of the other problem). This file is a dbm3 file format
where the key is comprised of the username, the realm and the string
"userPassword" separated by a NUL char.

Now, I thought about using \000 but this ends the key as can be seen for
that -be debug output:

=== debug output ===
> ${lookup {username\000realm\000userPassword}dbm{/etc/sasldb2}{0}{1}}

search_open: dbm "/etc/sasldb2"
cached open
search_find: file="/etc/sasldb2"
key="username" partial=-1
LRU list:
1/etc/sasldb2
End
internal_search_find: file="/etc/sasldb2"
type=dbm key="username"
cached data used for lookup of username
in /etc/sasldb2
lookup failed
1
=== end of debug output ===

I'd prefer not to need to embed perl to do it...

Thanks,

--
Patrice Fournier
pfournier@???