applied patch to rdiff.helper, removed /etc/passwd from mysql handler.
[matthijs/upstream/backupninja.git] / handlers / mysql
index 4ac631b574bf9d2836b52d45c17246662d0571c2..569b0a206d21dc4b509539fd969c2ce6e9d181e3 100644 (file)
@@ -95,7 +95,7 @@ fi
 
 defaultsfile=""
 if [ "$dbusername" != "" -a "$dbpassword" != "" ]; then
-       home=`grep '^root:' /etc/passwd | awk -F: '{print $6}'`
+       home=`getent passwd "root" | awk -F: '{print $6}'`
        [ -d $home ] || fatal "Can't find root's home directory ($home)."
        mycnf="$home/.my.cnf"
        if [ -f $mycnf ]; then