Bug 887

Summary: do not create interface list if not required
Product: Sudo Reporter: mjbecker
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED INVALID    
Severity: enhancement    
Priority: low    
Version: 1.8.27   
Hardware: PC   
OS: Linux   

Description mjbecker 2019-07-05 04:02:02 MDT
Currently sudo always creates a list of available interfaces. If one of the interfaces lost it's connection - what easily can happen on a laptop which is carried around - this leads to a wait for a timeout on this interface and thus to a substantial delay of command execution.
It would be nice to have a configuration switch to disable the creation of this list or to delay the creation of the list up to the point where a check of the hostname is required.
Comment 1 Todd C. Miller 2019-07-11 12:42:36 MDT
You can disable sudo's network interface probing in /etc/sudo.conf with a line like:

Set probe_interfaces false

This requires sudo version 1.8.10 or higher.

However, I'm surprised this is causing problems as just iterating through the list of existing interfaces should not block.

It's possible that you are on a Debian or Ubuntu based system where the "fqdn" flag is enabled by default which will cause a DNS lookup of the local host name.  You can disable this with a line like the following in /etc/sudoers:

Defaults !fqdn
Comment 2 Todd C. Miller 2020-01-08 07:56:17 MST
No response from submitter.