by changing the value of the probe_interfaces setting.
+What's new in Sudo 1.8.10?
+
+ * It is now possible to disable network interface probing in
+ sudo.conf by changing the value of the probe_interfaces
+ setting.
+
What's new in Sudo 1.8.9p4?
* Fixed a bug where sudo could consume large amounts of CPU while
/*
- * Copyright (c) 2009-2013 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2009-2014 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
static void set_var_disable_coredump(const char *entry, const char *conf_file);
static void set_var_group_source(const char *entry, const char *conf_file);
static void set_var_max_groups(const char *entry, const char *conf_file);
+static void set_var_probe_interfaces(const char *entry, const char *conf_file);
static unsigned int conf_lineno;
{ "disable_coredump", sizeof("disable_coredump") - 1, set_var_disable_coredump },
{ "group_source", sizeof("group_source") - 1, set_var_group_source },
{ "max_groups", sizeof("max_groups") - 1, set_var_max_groups },
+ { "probe_interfaces", sizeof("probe_interfaces") - 1, set_var_probe_interfaces },
{ NULL }
};
static struct sudo_conf_data {
bool disable_coredump;
+ bool probe_interfaces;
int group_source;
int max_groups;
const char *debug_flags;
struct plugin_info_list plugins;
struct sudo_conf_paths paths[5];
} sudo_conf_data = {
+ true,
true,
GROUP_SOURCE_ADAPTIVE,
-1,
}
}
+static void
+set_var_probe_interfaces(const char *entry, const char *conf_file)
+{
+ int val = atobool(entry);
+
+ if (val != -1)
+ sudo_conf_data.probe_interfaces = val;
+}
+
/*
* "Debug progname debug_file debug_flags"
*/
return sudo_conf_data.disable_coredump;
}
+bool
+sudo_conf_probe_interfaces(void)
+{
+ return sudo_conf_data.probe_interfaces;
+}
+
/*
* Reads in /etc/sudo.conf and populates sudo_conf_data.
*/
This setting is only available in s\bsu\bud\bdo\bo version 1.8.7 and
higher.
+ probe_interfaces
+ By default, s\bsu\bud\bdo\bo will probe the system's network interfaces and
+ pass the IP address of each enabled interface to the policy
+ plugin. This makes it possible for the plugin to match rules
+ based on the IP address without having to query DNS. On Linux
+ systems with a large number of virtual interfaces, this may
+ take a non-negligible amount of time. If IP-based matching is
+ not required, network interface probing can be disabled as
+ follows:
+
+ Set probe_interfaces false
+
+ This setting is only available in s\bsu\bud\bdo\bo version 1.8.10 and
+ higher.
+
D\bDe\beb\bbu\bug\bg f\bfl\bla\bag\bgs\bs
s\bsu\bud\bdo\bo versions 1.8.4 and higher support a flexible debugging framework
that can help track down what s\bsu\bud\bdo\bo is doing internally if there is a
file distributed with s\bsu\bud\bdo\bo or http://www.sudo.ws/sudo/license.html for
complete details.
-Sudo 1.8.9 December 4, 2013 Sudo 1.8.9
+Sudo 1.8.9 January 22, 2014 Sudo 1.8.9
.\" DO NOT EDIT THIS FILE, IT IS NOT THE MASTER!
.\" IT IS GENERATED AUTOMATICALLY FROM sudo.conf.mdoc.in
.\"
-.\" Copyright (c) 2010-2013 Todd C. Miller <Todd.Miller@courtesan.com>
+.\" Copyright (c) 2010-2014 Todd C. Miller <Todd.Miller@courtesan.com>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.TH "SUDO" "5" "December 4, 2013" "Sudo @PACKAGE_VERSION@" "OpenBSD Programmer's Manual"
+.TH "SUDO" "5" "January 22, 2014" "Sudo @PACKAGE_VERSION@" "OpenBSD Programmer's Manual"
.nh
.if n .ad l
.SH "NAME"
\fBsudo\fR
version 1.8.7 and higher.
.PD
+.TP 10n
+probe_interfaces
+By default,
+\fBsudo\fR
+will probe the system's network interfaces and pass the IP address
+of each enabled interface to the policy plugin. This makes it
+possible for the plugin to match rules based on the IP address
+without having to query DNS. On Linux systems with a large number
+of virtual interfaces, this may take a non-negligible amount of time.
+If IP-based matching is not required, network interface probing
+can be disabled as follows:
+.RS
+.nf
+.sp
+.RS 6n
+Set probe_interfaces false
+.RE
+.fi
+.sp
+This setting is only available in
+\fBsudo\fR
+version 1.8.10 and higher.
+.RE
.SS "Debug flags"
\fBsudo\fR
versions 1.8.4 and higher support a flexible debugging framework
.\"
-.\" Copyright (c) 2010-2013 Todd C. Miller <Todd.Miller@courtesan.com>
+.\" Copyright (c) 2010-2014 Todd C. Miller <Todd.Miller@courtesan.com>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd December 4, 2013
+.Dd January 22, 2014
.Dt SUDO @mansectform@
.Os Sudo @PACKAGE_VERSION@
.Sh NAME
This setting is only available in
.Nm sudo
version 1.8.7 and higher.
+.It probe_interfaces
+By default,
+.Nm sudo
+will probe the system's network interfaces and pass the IP address
+of each enabled interface to the policy plugin. This makes it
+possible for the plugin to match rules based on the IP address
+without having to query DNS. On Linux systems with a large number
+of virtual interfaces, this may take a non-negligible amount of time.
+If IP-based matching is not required, network interface probing
+can be disabled as follows:
+.Bd -literal -offset indent
+Set probe_interfaces false
+.Ed
+.Pp
+This setting is only available in
+.Nm sudo
+version 1.8.10 and higher.
.El
.Ss Debug flags
.Nm sudo
/*
- * Copyright (c) 2011-2013 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2011-2014 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
const char *sudo_conf_debug_flags(void);
struct plugin_info_list *sudo_conf_plugins(void);
bool sudo_conf_disable_coredump(void);
+bool sudo_conf_probe_interfaces(void);
int sudo_conf_group_source(void);
int sudo_conf_max_groups(void);
/*
- * Copyright (c) 1996, 1998-2005, 2007-2013
+ * Copyright (c) 1996, 1998-2005, 2007-2014
* Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif /* HAVE_STRINGS_H */
+#ifdef HAVE_STDBOOL_H
+# include <stdbool.h>
+#else
+# include "compat/stdbool.h"
+#endif /* HAVE_STDBOOL_H */
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif /* HAVE_UNISTD_H */
#include "missing.h"
#include "alloc.h"
#include "fatal.h"
+#include "sudo_conf.h"
#include "sudo_debug.h"
#define DEFAULT_TEXT_DOMAIN "sudo"
char *cp;
debug_decl(get_net_ifs, SUDO_DEBUG_NETIF)
- if (getifaddrs(&ifaddrs))
+ if (!sudo_conf_probe_interfaces() || getifaddrs(&ifaddrs) != 0)
debug_return_int(0);
/* Allocate space for the interfaces info string. */
#endif /* _ISC */
debug_decl(get_net_ifs, SUDO_DEBUG_NETIF)
+ if (!sudo_conf_probe_interfaces())
+ debug_return_int(0);
+
sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock < 0)
fatal(U_("unable to open socket"));