[3043] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

pending/693: Re: subscribe krbdev

daemon@ATHENA.MIT.EDU (Mad Cap)
Mon Feb 22 21:11:07 1999

Resent-From: gnats@rt-11.MIT.EDU (GNATS Management)
Resent-To: gnats-admin@rt-11.MIT.EDU
Resent-Reply-To: krb5-bugs@MIT.EDU, Mad Cap <tyme@dreams.res.cmu.edu>
Date: Mon, 22 Feb 1999 21:10:42 -0500 (EST)
From: Mad Cap <tyme@dreams.res.cmu.edu>
To: krb5-bugs@MIT.EDU
In-Reply-To: <199902230024.TAA20426@saint-elmos-fire>


>Number:         693
>Category:       pending
>Synopsis:       Re: subscribe krbdev
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Mon Feb 22 21:11:00 EST 1999
>Last-Modified:
>Originator:
>Organization:
>Release:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Audit-Trail:
>Unformatted:
Essentially I have questions about porting telnetd to glibc2.1 correctly,
and possibly other parts of krb5 that haven't gotten compiled yet because
of the compile being stuck on telnetd.

Two minor problems before telnetd were that
  krb5-1.0.5/src/lib/rpc/svc.c has two references to the fds_bits
  member of fd_set, though bits/types.h has:

  /* fd_set for select and pselect.  */
  typedef struct
    {
      /* XPG4.2 requires this member name.  Otherwise avoid the name
         from the global namespace.  */
  #ifdef __USE_XOPEN
      __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
  # define __FDS_BITS(set) ((set)->fds_bits)
  #else
      __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
  # define __FDS_BITS(set) ((set)->__fds_bits)
  #endif
    } __fd_set;

  (somewhere else there is a #define fd_set __fd_set)

  apparently __USE_XOPEN isn't defined, so I've just been renaming the
  fd_set variables in the svc.c to __fd_set.


There are also problems with the wtmpx references, 

  update_wtmp.c:54: `WTMPX_FILE' undeclared (first use in this function)
  --
  a simple fix for this is to #define WTMPX_FILE WTMP_FILE near the
  beginning of update_wtmp.c

  from utmpx.h:

  #ifdef __USE_GNU
  /* Compatibility names for the strings of the canonical file names.  */
  # define UTMPX_FILE     _PATH_UTMPX
  # define UTMPX_FILENAME _PATH_UTMPX
  # define WTMPX_FILE     _PATH_WTMPX
  # define WTMPX_FILENAME _PATH_WTMPX
  #endif

  there are like 3 or 4 "stacked" definitions past this, but eventually
  it works out that UTMPX_FILE == UTMP_FILE


After this, I'm not sure if my "fixes" are actually valid.

  ../../lib/libpty.a(update_wtmp.o): In function `ptyint_update_wtmp':
  update_wtmp.o(.text+0x15): undefined reference to `getutmpx'

  commenting out the relevant #if section of
  krb5-current/src/util/pty/update_wtmp.c (lines 44-55) and 
  forcing lines 58-61 instead (going against the HAVE_<blah> variables 
  configure defined) solves the compile problem, but I'm not sure if other
  runtime problems are introduced.


The problem I haven't figured out yet is this:
  telnetd.c:93: sys/stream.h: No such file or directory

  the only stream.h I've found on my glibc2.1 + egcs 1.1.1 systems is the
  c++ one in /usr/include/g++.  I also haven't found it on one of CMU's
  sun shellboxen.

  commenting that #include out shows what was needed from stream.h:

  telnetd.c: In function `readstream':
  telnetd.c:1543: `M_DATA' undeclared (first use in this function)
  telnetd.c:1543: (Each undeclared identifier is reported only once
  telnetd.c:1543: for each function it appears in.)
  telnetd.c:1559: `M_FLUSH' undeclared (first use in this function)
  telnetd.c:1564: `M_IOCTL' undeclared (first use in this function)
  telnetd.c:1566: dereferencing pointer to incomplete type
  telnetd.c:1568: dereferencing pointer to incomplete type
  telnetd.c:1560: warning: unreachable code at beginning of switch
                  statement

  There are similar problems with stream.h in other source files in the
  krb5-current/src/appl/telnet/telnetd/ directory


Any ideas on how to get around not having stream.h?


Thanks,
Justin


home help back first fref pref prev next nref lref last post