Bug 678 - FQDN for hostname does not work anymore
FQDN for hostname does not work anymore
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudoers
1.8.8
PC Linux
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-12 15:40 MST by Christian
Modified: 2015-02-09 15:11 MST (History)
1 user (show)

See Also:


Attachments
Minimal sudoers file for reproducing the issue (810 bytes, application/octet-stream)
2014-11-12 15:40 MST, Christian
Details
Patch to updated runhost in set_fqdn (2.61 KB, patch)
2014-11-12 18:10 MST, Todd C. Miller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian 2014-11-12 15:40:30 MST
Created attachment 436 [details]
Minimal sudoers file for reproducing the issue

As of version 1.8.8, when specifying hosts with their FQDN, running commands with sudo does not work anymore on those hosts. When using just the host name in the host specification, sudo works as intended. The fqdn option has no effect on this problem.

To give practical example, with the attached minimal sudoers file with one FQDN and one host name entry,

    $ sudo -l

only lists /bin/false, and not both /bin/true and /bin/false.

This has been first observed with sudo 1.8.8 Beta3 in Debian. The previous version 1.8.7, tested on the exact same system with no other changes, worked fine. The issue was tested with up to version 1.8.11p1 and it was still present there.

Help in this matter would be greatly appreciated!

For reference, the Debian bug can be found here: https://bugs.debian.org/731583
Comment 1 Todd C. Miller 2014-11-12 18:09:24 MST
When the remote host support was added to sudoers evaluation the code that sets the fqdn was not updated to match.
Comment 2 Todd C. Miller 2014-11-12 18:10:38 MST
Created attachment 437 [details]
Patch to updated runhost in set_fqdn
Comment 3 Christian 2014-11-12 19:00:00 MST
Damn, that was fast.

Tested with 1.8.11p2 and I can confirm that this resolve the issue.

Thanks!
Comment 4 Todd C. Miller 2014-11-16 07:02:48 MST
Excellent.  The fix will be in sudo 1.8.12, currently in beta.
Comment 5 Todd C. Miller 2015-02-09 15:11:48 MST
Fixed in sudo 1.8.12, available now.