accessor.
# define INADDR_NONE ((unsigned int)-1)
#endif
+static struct interface *interfaces;
+
/*
* Parse a space-delimited list of IP address/netmask pairs and
* store in a list of interface structures.
debug_return;
}
+struct interface *
+get_interfaces(void)
+{
+ return interfaces;
+}
+
void
dump_interfaces(const char *ai)
{
int get_net_ifs(char **addrinfo);
void dump_interfaces(const char *);
void set_interfaces(const char *);
-
-/*
- * Definitions for external variables.
- */
-#ifndef _SUDO_MAIN
-extern struct interface *interfaces;
-#endif
+struct interface *get_interfaces(void);
#endif /* _SUDO_INTERFACES_H */
addr.ip4.s_addr = inet_addr(n);
}
- for (ifp = interfaces; ifp != NULL; ifp = ifp->next) {
+ for (ifp = get_interfaces(); ifp != NULL; ifp = ifp->next) {
if (ifp->family != family)
continue;
switch (family) {
}
#endif /* HAVE_STRUCT_IN6_ADDR */
- for (ifp = interfaces; ifp != NULL; ifp = ifp->next) {
+ for (ifp = get_interfaces(); ifp != NULL; ifp = ifp->next) {
if (ifp->family != family)
continue;
switch (family) {
*/
struct sudo_user sudo_user;
struct passwd *list_pw;
-struct interface *interfaces;
int long_list;
uid_t timestamp_uid;
extern int errorlineno;
/*
* Globals
*/
-struct interface *interfaces;
struct sudo_user sudo_user;
struct passwd *list_pw;
static char *runas_group, *runas_user;
#endif
#include "sudoers.h"
-#include "interfaces.h"
#include "parse.h"
#include "redblack.h"
#include "gettext.h"
/*
* Globals
*/
-struct interface *interfaces;
struct sudo_user sudo_user;
struct passwd *list_pw;
sudo_printf_t sudo_printf = visudo_printf;
return false;
}
+/* STUB */
+struct interface *get_interfaces(void)
+{
+ return NULL;
+}
+
/*
* Assuming a parse error occurred, prompt the user for what they want
* to do now. Returns the first letter of their choice.