Move union sudo_in_addr_un into interfaces.h
This commit is contained in:
@@ -22,23 +22,23 @@
|
|||||||
#ifndef _SUDO_INTERFACES_H
|
#ifndef _SUDO_INTERFACES_H
|
||||||
#define _SUDO_INTERFACES_H
|
#define _SUDO_INTERFACES_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Union to hold either strucr in_addr or in6_add
|
||||||
|
*/
|
||||||
|
union sudo_in_addr_un {
|
||||||
|
struct in_addr ip4;
|
||||||
|
#ifdef HAVE_IN6_ADDR
|
||||||
|
struct in6_addr ip6;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IP address and netmask pairs for checking against local interfaces.
|
* IP address and netmask pairs for checking against local interfaces.
|
||||||
*/
|
*/
|
||||||
struct interface {
|
struct interface {
|
||||||
int family; /* AF_INET or AF_INET6 */
|
int family; /* AF_INET or AF_INET6 */
|
||||||
union {
|
union sudo_in_addr_un addr;
|
||||||
struct in_addr ip4;
|
union sudo_in_addr_un netmask;
|
||||||
#ifdef HAVE_IN6_ADDR
|
|
||||||
struct in6_addr ip6;
|
|
||||||
#endif
|
|
||||||
} addr;
|
|
||||||
union {
|
|
||||||
struct in_addr ip4;
|
|
||||||
#ifdef HAVE_IN6_ADDR
|
|
||||||
struct in6_addr ip6;
|
|
||||||
#endif
|
|
||||||
} netmask;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -105,13 +105,6 @@ static int command_matches_normal(char *, char *);
|
|||||||
*/
|
*/
|
||||||
#define has_meta(s) (strpbrk(s, "\\?*[]") != NULL)
|
#define has_meta(s) (strpbrk(s, "\\?*[]") != NULL)
|
||||||
|
|
||||||
union sudo_in_addr_un {
|
|
||||||
struct in_addr ip4;
|
|
||||||
#ifdef HAVE_IN6_ADDR
|
|
||||||
struct in6_addr ip6;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for user described by pw in a list of members.
|
* Check for user described by pw in a list of members.
|
||||||
* Returns ALLOW, DENY or UNSPEC.
|
* Returns ALLOW, DENY or UNSPEC.
|
||||||
|
Reference in New Issue
Block a user