In pool.h, we have this definition:

typedef struct {
        pid_t pid;
        time_t ctime;
        unsigned char status;
        unsigned long count;
        char * client;
} child_state_t;

These are the structures that fill up the shared memory segment. I've made
some changes in my tree, replacing "char *client" with "char client[128]".
There's no way that this pointer can work because the parent process
prints the state files, but the child process would own the memory the
pointer points to!

I'm also sizing the shared memory segment as sizeof(child_state_t) *
HARD_MAX_CHILDREN, rather than the 100kb it had been hardcoded as.

I've added some code in serverchild.c and pool.c to copy either the
hostname or the ip address of the current connection into the structure
(depending on the pre-existing config item for resolving hostnames in the
log files). The name also gets printed to the
/var/run/dbmail-<daemon>.state files.

First, any objections? Second, any additional information that I should
add?

Aaron
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to