Eric Ziegast wrote:
Rick Macdougall asked

I didn't see anything in the docs or change logs specifically regarding
the mysql connection problem that sometimes crops up with vpopmail.  Has
this been addressed ?

Antonio Nati replied:

Yes, chkuser 2.0 includes a new call, vauth_open(), that Rick Widmer told
is in vpopmail CVS, and will be able to return the status of connection.

As default this call is disabled, and should be enabled (uncommenting
#define CHKUSER_ENABLE_VAUTH_OPEN in chkuser_settings.h) when this call is
released.

Jeremy Kitchen added:

as a suggestion, would it be possible to have a definition placed into
vpopmail.h such as:
#define HAVE_VAUTH_OPEN

that way programs that link against vpopmail can support both methods
without any user intervention, and also this way, if say perhaps
the postgres code doesn't have vauth_open, and the mysql does, etc,
so someone linking against it need not worry about it :)

While the current chkuser.c might compile fine against a vpopmail install with Sybase or Postgres, it doesn't work for MySQL because vauth_open is defined only in vpgsql.c and vsybase.c.

To get around this, I replaced the following line in chkuser.c:

                if (vauth_open () == 0) {

with:

        #ifdef USE_MYSQL
        #ifdef MYSQL_REPLICATION
                if (vauth_open_read () == 0) {
        #else
                if (vauth_open_update () == 0) {
        #endif
        #else
                if (vauth_open () == 0) {
        #endif

It seems to work fine for me.

It might make more sense for vpopmail to just create a generic
vauth_open_read function for each supported auth method so that
external modules like chkuser.c would be able to use the right
semantics without getting specific about the details.  Even in
the case of CDB (vcdb.c) the function would be defined as opening
the filehandle for reading the CDB file. ... just a thought.

If I could put in my two cents here, If someone who knows the MySQL libs well enough to test the opening of a table, can they also add the proper closing of the table as well.


Several people, myself included, are still seeing problems with MySQL under a large useage. So far I have not been able to get to the cause of the problem other than to convince myself I have no network or MySQL issues. I don't know C well enough to add debug code or create a patch for this, but I am still having users who have to authenticate twice and the MySQL errors I record point to improper closing of the tables, causing a communication failure.

I can give details if interested, and I am willing to be the guinea pig and test the code.

DAve



--
Systems Administrator
http://www.tls.net
Get rid of Unwanted Emails...get TLS Spam Blocker!



Reply via email to