Bug 748

Summary: sudo parses sudoers config with user's locale
Product: Sudo Reporter: Daniel Kopeček <dkopecek>
Component: SudoersAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal CC: gareth.humphries
Priority: low    
Version: 1.8.17   
Hardware: PC   
OS: Linux   

Description Daniel Kopeček 2016-06-21 05:23:16 MDT
If user uses locale like cs_CZ.UTF-8 and sudo is configred to use passwd_timeout to seconds, like 0.1 = 6s. sudo command uses user's locale to parse this number and prints error message.

Steps to Reproduce:
1. # echo "Defaults passwd_timeout = 0.1" >> /etc/sudoers
2. $ LANG=cs_CZ.UTF-8 sudo bash

Actual results:
$ LANG=cs_CZ.UTF-8 sudo bash
sudo: value `0.1' is invalid for option `passwd_timeout'
[sudo] password for test:

Expected results:
$ LANG=cs_CZ.UTF-8 sudo bash
[sudo] password for test:

Tested on the latest stable release. I also tried to set sudoers_locale but it had no effect on this issue.
Comment 1 Todd C. Miller 2016-06-30 11:08:35 MDT
What distro and version of Linux are you running?  I can't seem to reproduce this on Ubuntu 16.04 and sudo 1.8.17.
Comment 2 Todd C. Miller 2016-06-30 11:12:53 MDT
Never mind, I can reproduce this on CentOS 7.
Comment 3 Todd C. Miller 2016-06-30 12:48:52 MDT
Fixed by https://www.sudo.ws/repos/sudo/rev/c8deb0da75b4
Comment 4 Todd C. Miller 2016-09-20 15:14:31 MDT
I believe that sudo 1.8.18 fixes the locale issues.
Comment 5 Gareth Humphries 2016-11-14 08:27:03 MST
Sorry guys, closed this by mistake (thought I was on a different bug).