Request 298 was acted upon.
_________________________________________________________________________

         URL: https://rt.openpkg.org/id/298
      Ticket: [OpenPKG #298]
     Subject: 
  Requestors: [EMAIL PROTECTED]
       Queue: openpkg
       Owner: Nobody
      Status: new
 Transaction: Ticket creado por ms
        Time: Mie. Dic. 03 11:08:25 2003
_________________________________________________________________________

I was able to build tcpwrappers-7.6k-20031021.src.rpm on RedHat 9, but when
I tried to build it on Solaris 9, I got a number of fatal compilation
errors:
 
Vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
/usr/psr/bin/cc -O2 -pipe -O -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID
-DNETGROUP -DGETPEERNAME_
BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK -DDAEMON_UMASK=022
-DREAL_DAEMON_DIR=\"/usr/sbin\" -DPROCESS_OPTIONS -DKILL_IP_OPTIONS
-DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10
-DHOSTS_DENY=\"/usr/psr/etc/tcpwrappers/hosts.deny\"
-DHOSTS_ALLOW=\"/usr/psr/etc/tcpwrappers/hosts.allow\" -DTLI -DNEED_SETENV
-DALWAYS_HOSTNAME -DTCPD_PRIVATE_NAMESPACE -DDISCARD_SUP_GROUPS -c tli2.c
tli2.c: In function `tcpd_tli_host':
tli2.c:84: error: invalid type argument of `->'
tli2.c:85: error: invalid type argument of `->'
tli2.c:86: error: invalid type argument of `->'
tli2.c:88: error: invalid type argument of `->'
tli2.c:89: error: invalid type argument of `->'
tli2.c:90: error: invalid type argument of `->'
tli2.c: In function `tli_cleanup':
tli2.c:107: error: invalid type argument of `->'
tli2.c:108: error: invalid type argument of `->'
tli2.c:109: error: invalid type argument of `->'
tli2.c:110: error: invalid type argument of `->'
tli2.c: In function `tli_endpoints':
tli2.c:147: error: invalid type argument of `->'
tli2.c:163: error: invalid type argument of `->'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Looking closer at tli.c, all of its contents are inside an "#ifdef TLI"
conditional. On Linux, TLI is not set, and on Solaris 9 it is (per the
Makefile).

Now when I actually try to compile this, it's hard to believe that anyone
ever succeeded. Line 80 is:

        if (request->client->unit != 0) {

"request" is defined as "struct request_info *request", which is in turn
defined in tcpd.h. Here is the definition:

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
/* Structure to describe what we know about a service request. */
struct request_info {
    int     fd;                         /* socket handle */
    char    user[TCPD_STRING_LENGTH];   /* access via eval_user(request) */
    char    daemon[TCPD_STRING_LENGTH]; /* access via eval_daemon(request)
*/
    char    pid[12];                    /* access via eval_pid(request) */
    struct host_info client;            /* client endpoint info */
    struct host_info server;            /* server endpoint info */
    void  (*sink) (int);                /* datagram sink function or 0 */
    void  (*hostname) (struct host_info *); /* address to printable hostname
*/
    void  (*hostaddr) (struct host_info *); /* address to printable address
*/
    char  working_buf[2 * TCPD_STRING_LENGTH]; /* Thread local working
buffer */
    void  (*cleanup) (struct request_info *); /* TLI cleanup function or 0
*/
    struct netconfig *config;           /* TLI netdir handle */
};                                                                                     
                                 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Note that "client" is defined as a structure of type host_info, *not* a
structure pointer. Here is the definition of host_info (also in tcpd.h).

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
/* Structure to describe one communications endpoint. */
struct host_info {
    char   name[NI_MAXHOST];         /* access via eval_hostname(host) */
    char   addr[INET6_ADDRSTRLEN];   /* access via eval_hostaddr(host) */
    tcpd_sockaddr au;                /* address union or 0 */
    struct request_info *request;    /* for shared information */
    struct t_unitdata *unit;         /* TLI transport address or 0 */
};                                                                                     
                                 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Based on these definitions, line 80 should read:

        if (request->client.unit != 0) {

Worse than that, line 82 of tli.c reads:

            request->client->sin = &client;

And since there is no element called "sin" in structure host_info, then
changing the "->" to a "." would not fix the problem.

Since tcpd.h is in the same directory as tli.c and is invoked with '#include
"tcpd.h"', and since both request_info and host_info are in this same header
file, it's hard to imagine that the compiler is picking up anything other
than the intended header file; yet, tli.c and tcpd.h don't seem to go
together at all.

Have you OpenPKG folks (or anyone else) compiled this on any system having
System V.4-style TLI support (/usr/include/sys/timod.h, /etc/netconfig, and
the netdir(3) routines)?

Thanks,
       Dennis

Dennis McRitchie
Research & Academic Applications Support (RAAS)
Academic Services Department
Office of Information Technology
Princeton University

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   [EMAIL PROTECTED]

Reply via email to