[Pkg-dspam-misc] Re: [Dbconfig-common-devel] Re: dbconfig common and dspam backend mysql / postgresql.

Matthijs Mohlmann matthijs at cacholong.nl
Tue Nov 15 09:45:17 UTC 2005


sean finney wrote:
> hi matthijs,
> 
> On Fri, Nov 11, 2005 at 02:11:01PM +0100, Matthijs Mohlmann wrote:
> 
>>Here are the sources: http://www.cacholong.nl/~matthijs/debpkg/dspam/
>>and attached the libdspam7-drv-mysql.conf. The password in this file is
>>autogenerated...
> 
> 
> without actually installing it, i can say that it "looks" fine wrt
> invoking dbconfig-common.  what is the specific problem you
> were having?
> 
When I start the installation for the mysql backend, it tries to connect
through localhost to the mysql server, while the mysql-server is running
on a different host. I never get asked for the host of the mysql-server.

> however, looking in the postinst, i see an oppurtunity to make
> your life much easier, and also a security-related issue.  here:
> 
> # Create default config.
> MYSQLCONFTEMP=`mktemp`
> cat /usr/share/doc/libdspam7-drv-mysql/mysql.conf >
> $MYSQLCONFTEMP
> ... bunch of code ...
> 
> you should consider using dbc_generate_include to autogenerate
> the config file.  see
> 
> http://people.debian.org/~seanius/policy/dbconfig-common-using.html#genconfig
> 
> for how this can be done.  there's also a manpage.  note that i'll soon
> be importing the information into debiandoc format, and as a reuslt
> the url may change later (in which case, i'll follow up here).
> 
I need some examples how that is created, I take a look at your two
packages in /usr/share/doc/dbconfig-common/examples.

> later in your code, i see:
> 
>       sed -i -e "s|^\(#\)\?\(# \)\?MySQLPass.*$|MySQLPass $dbc_dbpass|" $MYSQLCONFTEMP
> 
> note that this means the password is passed on the cmdline...
> 
> 
> 	sean
> 

Regards,

Matthijs Mohlmann

PS: make a To: of the two mailinglists. Somehow the messages don't come
through at pkg-dspam-misc with a CC.



More information about the Pkg-dspam-misc mailing list