Re: [Exim] 4.12 smtp transport segfaults, newbie begs for he…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Greg Louis
Dátum:  
Címzett: Exim-users
Tárgy: Re: [Exim] 4.12 smtp transport segfaults, newbie begs for help
On 20030128 (Tue) at 1335:18 +0100, Nico Erfurth wrote:
> Greg Louis wrote:
>
> >Instrumenting src/smtp_out.c with more debug_printf calls shows it's
> >getservbyname() that's segfaulting.
>
> The getservbyname call itself?
>
> Check this entro from the FAQ
> <quote>
> Q0062: When I try to start an Exim daemon it crashes. I ran a debugger
>        and discovered that the crash is happening in the function
>        getservbyname().
>        What's going on?

>
> A0062: What have you got in the file /etc/nsswitch.conf? If it contains
>        this line:

>
>        services:       db files

>
>        try removing the "db". (Your system is trying to look in some
>        kind of database before searching the file /etc/services.)
> </quote>


Removing the db from that line did solve the problem. (I saw that
entry but that was yesterday -- didn't spring to mind again this
morning when I found out I too had a getservbyname() issue :(

Curious: this works fine without any change to /etc/nsswitch.conf:
#include <netdb.h>
#include <stdio.h>
int main(int argc, char **argv)
{
    struct servent *p;
    int *port;
    p=getservbyname("smtp","tcp");
    *port=ntohs(p->s_port);
    printf("Got port %d for service %s/%s\n", *port,
        p->s_name, p->s_proto);
    exit(0);
}


# gcc -O -o testservent testservent.c
# testservent
Got port 25 for service smtp/tcp

Anyway, thanks very much indeed for the help!
--
| G r e g  L o u i s          | gpg public key:      |
|   http://www.bgl.nu/~glouis |   finger greg@??? |
| Help free our mailboxes. Include                   |
|        http://wecanstopspam.org in your signature. |