LDAP-based sudo roles stopped working in 16.04
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sudo (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
After upgrading from 14.04 LTS to 16.04 LTS, we noticed that LDAP-based sudo roles stopped working, meaning users that were able to use sudo in the past, are rejected now.
After investigation, it turned out to be a known upstream bug:
https:/
which was introduced somewhere between 14.04 and 16.04 timelines.
To cut the long story short, the code is trying to match FQDN host name (eg. "thehost.
The fix is a single line change patch which found its way into sudo version 1.8.18:
https:/
Unfortunately both 16.04 and 16.10 seem to only use 1.8.16 (17.04 seemed to have jumped to 1.8.19) so will need to carry the patch mentioned above. Tested it locally and the re-built package with the patch added works fine. My debian/
.../sudo-1.8.16$ cat debian/
typo-in-
paths-in-
keep_home_
also_check_
lp1565567.patch
sssd-doesnt-
sssd-fix-
ldap-hostname.diff
.../sudo-1.8.16$ cat debian/
# HG changeset patch
# User Todd C. Miller <email address hidden>
# Date 1473459982 21600
# Node ID 605c03afc80f4c3
# Parent 017866310d24865
Fix typo that broke short host name matching when the fqdn
flag is enabled. Bug #757
diff -r 017866310d24 -r 605c03afc80f plugins/
--- a/plugins/
+++ b/plugins/
@@ -1069,7 +1069,7 @@
/* Not remote, just use user_host. */
if ((lhost = strdup(user_host)) != NULL) {
if (user_shost != user_host)
- shost = strdup(lhost);
+ shost = strdup(user_shost);
else
shost = lhost;
}
Status changed to 'Confirmed' because the bug affects multiple users.