Should I get together a patch for you?

It would seem to require only a minimal change to auth_connect() in both
dbauthmysql.c and dbauthpgsql.c so that if USE_SAME_CONNECTION is defined,
the function will simply return true, since db_connect() already set up
that connection! Once this is cleared, then it will be safe to add the
calls to the various files so that both db_connect() and auth_connect()
are called. Further, it doesn't explain why some places call both and some
don't... that would appear to be an oversight since both idioms work ;-)

Aaron


On Sat, 14 Dec 2002, Roel Rozendaal - IC&S wrote:

> Hi Aaron,
>
> due to some integration problems we removed the seperate authentication
> support for the 1.0 release - that is, only one database connection is
> created. Some code needs to be added to make this fully transparent in
> a way that given a compiler option the build is for a separate database
> system or not. I do hope to find time for this somewhere soon but some
> urgent problems (segfaults, cpu hogging bugs) have priority now
> (besides all the other things we have to do here at IC&S ;-) )
>
> regards roel
>
>
> Aaron Stone heeft op zaterdag, 14 dec 2002 om 07:25 (Europe/Amsterdam)
> het volgende geschreven:
>
> > It looks like not all of the dbmail-* binaries are calling
> > auth_connect().
> > Grepping for auth_connect yields this:
> >
> > injector.c:  if (db_connect() != 0 || auth_connect() != 0)
> > smtp-convert.c:  if (db_connect() != 0 || auth_connect() != 0)
> > user.c:  if (auth_connect()==-1)
> > vut2dbmail.c:  if (auth_connect() == -1)
> >
> > While grepping for db_connect yields this:
> >
> > dbtest.c:  db_connect();
> > injector.c:  if (db_connect() != 0 || auth_connect() != 0)
> > main.c:  if (db_connect() < 0)
> > maintenance.c:  if (db_connect()==-1)
> > mini-injector.c:  if (db_connect() != 0)
> > raw-convert.c:  if (db_connect() != 0)
> > serverchild.c:  if ( db_connect() != 0)
> > settings.c:  if (db_connect()==-1)
> > smtp-convert.c:  if (db_connect() != 0 || auth_connect() != 0)
> > user.c:  if (db_connect()==-1)
> > vut2dbmail.c:  if (db_connect() == -1)
> >
> > What I'm left to conclude is that main.c, maintenance.c,
> > mini-injector.c,
> > raw-convert.c, serverchild.c and settings.c do not connect to the auth
> > services.
> >
> > Unfortunately, I can say conclusively that serverchild.c MUST call
> > auth_connect() or else the only available authentication option is
> > sharing
> > a db connection. LDAP or a non-shared connection are not initialized,
> > and
> > the server dies upon calling any auth-related command.
> >
> > I suspect, though, that every place where db_connect() is called, an
> > auth_connect() ought also be called...
> >
> > Aaron
> >
> > _______________________________________________
> > Dbmail mailing list
> > Dbmail@dbmail.org
> > https://mailman.fastxs.nl/mailman/listinfo/dbmail
>
> _______________________________________________
> Dbmail mailing list
> Dbmail@dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>

Reply via email to