When running /etc/init.d/deluged the script can find the wrong home directory of a user if DELUGED_USER is set to a username that also appears inside of another username on the system. Example: $ DELUGED_USER=my_user:my_user $ getent passwd | grep $( echo "${DELUGED_USER}" | cut -d ':' -f 1 ) my_user:x:1000:1000::/home/my_user:/bin/bash my_user_on_another_machine:x:501:100:,,,:/space:/bin/bash In this example it will return /space, instead of /home/my_user. Patch attached. Also filed with Deluge at: http://dev.deluge-torrent.org/ticket/728 Reproducible: Always Steps to Reproduce: 1. Create a user, testuser1, with a certain home directory (/home/testuser1) 2. Create another user, testuser12, with another home directory (/mnt/external) 3. Set DELUGED_USER=testuser1 in /etc/conf.d/deluged 4. Run '/etc/init.d/deluged start' and see that it has set DELUGED_USER_HOME to /mnt/external, instead of /home/testuser1 Actual Results: The wrong home directory is set. Expected Results: The correct home directory should be set.
Created attachment 178532 [details, diff] minor patch to resolve the issue.
Fixed, thanks for the patch.