a classic:
1195 ? S 0:00 sh -c mysqldump -hlocalhost -utestcom -p7ptqL9xqL7 -rsites/test.com/database.sql testcom 2>&1
1200 ? S 0:00 mysqldump -hlocalhost -utestcom -px xxxxxxxx -rsites/test.com/database.sql testcom
while mysqldump is successful at hiding its password (and even that is breakable since it's available for a short time when starting up, time which extends under load), the calling shell never hides the password, which remains visible during the whole dump.
this obviously needs some fix before release... I think we'll have to play with pipes here...
Comments
Comment #1
anarcat commentedhttp://dev.mysql.com/doc/refman/5.1/en/password-security-user.html
I find this solution to be the most secure while being moderatly simple to implement:
... of course, the 'printf' here would be done within the calling php process so it wouldn't show up in the process list.
Comment #2
Anonymous (not verified) commentedThe mysql password is leaked in the mysqldump command in the task output of a Backup task in the frontend too (sorry if pointing out the obvious)
Comment #3
anarcat commentedI only found two such locations in the code:
Will fix with proc_open.
Comment #4
anarcat commentedThis patch is partial (only backups) and needs testing (works here): http://git.koumbit.net/?p=drupal/modules/provision/.git;a=commitdiff_pla...
Comment #5
Anonymous (not verified) commentedApplied this first part patch and the second part and backup/restore all working per IRC discussion, no passwords leaked
Comment #6
anarcat commentedSo I committed the fixes that were sitting in git after thorough testing by me and mig5.