Bug 887 - do not create interface list if not required
do not create interface list if not required
Status: RESOLVED INVALID
Product: Sudo
Classification: Unclassified
Component: Sudo
1.8.27
PC Linux
: low enhancement
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-07-05 04:02 MDT by mjbecker
Modified: 2020-01-08 07:56 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.