[Exim] Update on no-Auth present in Exim

Top Page
Delete this message
Reply to this message
Author: Dan Egli
Date:  
To: Exim Users
New-Topics: [Exim] Re: Exim not showing Auth?
Subject: [Exim] Update on no-Auth present in Exim
Ok. I started hacking the exim code (FYI this is Exim 3.31). I have
discovered that the array/pointer/link list/whatever you want to call it,
"auths" is not being defined. There's a check that says (if auths != NULL)
in smtp_in.c, well when I commented that check out I was able to get further
into the code than I had before (using a lot of debug_printf statements).
Here's the code in question:
#ifdef HAVE_AUTH
        debug_printf("Entering #ifdef HAVE_AUTH conditional section\r\n");
//      if (auths != NULL)
        debug_printf("Bypassing if auths != NULL\r\n");
        {
        BOOL advertise = auth_always_advertise || host_must_authenticate;
        if (!advertise)
          {
          debug_printf("!advertise resolves true. Should it?\r\n");
          check_host_for_relay();
          advertise = !host_allow_relay_anywhere &&
            verify_check_host(&host_auth_accept_relay, FALSE);
          }


        if (advertise) {
        debug_printf("Advertise is true. Should enter Advertise block\r\n");
      }
         if (host_must_use_tls_to_authenticate && tls_active < 0)
          advertise = FALSE;
        if (advertise)
          {
          auth_instance *au;
          BOOL first = TRUE;
          debug_printf("advertise resolves true. Begin Auth Sequence?\r\n");
          for (au = auths; au != NULL; au = au->next)
            {
            if (au->server)
              {
              int saveptr;
              if (first)
                {
                debug_printf("Authorization Requirement Confirmed. Add auth
to esmtp responces.\r\n");
                s = string_cat(s, &size, &ptr, "250-AUTH", 8);
                first = FALSE;
                }
              saveptr = ptr;
              s = string_cat(s, &size, &ptr, " ", 1);
              s = string_cat(s, &size, &ptr, au->public_name,
                (int)strlen(au->public_name));
              while (++saveptr < ptr) s[saveptr] = toupper(s[saveptr]);
              }
            }
          if (!first) s = string_cat(s, &size, &ptr, "\r\n", 2);
          }
        }
      #endif



And when executed like that it gets to all but that last debug_printf,
showing in fact that auths is NULL. So my question is: How is auths ever
defined?  I'm looking but not finding auths defined anywhere. I see it
listed in globals.c as  auth_instance *auths          = NULL Which explains
how it gets the first AUTHS list. But I don't see auths ever getting any
other values. Therefore at the time it is checked in smtp_in.c it's still
NULL. Does anyone have any ideas on what could be causing this?


Thanks in advance!