Also remove unnecessary extern keywords from tcpd.h.
Noticed by: kib X-MFC-With: r311459
This commit is contained in:
parent
fd3e9b3896
commit
8da8161b26
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311461
@ -69,22 +69,22 @@ extern char paranoid[];
|
||||
/* Global functions. */
|
||||
|
||||
#if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
|
||||
extern void fromhost(struct request_info *); /* get/validate client host info */
|
||||
void fromhost(struct request_info *); /* get/validate client host info */
|
||||
#else
|
||||
#define fromhost sock_host /* no TLI support needed */
|
||||
#define fromhost sock_host /* no TLI support needed */
|
||||
#endif
|
||||
|
||||
extern int hosts_access(struct request_info *); /* access control */
|
||||
extern int hosts_ctl(char *, char *, char *, char *); /* wrapper around request_init() */
|
||||
extern void shell_cmd(char *); /* execute shell command */
|
||||
extern char *percent_x(char *, int, char *, struct request_info *); /* do %<char> expansion */
|
||||
extern void rfc931(TCPD_SOCKADDR *, TCPD_SOCKADDR *, char *); /* client name from RFC 931 daemon */
|
||||
extern void clean_exit(struct request_info *); /* clean up and exit */
|
||||
extern void refuse(struct request_info *); /* clean up and exit */
|
||||
extern char *xgets(char *, int, FILE *); /* fgets() on steroids */
|
||||
int hosts_access(struct request_info *); /* access control */
|
||||
int hosts_ctl(char *, char *, char *, char *); /* wrapper around request_init() */
|
||||
void shell_cmd(char *); /* execute shell command */
|
||||
char *percent_x(char *, int, char *, struct request_info *); /* do %<char> expansion */
|
||||
void rfc931(TCPD_SOCKADDR *, TCPD_SOCKADDR *, char *); /* client name from RFC 931 daemon */
|
||||
void clean_exit(struct request_info *); /* clean up and exit */
|
||||
void refuse(struct request_info *); /* clean up and exit */
|
||||
char *xgets(char *, int, FILE *); /* fgets() on steroids */
|
||||
|
||||
extern char *split_at(char *, int); /* strchr() and split */
|
||||
extern unsigned long dot_quad_addr(char *); /* restricted inet_addr() */
|
||||
char *split_at(char *, int); /* strchr() and split */
|
||||
unsigned long dot_quad_addr(char *); /* restricted inet_addr() */
|
||||
|
||||
/* Global variables. */
|
||||
|
||||
@ -101,8 +101,8 @@ extern int resident; /* > 0 if resident process */
|
||||
* attributes. Each attribute has its own key.
|
||||
*/
|
||||
|
||||
extern struct request_info *request_init(struct request_info *,...); /* initialize request */
|
||||
extern struct request_info *request_set(struct request_info *,...); /* update request structure */
|
||||
struct request_info *request_init(struct request_info *,...); /* initialize request */
|
||||
struct request_info *request_set(struct request_info *,...); /* update request structure */
|
||||
|
||||
#define RQ_FILE 1 /* file descriptor */
|
||||
#define RQ_DAEMON 2 /* server process (argv[0]) */
|
||||
@ -122,27 +122,27 @@ extern struct request_info *request_set(struct request_info *,...); /* update re
|
||||
* host_info structures serve as caches for the lookup results.
|
||||
*/
|
||||
|
||||
extern char *eval_user(struct request_info *); /* client user */
|
||||
extern char *eval_hostname(struct host_info *); /* printable hostname */
|
||||
extern char *eval_hostaddr(struct host_info *); /* printable host address */
|
||||
extern char *eval_hostinfo(struct host_info *); /* host name or address */
|
||||
extern char *eval_client(struct request_info *); /* whatever is available */
|
||||
extern char *eval_server(struct request_info *); /* whatever is available */
|
||||
char *eval_user(struct request_info *); /* client user */
|
||||
char *eval_hostname(struct host_info *); /* printable hostname */
|
||||
char *eval_hostaddr(struct host_info *); /* printable host address */
|
||||
char *eval_hostinfo(struct host_info *); /* host name or address */
|
||||
char *eval_client(struct request_info *); /* whatever is available */
|
||||
char *eval_server(struct request_info *); /* whatever is available */
|
||||
#define eval_daemon(r) ((r)->daemon) /* daemon process name */
|
||||
#define eval_pid(r) ((r)->pid) /* process id */
|
||||
|
||||
/* Socket-specific methods, including DNS hostname lookups. */
|
||||
|
||||
extern void sock_host(struct request_info *); /* look up endpoint addresses */
|
||||
extern void sock_hostname(struct host_info *); /* translate address to hostname */
|
||||
extern void sock_hostaddr(struct host_info *); /* address to printable address */
|
||||
void sock_host(struct request_info *); /* look up endpoint addresses */
|
||||
void sock_hostname(struct host_info *); /* translate address to hostname */
|
||||
void sock_hostaddr(struct host_info *); /* address to printable address */
|
||||
#define sock_methods(r) \
|
||||
{ (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; }
|
||||
|
||||
/* The System V Transport-Level Interface (TLI) interface. */
|
||||
|
||||
#if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
|
||||
extern void tli_host(struct request_info *); /* look up endpoint addresses etc. */
|
||||
void tli_host(struct request_info *); /* look up endpoint addresses etc. */
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -151,8 +151,8 @@ extern void tli_host(struct request_info *); /* look up endpoint addresses etc.
|
||||
* everyone would have to include <setjmp.h>.
|
||||
*/
|
||||
|
||||
extern void tcpd_warn(char *, ...); /* report problem and proceed */
|
||||
extern void tcpd_jump(char *, ...); /* report problem and jump */
|
||||
void tcpd_warn(char *, ...); /* report problem and proceed */
|
||||
void tcpd_jump(char *, ...); /* report problem and jump */
|
||||
|
||||
struct tcpd_context {
|
||||
char *file; /* current file */
|
||||
@ -178,42 +178,42 @@ extern struct tcpd_context tcpd_context;
|
||||
* behavior.
|
||||
*/
|
||||
|
||||
extern void process_options(char *, struct request_info *); /* execute options */
|
||||
extern int dry_run; /* verification flag */
|
||||
void process_options(char *, struct request_info *); /* execute options */
|
||||
extern int dry_run; /* verification flag */
|
||||
|
||||
/* Bug workarounds. */
|
||||
|
||||
#ifdef INET_ADDR_BUG /* inet_addr() returns struct */
|
||||
#define inet_addr fix_inet_addr
|
||||
extern long fix_inet_addr(char *);
|
||||
long fix_inet_addr(char *);
|
||||
#endif
|
||||
|
||||
#ifdef BROKEN_FGETS /* partial reads from sockets */
|
||||
#define fgets fix_fgets
|
||||
extern char *fix_fgets(char *, int, FILE *);
|
||||
char *fix_fgets(char *, int, FILE *);
|
||||
#endif
|
||||
|
||||
#ifdef RECVFROM_BUG /* no address family info */
|
||||
#define recvfrom fix_recvfrom
|
||||
extern int fix_recvfrom(int, char *, int, int, struct sockaddr *, int *);
|
||||
int fix_recvfrom(int, char *, int, int, struct sockaddr *, int *);
|
||||
#endif
|
||||
|
||||
#ifdef GETPEERNAME_BUG /* claims success with UDP */
|
||||
#define getpeername fix_getpeername
|
||||
extern int fix_getpeername(int, struct sockaddr *, int *);
|
||||
int fix_getpeername(int, struct sockaddr *, int *);
|
||||
#endif
|
||||
|
||||
#ifdef SOLARIS_24_GETHOSTBYNAME_BUG /* lists addresses as aliases */
|
||||
#define gethostbyname fix_gethostbyname
|
||||
extern struct hostent *fix_gethostbyname(char *);
|
||||
struct hostent *fix_gethostbyname(char *);
|
||||
#endif
|
||||
|
||||
#ifdef USE_STRSEP /* libc calls strtok() */
|
||||
#define strtok fix_strtok
|
||||
extern char *fix_strtok(char *, char *);
|
||||
char *fix_strtok(char *, char *);
|
||||
#endif
|
||||
|
||||
#ifdef LIBC_CALLS_STRTOK /* libc calls strtok() */
|
||||
#define strtok my_strtok
|
||||
extern char *my_strtok(char *, char *);
|
||||
char *my_strtok(char *, char *);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user