OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Re: dict_mysql and mysql socket (patch)
From: Liviu Daia (Liviu.Daiaimar.ro)
Date: Tue Oct 03 2000 - 03:10:18 CDT


On 3 October 2000, Piotr Klaban <makleroryl.man.torun.pl> wrote:
> Hi, Here is the little patch, that uses setenv() function call to
> setup MYSQL_UNIX_PORT environment variable.

    Do you have any particular reason for using an environment variable
instead of making the appropriate call to mysql_real_connect() ?

> I need this because my box uses two mysql daemon instances - one for
> the system tables, and one for the users. That for the system tables
> uses its own /var/lib/mysqlsys directory with its own unix socket. I
> can point to it from everywhere except the postfix mysql.cf file.
>
> With this patch you can specify the socket in the mysql map configure
> file as, e.g.:
>
> socket = /var/lib/mysqlsys/mysql.sock
>
> By the way - can I block users from reading /etc/postfix/mysql.cf
> file? If I could change /etc/postfix directory, or file permissions
> to 750 or 640, and change group owner to postfix ... but I could
> not, because it seems that postfix configuration files need to be
> world-readable ...

    Add a new group "postfix", change the GID of the user "postfix" to
be the new GID, and set the permissions accordingly.

    Regards,

    Liviu Daia

-- 
Dr. Liviu Daia               e-mail:   Liviu.Daiaimar.ro
Institute of Mathematics     web page: http://www.imar.ro/~daia
of the Romanian Academy      PGP key:  http://www.imar.ro/~daia/daia.asc