OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Wietse Venema (wietseporcupine.org)
Date: Thu Nov 01 2001 - 16:53:09 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Interesting. A bug in debugging output :-)

            Wietse

    Simon J Mudd:
    > wietseporcupine.org (Wietse Venema) writes:
    >
    > > In order to debug the mysql queries, I suggest that you test it with:
    > >
    > > postmap -v -q querystring mysql:filename
    > >
    > > This will show the full mysql query and reply.
    >
    > Wietse, have I misunderstood the debug output for the equivalent ldap
    > calls? [The behaviour is correct, I think the debugging output may be
    > wrong]
    >
    > Doing the following I get (with no -v)
    >
    > [sjmuddphoenix mailing-lists]$ /usr/sbin/postmap -q postmaster ldap:ldap_global_alias
    > root
    > [sjmuddphoenix mailing-lists]$
    >
    > The same postmap call with the -v option shows the following:
    >
    > ...
    > postmap: dict_ldap_lookup: Searching with filter (&(objectClass=sendmailMTAAliasObject)????(sendmailMTAAliasGrouping=aliases)????(sendmailMTACluster=ea4els.ampr.org)????(sendmailMTAKey=postmaster))
    > postmap: dict_ldap_get_values: Search found 1 match(es)
    > postmap: dict_ldap_get_values: search returned 0 value(s) for requested result attribute sendmailMTAAliasValue
    > postmap: dict_ldap_get_values: Leaving dict_ldap_get_values
    > postmap: dict_ldap_lookup: Search returned root
    > root
    > [sjmuddphoenix mailing-lists]$
    >
    > Is the "returned 0 value(s)" correct?
    >
    > I.e. util/dict_ldap.c (line 345) shows:
    >
    > for (i = 0; dict_ldap->result_attributes->argv[i]; i++) {
    > if (strcasecmp(dict_ldap->result_attributes->argv[i],
    > attr) == 0) {
    > if (msg_verbose)
    > msg_info("%s: search returned %d value(s) for requested
    > result attribute %s", myname, i, attr);
    > break;
    > }
    > }
    >
    > Should i in msg_info() not be i+1, or am I misinterpreting the output?
    >
    > Simon
    > --
    > Simon J Mudd, Madrid SPAIN. email: sjmuddpobox.com
    > Tel: +34-91-408 4878, Mobile: +34-605-085 219
    > -
    > To unsubscribe, send mail to majordomopostfix.org with content
    > (not subject): unsubscribe postfix-users
    >
    >

    -
    To unsubscribe, send mail to majordomopostfix.org with content
    (not subject): unsubscribe postfix-users