Subject: pkg/7141: a port of freebsd's security/libident package
To: None <gnats-bugs@gnats.netbsd.org>
From: None <woods@mail.weird.com>
List: netbsd-bugs
Date: 03/11/1999 23:22:32
>Number:         7141
>Category:       pkg
>Synopsis:       a port of freebsd's security/libident package
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 11 20:35:01 1999
>Last-Modified:
>Originator:     Greg A. Woods
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Release:        pkgsrc-current
>Environment:

System: NetBSD 1.3.2
System: NetBSD 1.3.3
System: NetBSD-current

>Description:

	NetBSD is missing a native libident and is also missing
	pkgsrc/security/libident.

>How-To-Repeat:

	build something needing libident, such as smail-3

>Fix:

	install the following files in pkgsrc/security/libident

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	Makefile
#	files
#	files/md5
#	patches
#	patches/patch-aa
#	patches/patch-ab
#	pkg
#	pkg/COMMENT
#	pkg/DESCR
#	pkg/PLIST
#
echo x - Makefile
sed 's/^X//' >Makefile << 'END-of-Makefile'
X# New ports collection makefile for:	libident
X# Version required:	0.21
X# Date created:		9 October 1995
X# Whom:			torstenb@FreeBSD.ORG
X# NetBSD port by:	woods@planix.com (Greg A. Woods)
X#
X# $NetBSD$
X# $FreeBSD: Makefile,v 1.6 1998/01/25 20:42:37 torstenb Exp $
X#
X
XDISTNAME=	libident-0.21
XCATEGORIES=	devel net security
XMASTER_SITES=	ftp://ftp.lysator.liu.se/pub/ident/libs/
X
XMAINTAINER=	packages@NetBSD.org
X
XALL_TARGET=	netbsd
XMAN3=		ident.3
X
X.include <../../mk/bsd.pkg.mk>
END-of-Makefile
echo c - files
mkdir -p files > /dev/null 2>&1
echo x - files/md5
sed 's/^X//' >files/md5 << 'END-of-files/md5'
XMD5 (libident-0.21.tar.gz) = 34d95b7f60bf02b9c36be6397479e58c
END-of-files/md5
echo c - patches
mkdir -p patches > /dev/null 2>&1
echo x - patches/patch-aa
sed 's/^X//' >patches/patch-aa << 'END-of-patches/patch-aa'
X*** Makefile.o	Sat Jan 24 17:11:37 1998
X***************
X*** 8,14 ****
X  RANLIB=ranlib
X  AR=ar cq
X  
X! INSTROOT=/usr/local
X  LIBDIR=$(INSTROOT)/lib
X  INCDIR=$(INSTROOT)/include
X  MANDIR=$(INSTROOT)/man/man3
X--- 8,14 ----
X  RANLIB=ranlib
X  AR=ar cq
X  
X! INSTROOT=${PREFIX}
X  LIBDIR=$(INSTROOT)/lib
X  INCDIR=$(INSTROOT)/include
X  MANDIR=$(INSTROOT)/man/man3
X***************
X*** 19,25 ****
X  # Add -DHAVE_ANSIHEADERS if your system have the ANSI C header files
X  # needed for our purposes (stdlib, string, unistd).
X  #
X! CFLAGS = -O
X  
X  LDLIBS =
X  LIBIDENT = libident.a
X--- 19,25 ----
X  # Add -DHAVE_ANSIHEADERS if your system have the ANSI C header files
X  # needed for our purposes (stdlib, string, unistd).
X  #
X! #CFLAGS = -O
X  
X  LDLIBS =
X  LIBIDENT = libident.a
X***************
X*** 33,38 ****
X--- 33,39 ----
X  	@echo aix
X  	@echo bsd
X  	@echo bsd2.11
X+ 	@echo netbsd
X  	@echo dynix
X  	@echo hpux
X  	@echo irix
X***************
X*** 126,131 ****
X--- 127,134 ----
X  bsd2.11:
X  	@$(MAKE) all CC="$(CC)" CFLAGS="-O -DSIGRETURNTYPE=int -DHAVE_ANSIHEADERS"
X  
X+ netbsd:
X+ 	@$(MAKE) all CC="$(CC)" CFLAGS="${CFLAGS} -Wall -DHAVE_ANSIHEADERS"
X  
X  #
X  #
END-of-patches/patch-aa
echo x - patches/patch-ab
sed 's/^X//' >patches/patch-ab << 'END-of-patches/patch-ab'
X*** ident.h.orig	Thu Nov 23 14:44:36 1995
X***************
X*** 13,22 ****
X  #endif
X  
X  /* Sigh */
X! #ifdef __STDC__
X! #  if __STDC__ == 1
X! #    define IS_STDC 1
X! #  endif
X  #endif
X  
X  #ifdef __P
X--- 13,20 ----
X  #endif
X  
X  /* Sigh */
X! #if (0 - __STDC__) <= -1
X! #  define IS_STDC 1
X  #endif
X  
X  #ifdef __P
X***************
X*** 96,129 ****
X  #  include <bstring.h>
X  #endif
X  #include <sys/types.h>
X  #include <netinet/in.h>
X- #include <sys/time.h>
X  
X  #if defined(VMS) && !defined(FD_SETSIZE)
X  #  define FD_SETSIZE 64
X  #endif
X  
X- /*
X-  * Sigh, GCC v2 complains when using undefined struct tags
X-  * in function prototypes...
X-  */
X- #if defined(__GNUC__) && !defined(INADDR_ANY)
X- #  define __STRUCT_IN_ADDR_P	void *
X- #else
X- #  define __STRUCT_IN_ADDR_P	struct in_addr *
X- #endif
X- 
X- #if defined(__GNUC__) && !defined(DST_NONE)
X- #  define __STRUCT_TIMEVAL_P	void *
X- #else
X- #  define __STRUCT_TIMEVAL_P	struct timeval *
X- #endif
X- 
X- #if defined(__sgi) && defined(_POSIX_SOURCE)
X- #  undef  __STRUCT_TIMEVAL_P
X- #  define __STRUCT_TIMEVAL_P	void *
X- #endif
X- 	
X  #ifndef IDBUFSIZE
X  #  define IDBUFSIZE 2048
X  #endif
X--- 94,115 ----
X  #  include <bstring.h>
X  #endif
X  #include <sys/types.h>
X+ #if TIME_WITH_SYS_TIME
X+ # include <sys/time.h>
X+ # include <time.h>
X+ #else
X+ # if HAVE_SYS_TIME_H
X+ #  include <sys/time.h>
X+ # else
X+ #  include <time.h>
X+ # endif
X+ #endif
X  #include <netinet/in.h>
X  
X  #if defined(VMS) && !defined(FD_SETSIZE)
X  #  define FD_SETSIZE 64
X  #endif
X  
X  #ifndef IDBUFSIZE
X  #  define IDBUFSIZE 2048
X  #endif
X***************
X*** 149,167 ****
X  /* Low-level calls and macros */
X  #define id_fileno(ID)	((ID)->fd)
X  
X! extern ident_t * id_open __P((__STRUCT_IN_ADDR_P laddr,
X! 			   __STRUCT_IN_ADDR_P faddr,
X! 			   __STRUCT_TIMEVAL_P timeout));
X    
X  extern int    id_close __P((ident_t *id));
X    
X  extern int    id_query __P((ident_t *id,
X  			    int lport,
X  			    int fport,
X! 			    __STRUCT_TIMEVAL_P timeout));
X    
X  extern int    id_parse __P((ident_t *id,
X! 			    __STRUCT_TIMEVAL_P timeout,
X  			    int *lport,
X  			    int *fport,
X  			    char **identifier,
X--- 135,153 ----
X  /* Low-level calls and macros */
X  #define id_fileno(ID)	((ID)->fd)
X  
X! extern ident_t * id_open __P((struct in_addr * laddr,
X! 			   struct in_addr * faddr,
X! 			   struct timeval * timeout));
X    
X  extern int    id_close __P((ident_t *id));
X    
X  extern int    id_query __P((ident_t *id,
X  			    int lport,
X  			    int fport,
X! 			    struct timeval * timeout));
X    
X  extern int    id_parse __P((ident_t *id,
X! 			    struct timeval * timeout,
X  			    int *lport,
X  			    int *fport,
X  			    char **identifier,
X***************
X*** 174,180 ****
X  
X  extern char  *ident_id __P((int fd, int timeout));
X  
X! extern IDENT *ident_query __P(( __STRUCT_IN_ADDR_P laddr, __STRUCT_IN_ADDR_P raddr, int lport, int rport, int timeout));
X  
X  extern void   ident_free __P((IDENT *id));
X  
X--- 160,166 ----
X  
X  extern char  *ident_id __P((int fd, int timeout));
X  
X! extern IDENT *ident_query __P(( struct in_addr * laddr, struct in_addr * raddr, int lport, int rport, int timeout));
X  
X  extern void   ident_free __P((IDENT *id));
X  
END-of-patches/patch-ab
echo c - pkg
mkdir -p pkg > /dev/null 2>&1
echo x - pkg/COMMENT
sed 's/^X//' >pkg/COMMENT << 'END-of-pkg/COMMENT'
XA small library to interface the ident protocol server (rfc1413).
END-of-pkg/COMMENT
echo x - pkg/DESCR
sed 's/^X//' >pkg/DESCR << 'END-of-pkg/DESCR'
XCOPYRIGHT ISSUES:
X
X	This version of 'libident' is hereby released into the
X	Public Domain. It may be distributed for a fee or without
X	a fee. We only ask you not to pretend you wrote it.
X
XIf you make any changes, please send sources or a diff of it to
Xus (pen@lysator.liu.se or pell@lysator.liu.se), so we can keep
X_one_ unified version of libident available...
X
XCOMMENTS:
X
XThis is the second stab at a small library to interface to the Ident
Xprotocol server. Maybe this will work correctly on some machines.. :-)
X 
XThe ident-tester.c file is a small daemon (to be started from Inetd)
Xthat does an ident lookup on you if you telnet into it. Can be used
Xto verify that your Ident server is working correctly.
X 
XI'm currently running this "ident-tester" on port 114 at lysator.liu.se
X(130.236.254.1) if you wish to test your server.
END-of-pkg/DESCR
echo x - pkg/PLIST
sed 's/^X//' >pkg/PLIST << 'END-of-pkg/PLIST'
X@comment $NetBSD$
Xinclude/ident.h
Xlib/libident.a
Xman/man3/ident.3.gz
END-of-pkg/PLIST
exit

>Audit-Trail:
>Unformatted: