Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 194843 - dspam's /etc/cron.daily/dspam.cron does not work with mysql's ~/.my.cnf
Summary: dspam's /etc/cron.daily/dspam.cron does not work with mysql's ~/.my.cnf
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Linux bug wranglers
Depends on:
Reported: 2007-10-05 18:37 UTC by Mark Wagner
Modified: 2007-10-05 22:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wagner 2007-10-05 18:37:09 UTC
/etc/cron.daily/dspam.cron uses MYSQL_PWD to pass the database password to mysql. However, if root has a ~/.my.cnf and it has a [client] section with a password there then that password is used.

Either the ~/.my.cnf should be ignored or --password=<password> should be used.

Reproducible: Always

Steps to Reproduce:
1. Create /root/.my.cnf with

password = swordfish

2. Run /etc/cron.daily/dspam.cron

Actual Results:  
+ MYSQL_PWD=ilikeicecream
+ /usr/bin/mysql --silent --user=dspam --socket=/var/run/mysqld/mysqld.sock --compress dspam
ERROR 1045 (28000): Access denied for user 'dspam'@'localhost' (using password: YES)

Expected Results:  
Script runs.

Portage (default-linux/x86/2007.0/desktop, gcc-4.2.0, glibc-2.6.1-r0, 2.6.21-gentoo-r3 i686)
System uname: 2.6.21-gentoo-r3 i686 AMD Athlon(tm) Processor
Timestamp of tree: Thu, 04 Oct 2007 16:50:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.5.1-r2
sys-apps/baselayout: 1.12.10-r5
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18
sys-devel/gcc-config: 1.4.0-r2
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
CFLAGS="-march=athlon-tbird -O2 -pipe -fomit-frame-pointer"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon-tbird -O2 -pipe -fomit-frame-pointer"
FEATURES="distlocks fixpackages metadata-transfer sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
USE="3dnow 3dnowex X Xaw3d a52 aac aalib acl acpi aim alsa apache apache2 audiofile bash-completion berkdb bitmap-fonts bzip2 bzlib cairo cdparanoia cdr cgi cli cracklib crypt cups curl dbus dga divx4linux dri dts dv dvb dvd dvdr dvdread dynagraph edl emacs emboss encode esd ethereal evo exif ffmpeg fftw firefox flac font-server fontconfig fpx gd gdbm geoip gif gimp gimpprint glibc-omitfp gmp gnutls gpgme graphviz gs gstreamer gtk gtkhtml hal iconv icq idea imagemagick imap innodb isdnlog java jbig jikes jpeg lcms ldap libcaca live lm_sensors logrotate lua lzw-tiff mad maildrop mailwrapper matroska mbox midi mikmod milter mmap mmx mng mozdevelop mozilla moznocompose moznoirc moznomail mozsvg mp3 mp4 mpeg mudflap musepack mysql ncurses nethack netpbm nls nptl nptlonly nsplugin offensive ogg openal opengl openmp oss pam pam_chroot pam_console pam_timestamp pcre pda pdf perl perlsuid pic plotutils png postgres ppds pppd python qt3 qt3support qt4 quicktime readline real reflection rtc samba sdl sensord session silc slp smime sndfile snmp speex spell spl sqlite ssl svg syslog tcltk tcpd tga theora tiff truetype truetype-fonts trusted type1-fonts unicode usb userlocales vhosts videos vorbis vorbis-psy win32codecs wmf x264 x86 xanim xml xorg xpm xprint xrandr xv xvid zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nv vesa fbdev"
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-10-05 21:10:13 UTC
Yeah, so configure it as you need, really don't expect us to do sysadmin job for you.
Comment 2 Mark Wagner 2007-10-05 21:56:39 UTC
"It" in this case is /etc/cron.daily/dspam.cron. As a sysadmin I try not to edit scripts that are part packages. That is a bad practice. Instead, I try to have the script fixed by posting bug a report.

Notwithstanding, it is clear by your offensive attitude that you don't care about--and possibly don't understand--the problem so I will let the problem with the package remain unfixed rather than deal with you.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-10-05 22:01:57 UTC
Cool. Sorry, but your root's ~/.my.cnf stuff is not really our problem; we don't ship any such thing.