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'.reviewable/pr18780/r1
parent
987d9b2b4a
commit
2f3fdc4975
Loading…
Reference in New Issue