ansible/lib
Gregor Giesen b87ef7772f cron: replacement for os.getlogin() (#4777)
os.getlogin() returns the user logged in on the controlling terminal. However
'crontab' only looks for the login name of the process' real user id which
pwd.getpwuid(os.getuid())[0] does provide.

While in most cases there is no difference, the former might fail under certain
circumstances (e.g. a lxc container connected by attachment without login),
throwing the error 'OSError: [Errno 25] Inappropriate ioctl for device'.
2016-12-08 11:25:04 -05:00
..
ansible cron: replacement for os.getlogin() (#4777) 2016-12-08 11:25:04 -05:00