network is used in a host-based Defaults entry. Bug #766
plugins/sudoers/regress/visudo/test8.err.ok
plugins/sudoers/regress/visudo/test8.out.ok
plugins/sudoers/regress/visudo/test8.sh
+plugins/sudoers/regress/visudo/test9.out.ok
+plugins/sudoers/regress/visudo/test9.sh
plugins/sudoers/set_perms.c
plugins/sudoers/solaris_audit.c
plugins/sudoers/solaris_audit.h
# define INADDR_NONE ((unsigned int)-1)
#endif
-static struct interface_list interfaces;
+static struct interface_list interfaces = SLIST_HEAD_INITIALIZER(interfaces);
/*
* Parse a space-delimited list of IP address/netmask pairs and
--- /dev/null
+stdin: parsed OK
--- /dev/null
+#!/bin/sh
+#
+# Test IP and network address in host-based Defaults statements
+# Bugzilla #766
+#
+
+./visudo -cf - <<-EOF
+ Defaults@127.0.0.1 !authenticate
+ Defaults@10.0.0.0/8 !always_set_home
+ EOF
+
+exit 0
#endif
#include "sudoers.h"
+#include "interfaces.h"
#include "parse.h"
#include "redblack.h"
#include "sudoers_version.h"
}
/* STUB */
-struct interface *get_interfaces(void)
+struct interface_list *
+get_interfaces(void)
{
- return NULL;
+ static struct interface_list dummy = SLIST_HEAD_INITIALIZER(interfaces);
+ return &dummy;
}
/*