mirror of https://github.com/ansible/ansible.git
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'.pull/18777/head
parent
915b59a6d5
commit
b87ef7772f
Loading…
Reference in New Issue