Project

General

Profile

Actions

Bug #4385

closed

Missing hosts_ctl() prototype in tcpd.h

Added by Marcel Telka almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
lib - userland libraries
Start date:
2013-12-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

According the hosts_access(3) man page the hosts_ctl() prototype should be in tcpd.h:

SYNOPSIS
     #include "tcpd.h" 

     extern int allow_severity;
     extern int deny_severity;

     struct request_info *request_init(request, key, value, ..., 0)
     struct request_info *request;

     struct request_info *request_set(request, key, value, ..., 0)
     struct request_info *request;

     int hosts_access(request)
     struct request_info *request;

     int hosts_ctl(daemon, client_name, client_addr, client_user)
     char *daemon;
     char *client_name;
     char *client_addr;
     char *client_user;

but it isn't:

$ cat h.c 
#include "tcpd.h" 

int main(void)
{
    hosts_ctl();
    return (0);
}
$ gcc -Wimplicit-function-declaration -c h.c 
h.c: In function ‘main’:
h.c:5:2: warning: implicit declaration of function ‘hosts_ctl’ [-Wimplicit-function-declaration]
$

The hosts_ctl() prototype should be added to the tcpd.h header file.

Actions

Also available in: Atom PDF