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

sean finney seanius at debian.org
Mon Nov 14 12:55:01 UTC 2005


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?

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).

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

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-dspam-misc/attachments/20051114/e5eaeb0d/attachment.pgp


More information about the Pkg-dspam-misc mailing list