02e3f4b526
When becoming an unprivileged user using non-sudo on a platform where getlogin() failed in our situation we were not able to detect that the user had switched. This meant that all of our logic to use move vs copy if the user had switched was attempting the wrong thing. This change tries the to do the right thing but then falls back to an acceptable second choice if it doesn't work. The bug wasn't easily detected because: * sudo was not affected because sudo records that the user's have been switched so we were able to detect that. * getlogin() works on most platforms. RHEL5 with python-2.4 seems to be the only platform we still care about where getlogin() fails for this case. * It had to be becoming an unprivileged user. When becoming a privileged user, the user would be able to successfully perform the best case tasks. |
||
---|---|---|
.. | ||
ansible |