Move interface-related defines to interfaces.h so we don't have to include

<netinet/in.h> everywhere.
This commit is contained in:
Todd C. Miller
1999-05-17 01:36:30 +00:00
parent 850a52aa6f
commit 80287c981c
22 changed files with 109 additions and 108 deletions

21
sudo.h
View File

@@ -28,14 +28,6 @@
#include <pathnames.h>
#include "compat.h"
/*
* IP address and netmask pairs for checking against local interfaces.
*/
struct interface {
struct in_addr addr;
struct in_addr netmask;
};
/*
* Data structure used in parsing sudoers;
* top of stack values are the ones that
@@ -222,6 +214,14 @@ struct generic_alias {
#define GETPASS(p, t) tgetpass(p, t)
#endif
/*
* We used to use the system definition of PASS_MAX or _PASSWD_LEN,
* but that caused problems with various alternate authentication
* methods. So, we just define our own and assume that it is >= the
* system max.
*/
#define SUDO_PASS_MAX 256
/*
* Function prototypes
*/
@@ -235,7 +235,7 @@ int putenv __P((const char *));
#endif
char *sudo_goodpath __P((const char *));
int sudo_setenv __P((char *, char *));
char *tgetpass __P((char *, int));
char *tgetpass __P((const char *, int));
int find_path __P((char *, char **));
void log_error __P((int));
void inform_user __P((int));
@@ -243,7 +243,6 @@ void check_user __P((void));
int validate __P((int));
void set_perms __P((int, int));
void remove_timestamp __P((void));
void load_interfaces __P((void));
int check_secureware __P((char *));
void sia_attempt_auth __P((void));
int yyparse __P((void));
@@ -262,8 +261,6 @@ YY_DECL;
extern char host[];
extern char *shost;
extern char cwd[];
extern struct interface *interfaces;
extern int num_interfaces;
extern struct passwd *user_pw_ent;
extern char *runas_user;
extern char *tty;