Comment 2 for bug 1212724

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Hi Darin - Thanks for the bug report and also for the patch!

Here are some potential problems that I see with the patch:

eCryptfs scripts shouldn't be sourcing config files for other programs.
migrate-home must be run under the root user, so that makes me even more
uncomfortable about eCryptfs scripts sourcing scripts that we have no control
over and can't guarantee the content or structure of.

Also, your patch makes the assumption that $HOME is set in
/etc/default/useradd. That may not always be true.

There are other user management tools that, I assume, do not respect
/etc/default/useradd. Also, if someone uses adduser/useradd with the --home
option, they can place the home directory anywhere. /etc/default/useradd would
not be helpful in that situation.

$USER_HOME is already pulled out of /etc/passwd, so it should be accurate. How
about just running it through dirname and setting that to $BASE_HOME?