Compare commits

...
Author SHA1 Message Date
cvs2svn 37af766bc5 This commit was manufactured by cvs2svn to create tag
'RELENG_3_4_0_RELEASE'.
1999-12-20 00:16:49 +00:00
158 changed files with 36 additions and 22864 deletions

No files matched your search

-106
View File
@@ -1,106 +0,0 @@
1999-07-03 Assar Westerlund <[email protected]>
* parse.y (statement): use asprintf
1999-06-13 Assar Westerlund <[email protected]>
* Makefile.in: make it solaris make vpath-safe
Thu Apr 1 11:13:53 1999 Johan Danielsson <[email protected]>
* compile_et.c: use getargs
Sat Mar 20 00:16:30 1999 Assar Westerlund <[email protected]>
* compile_et.c: static-ize
Thu Mar 18 11:22:13 1999 Johan Danielsson <[email protected]>
* Makefile.am: include Makefile.am.common
Tue Mar 16 22:30:05 1999 Assar Westerlund <[email protected]>
* parse.y: use YYACCEPT instead of return
Sat Mar 13 22:22:56 1999 Assar Westerlund <[email protected]>
* compile_et.c (generate_h): cast when calling is* to get rid of a
warning
Thu Mar 11 15:00:51 1999 Johan Danielsson <[email protected]>
* parse.y: prototype for error_message
Sun Nov 22 10:39:02 1998 Assar Westerlund <[email protected]>
* compile_et.h: include ctype and roken
* compile_et.c: include err.h
(generate_h): remove unused variable
* Makefile.in (WFLAGS): set
Fri Nov 20 06:58:59 1998 Assar Westerlund <[email protected]>
* lex.l: undef ECHO to work around AIX lex bug
Sun Sep 27 02:23:59 1998 Johan Danielsson <[email protected]>
* com_err.c (error_message): try to pass code to strerror, to see
if it might be an errno code (this if broken, but some MIT code
seems to expect this behaviour)
Sat Sep 26 17:42:39 1998 Johan Danielsson <[email protected]>
* compile_et.c: <foo_err.h> -> "foo_err.h"
Tue Jun 30 17:17:36 1998 Assar Westerlund <[email protected]>
* Makefile.in: add str{cpy,cat}_truncate
Mon May 25 05:24:39 1998 Assar Westerlund <[email protected]>
* Makefile.in (clean): try to remove shared library debris
Sun Apr 19 09:50:17 1998 Assar Westerlund <[email protected]>
* Makefile.in: add symlink magic for linux
Sun Apr 5 09:22:11 1998 Assar Westerlund <[email protected]>
* parse.y: define alloca to malloc in case we're using bison but
don't have alloca
Tue Mar 24 05:13:01 1998 Assar Westerlund <[email protected]>
* Makefile.in: link with snprintf (From Derrick J Brashear
<[email protected]>)
Fri Feb 27 05:01:42 1998 Assar Westerlund <[email protected]>
* parse.y: initialize ec->next
Thu Feb 26 02:22:25 1998 Assar Westerlund <[email protected]>
* Makefile.am: @LEXLIB@
Sat Feb 21 15:18:54 1998 assar westerlund <[email protected]>
* Makefile.in: set YACC and LEX
Tue Feb 17 22:20:27 1998 Bjoern Groenvall <[email protected]>
* com_right.h: Change typedefs so that one may mix MIT compile_et
generated code with krb4 dito.
Tue Feb 17 16:30:55 1998 Johan Danielsson <[email protected]>
* compile_et.c (generate): Always return a value.
* parse.y: Files don't have to end with `end'.
Mon Feb 16 16:09:20 1998 Johan Danielsson <[email protected]>
* lex.l (getstring): Replace getc() with input().
* Makefile.am: Fixes for new compile_et.
-24
View File
@@ -1,24 +0,0 @@
# $Id: Makefile.am,v 1.23 1999/04/09 18:26:55 assar Exp $
include $(top_srcdir)/Makefile.am.common
YFLAGS = -d
lib_LTLIBRARIES = libcom_err.la
libcom_err_la_LDFLAGS = -version-info 1:0:0
bin_PROGRAMS = compile_et
include_HEADERS = com_err.h com_right.h
compile_et_SOURCES = compile_et.c compile_et.h parse.y lex.l
libcom_err_la_SOURCES = error.c com_err.c roken_rename.h
CLEANFILES = lex.c parse.c parse.h
$(compile_et_OBJECTS): parse.h
compile_et_LDADD = \
$(LIB_roken) \
$(LEXLIB)
-710
View File
@@ -1,710 +0,0 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# $Id: Makefile.am,v 1.23 1999/04/09 18:26:55 assar Exp $
# $Id: Makefile.am.common,v 1.3 1999/04/01 14:58:43 joda Exp $
# $Id: Makefile.am.common,v 1.12 1999/07/28 00:54:29 assar Exp $
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AFS_EXTRA_LD = @AFS_EXTRA_LD@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CC = @CC@
DBLIB = @DBLIB@
EXEEXT = @EXEEXT@
EXTRA_LIB45 = @EXTRA_LIB45@
GROFF = @GROFF@
INCLUDE_ = @INCLUDE_@
LD = @LD@
LEX = @LEX@
LIBOBJS = @LIBOBJS@
LIBTOOL = @LIBTOOL@
LIB_ = @LIB_@
LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@
LIB_kdb = @LIB_kdb@
LIB_otp = @LIB_otp@
LIB_roken = @LIB_roken@
LIB_security = @LIB_security@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_X_PROGS_BIN_PROGS = @MAKE_X_PROGS_BIN_PROGS@
MAKE_X_PROGS_BIN_SCRPTS = @MAKE_X_PROGS_BIN_SCRPTS@
MAKE_X_PROGS_LIBEXEC_PROGS = @MAKE_X_PROGS_LIBEXEC_PROGS@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
NM = @NM@
NROFF = @NROFF@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
YACC = @YACC@
AUTOMAKE_OPTIONS = foreign no-dependencies
SUFFIXES = .et .h .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .x
INCLUDES = -I$(top_builddir)/include
AM_CFLAGS = $(WFLAGS)
COMPILE_ET = $(top_builddir)/lib/com_err/compile_et
buildinclude = $(top_builddir)/include
LIB_XauReadAuth = @LIB_XauReadAuth@
LIB_crypt = @LIB_crypt@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_el_init = @LIB_el_init@
LIB_getattr = @LIB_getattr@
LIB_gethostbyname = @LIB_gethostbyname@
LIB_getpwent_r = @LIB_getpwent_r@
LIB_getpwnam_r = @LIB_getpwnam_r@
LIB_getsockopt = @LIB_getsockopt@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
LIB_odm_initialize = @LIB_odm_initialize@
LIB_readline = @LIB_readline@
LIB_res_search = @LIB_res_search@
LIB_setpcred = @LIB_setpcred@
LIB_setsockopt = @LIB_setsockopt@
LIB_socket = @LIB_socket@
LIB_syslog = @LIB_syslog@
LIB_tgetent = @LIB_tgetent@
HESIODLIB = @HESIODLIB@
HESIODINCLUDE = @HESIODINCLUDE@
INCLUDE_hesiod = @INCLUDE_hesiod@
LIB_hesiod = @LIB_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
LIB_krb4 = @LIB_krb4@
INCLUDE_readline = @INCLUDE_readline@
LEXLIB = @LEXLIB@
cat1dir = $(mandir)/cat1
cat3dir = $(mandir)/cat3
cat5dir = $(mandir)/cat5
cat8dir = $(mandir)/cat8
MANRX = \(.*\)\.\([0-9]\)
CATSUFFIX = @CATSUFFIX@
NROFF_MAN = groff -mandoc -Tascii
@KRB4_TRUE@LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la $(top_builddir)/lib/asn1/libasn1.la
@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
CHECK_LOCAL = $(PROGRAMS)
YFLAGS = -d
lib_LTLIBRARIES = libcom_err.la
libcom_err_la_LDFLAGS = -version-info 1:0:0
bin_PROGRAMS = compile_et
include_HEADERS = com_err.h com_right.h
compile_et_SOURCES = compile_et.c compile_et.h parse.y lex.l
libcom_err_la_SOURCES = error.c com_err.c roken_rename.h
CLEANFILES = lex.c parse.c parse.h
compile_et_LDADD = $(LIB_roken) $(LEXLIB)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../include/config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(lib_LTLIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I../../include
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
X_CFLAGS = @X_CFLAGS@
X_LIBS = @X_LIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
libcom_err_la_LIBADD =
libcom_err_la_OBJECTS = error.lo com_err.lo
bin_PROGRAMS = compile_et$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
compile_et_OBJECTS = compile_et.$(OBJEXT) parse.$(OBJEXT) lex.$(OBJEXT)
compile_et_DEPENDENCIES =
compile_et_LDFLAGS =
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
HEADERS = $(include_HEADERS)
DIST_COMMON = ChangeLog Makefile.am Makefile.in lex.c parse.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
SOURCES = $(libcom_err_la_SOURCES) $(compile_et_SOURCES)
OBJECTS = $(libcom_err_la_OBJECTS) $(compile_et_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .1 .3 .5 .8 .S .c .cat1 .cat3 .cat5 .cat8 .et .h .l .lo .o .obj .s .x .y
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common
cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/com_err/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-libLTLIBRARIES:
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
distclean-libLTLIBRARIES:
maintainer-clean-libLTLIBRARIES:
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(libdir)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
done
.c.o:
$(COMPILE) -c $<
# FIXME: We should only use cygpath when building on Windows,
# and only if it is available.
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core *.core
-rm -f *.$(OBJEXT)
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
.c.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.s.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.S.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
maintainer-clean-libtool:
libcom_err.la: $(libcom_err_la_OBJECTS) $(libcom_err_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libcom_err_la_LDFLAGS) $(libcom_err_la_OBJECTS) $(libcom_err_la_LIBADD) $(LIBS)
mostlyclean-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-binPROGRAMS:
maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done
compile_et$(EXEEXT): $(compile_et_OBJECTS) $(compile_et_DEPENDENCIES)
@rm -f compile_et$(EXEEXT)
$(LINK) $(compile_et_LDFLAGS) $(compile_et_OBJECTS) $(compile_et_LDADD) $(LIBS)
.l.c:
$(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
.y.c:
$(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
parse.h: parse.c
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(includedir)
@list='$(include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
done
uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
list='$(include_HEADERS)'; for p in $$list; do \
rm -f $(DESTDIR)$(includedir)/$$p; \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = lib/com_err
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am: install-libLTLIBRARIES install-binPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-exec: install-exec-am
install-data-am: install-includeHEADERS install-data-local
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-libLTLIBRARIES uninstall-binPROGRAMS \
uninstall-includeHEADERS
uninstall: uninstall-am
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) all-local
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) \
$(DESTDIR)$(includedir)
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-test -z "lexlparsehparsec" || rm -f lexl parseh parsec
mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
mostlyclean-libtool mostlyclean-binPROGRAMS \
mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-libLTLIBRARIES clean-compile clean-libtool \
clean-binPROGRAMS clean-tags clean-generic \
mostlyclean-am
clean: clean-am
distclean-am: distclean-libLTLIBRARIES distclean-compile \
distclean-libtool distclean-binPROGRAMS distclean-tags \
distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-binPROGRAMS maintainer-clean-tags \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
distclean-compile clean-compile maintainer-clean-compile \
mostlyclean-libtool distclean-libtool clean-libtool \
maintainer-clean-libtool mostlyclean-binPROGRAMS distclean-binPROGRAMS \
clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \
install-binPROGRAMS uninstall-includeHEADERS install-includeHEADERS \
tags mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
distdir info-am info dvi-am dvi check-local check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-local install-data-am install-data install-am install \
uninstall-am uninstall all-local all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-suid-programs:
@foo='$(bin_SUIDS)'; \
for file in $$foo; do \
x=$(DESTDIR)$(bindir)/$$file; \
if chown 0:0 $$x && chmod u+s $$x; then :; else \
chmod 0 $$x; fi; done
install-exec-hook: install-suid-programs
install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
@foo='$(include_HEADERS) $(build_HEADERZ)'; \
for f in $$foo; do \
f=`basename $$f`; \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
if cmp -s $$file $(buildinclude)/$$f 2> /dev/null ; then \
: ; else \
echo " $(INSTALL_DATA) $$file $(buildinclude)/$$f"; \
$(INSTALL_DATA) $$file $(buildinclude)/$$f; \
fi ; \
done
all-local: install-build-headers
#NROFF_MAN = nroff -man
.1.cat1:
$(NROFF_MAN) $< > $@
.3.cat3:
$(NROFF_MAN) $< > $@
.5.cat5:
$(NROFF_MAN) $< > $@
.8.cat8:
$(NROFF_MAN) $< > $@
dist-cat1-mans:
@foo='$(man1_MANS)'; \
bar='$(man_MANS)'; \
for i in $$bar; do \
case $$i in \
*.1) foo="$$foo $$i";; \
esac; done ;\
for i in $$foo; do \
x=`echo $$i | sed 's/\.[^.]*$$/.cat1/'`; \
echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
done
dist-cat3-mans:
@foo='$(man3_MANS)'; \
bar='$(man_MANS)'; \
for i in $$bar; do \
case $$i in \
*.3) foo="$$foo $$i";; \
esac; done ;\
for i in $$foo; do \
x=`echo $$i | sed 's/\.[^.]*$$/.cat3/'`; \
echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
done
dist-cat5-mans:
@foo='$(man5_MANS)'; \
bar='$(man_MANS)'; \
for i in $$bar; do \
case $$i in \
*.5) foo="$$foo $$i";; \
esac; done ;\
for i in $$foo; do \
x=`echo $$i | sed 's/\.[^.]*$$/.cat5/'`; \
echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
done
dist-cat8-mans:
@foo='$(man8_MANS)'; \
bar='$(man_MANS)'; \
for i in $$bar; do \
case $$i in \
*.8) foo="$$foo $$i";; \
esac; done ;\
for i in $$foo; do \
x=`echo $$i | sed 's/\.[^.]*$$/.cat8/'`; \
echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
done
dist-hook: dist-cat1-mans dist-cat3-mans dist-cat5-mans dist-cat8-mans
install-cat1-mans:
@ext=1;\
foo='$(man1_MANS)'; \
bar='$(man_MANS)'; \
for i in $$bar; do \
case $$i in \
*.1) foo="$$foo $$i";; \
esac; done; \
if test "$$foo"; then \
$(mkinstalldirs) $(DESTDIR)$(cat1dir); \
for x in $$foo; do \
f=`echo $$x | sed 's/\.[^.]*$$/.cat1/'`; \
if test -f "$(srcdir)/$$f"; then \
b=`echo $$x | sed 's!$(MANRX)!\1!'`; \
echo "$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(cat1dir)/$$b.$(CATSUFFIX)";\
$(INSTALL_DATA) $(srcdir)/$$g $(DESTDIR)$(cat1dir)/$$b.$(CATSUFFIX);\
fi; \
done ;\
fi
install-cat3-mans:
@ext=3;\
foo='$(man3_MANS)'; \
bar='$(man_MANS)'; \
for i in $$bar; do \
case $$i in \
*.3) foo="$$foo $$i";; \
esac; done; \
if test "$$foo"; then \
$(mkinstalldirs) $(DESTDIR)$(cat3dir); \
for x in $$foo; do \
f=`echo $$x | sed 's/\.[^.]*$$/.cat3/'`; \
if test -f "$(srcdir)/$$f"; then \
b=`echo $$x | sed 's!$(MANRX)!\1!'`; \
echo "$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(cat3dir)/$$b.$(CATSUFFIX)";\
$(INSTALL_DATA) $(srcdir)/$$g $(DESTDIR)$(cat3dir)/$$b.$(CATSUFFIX);\
fi; \
done ;\
fi
install-cat5-mans:
@ext=5;\
foo='$(man5_MANS)'; \
bar='$(man_MANS)'; \
for i in $$bar; do \
case $$i in \
*.5) foo="$$foo $$i";; \
esac; done; \
if test "$$foo"; then \
$(mkinstalldirs) $(DESTDIR)$(cat5dir); \
for x in $$foo; do \
f=`echo $$x | sed 's/\.[^.]*$$/.cat5/'`; \
if test -f "$(srcdir)/$$f"; then \
b=`echo $$x | sed 's!$(MANRX)!\1!'`; \
echo "$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(cat5dir)/$$b.$(CATSUFFIX)";\
$(INSTALL_DATA) $(srcdir)/$$g $(DESTDIR)$(cat5dir)/$$b.$(CATSUFFIX);\
fi; \
done ;\
fi
install-cat8-mans:
@ext=8;\
foo='$(man8_MANS)'; \
bar='$(man_MANS)'; \
for i in $$bar; do \
case $$i in \
*.8) foo="$$foo $$i";; \
esac; done; \
if test "$$foo"; then \
$(mkinstalldirs) $(DESTDIR)$(cat8dir); \
for x in $$foo; do \
f=`echo $$x | sed 's/\.[^.]*$$/.cat8/'`; \
if test -f "$(srcdir)/$$f"; then \
b=`echo $$x | sed 's!$(MANRX)!\1!'`; \
echo "$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(cat8dir)/$$b.$(CATSUFFIX)";\
$(INSTALL_DATA) $(srcdir)/$$g $(DESTDIR)$(cat8dir)/$$b.$(CATSUFFIX);\
fi; \
done ;\
fi
install-cat-mans: install-cat1-mans install-cat3-mans install-cat5-mans install-cat8-mans
install-data-local: install-cat-mans
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
.x.c:
@cmp -s $< $@ 2> /dev/null || cp $< $@
check-local::
@foo='$(CHECK_LOCAL)'; \
if test "$$foo"; then \
failed=0; all=0; \
for i in $$foo; do \
all=`expr $$all + 1`; \
if ./$$i --version > /dev/null 2>&1; then \
echo "PASS: $$i"; \
else \
echo "FAIL: $$i"; \
failed=`expr $$failed + 1`; \
fi; \
done; \
if test "$$failed" -eq 0; then \
banner="All $$all tests passed"; \
else \
banner="$$failed of $$all tests failed"; \
fi; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
fi
$(compile_et_OBJECTS): parse.h
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-96
View File
@@ -1,96 +0,0 @@
.\" Copyright (c) 1988 Massachusetts Institute of Technology,
.\" Student Information Processing Board. All rights reserved.
.\"
.\" $FreeBSD$
.\"
.TH COM_ERR 3 "22 Nov 1988" SIPB
.SH NAME
com_err \- common error display routine
.SH SYNOPSIS
.nf
#include <com_err.h>
.PP
void com_err (whoami, code, format, ...);
const char *whoami;
long code;
const char *format;
.PP
proc = set_com_err_hook (proc);
.fi
void (*
.I proc
) (const char *, long, const char *, va_list);
.nf
.PP
proc = reset_com_err_hook ();
.PP
void initialize_XXXX_error_table ();
.fi
.SH DESCRIPTION
.I Com_err
displays an error message on the standard error stream
.I stderr
(see
.IR stdio (3S))
composed of the
.I whoami
string, which should specify the program name or some subportion of
a program, followed by an error message generated from the
.I code
value (derived from
.IR compile_et (1)),
and a string produced using the
.I format
string and any following arguments, in the same style as
.IR fprintf (3).
The behavior of
.I com_err
can be modified using
.I set_com_err_hook;
this defines a procedure which is called with the arguments passed to
.I com_err,
instead of the default internal procedure which sends the formatted
text to error output. Thus the error messages from a program can all
easily be diverted to another form of diagnostic logging, such as
.IR syslog (3).
.I Reset_com_err_hook
may be used to restore the behavior of
.I com_err
to its default form. Both procedures return the previous ``hook''
value. These ``hook'' procedures must have the declaration given for
.I proc
above in the synopsis.
The
.I initialize_XXXX_error_table
routine is generated mechanically by
.IR compile_et (1)
from a source file containing names and associated strings. Each
table has a name of up to four characters, which is used in place of
the
.B XXXX
in the name of the routine. These routines should be called before
any of the corresponding error codes are used, so that the
.I com_err
library will recognize error codes from these tables when they are
used.
The
.B com_err.h
header file should be included in any source file that uses routines
from the
.I com_err
library; executable files must be linked using
.I ``-lcom_err''
in order to cause the
.I com_err
library to be included.
.\" .IR for manual entries
.\" .PP for paragraph breaks
.SH "SEE ALSO"
compile_et (1), syslog (3).
Ken Raeburn, "A Common Error Description Library for UNIX".
-155
View File
@@ -1,155 +0,0 @@
/*
* Copyright (c) 1997, 1998 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Kungliga Tekniska
* Högskolan and its contributors.
*
* 4. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
RCSID("$Id: com_err.c,v 1.13 1999/03/12 15:17:08 bg Exp $");
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "com_err.h"
struct et_list *_et_list;
const char *
error_message (long code)
{
static char msg[128];
const char *p = com_right(_et_list, code);
if (p == NULL)
p = strerror(code);
if (p != NULL && *p != '\0') {
strncpy(msg, p, sizeof(msg) - 1);
msg[sizeof(msg) - 1] = 0;
} else
sprintf(msg, "Unknown error %ld", code);
return msg;
}
int
init_error_table(const char **msgs, long base, int count)
{
initialize_error_table_r(&_et_list, msgs, count, base);
return 0;
}
static void
default_proc (const char *whoami, long code, const char *fmt, va_list args)
{
if (whoami)
fprintf(stderr, "%s: ", whoami);
if (code)
fprintf(stderr, "%s ", error_message(code));
if (fmt)
vfprintf(stderr, fmt, args);
fprintf(stderr, "\r\n"); /* ??? */
}
static errf com_err_hook = default_proc;
void
com_err_va (const char *whoami,
long code,
const char *fmt,
va_list args)
{
(*com_err_hook) (whoami, code, fmt, args);
}
void
com_err (const char *whoami,
long code,
const char *fmt,
...)
{
va_list ap;
va_start(ap, fmt);
com_err_va (whoami, code, fmt, ap);
va_end(ap);
}
errf
set_com_err_hook (errf new)
{
errf old = com_err_hook;
if (new)
com_err_hook = new;
else
com_err_hook = default_proc;
return old;
}
errf
reset_com_err_hook (void)
{
return set_com_err_hook(NULL);
}
#define ERRCODE_RANGE 8 /* # of bits to shift table number */
#define BITS_PER_CHAR 6 /* # bits to shift per character in name */
static const char char_set[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
static char buf[6];
const char *
error_table_name(int num)
{
int ch;
int i;
char *p;
/* num = aa aaa abb bbb bcc ccc cdd ddd d?? ??? ??? */
p = buf;
num >>= ERRCODE_RANGE;
/* num = ?? ??? ??? aaa aaa bbb bbb ccc ccc ddd ddd */
num &= 077777777;
/* num = 00 000 000 aaa aaa bbb bbb ccc ccc ddd ddd */
for (i = 4; i >= 0; i--) {
ch = (num >> BITS_PER_CHAR * i) & ((1 << BITS_PER_CHAR) - 1);
if (ch != 0)
*p++ = char_set[ch-1];
}
*p = '\0';
return(buf);
}
-78
View File
@@ -1,78 +0,0 @@
.\" Copyright (c) 1988 Massachusetts Institute of Technology,
.\" Student Information Processing Board. All rights reserved.
.\"
.\" $FreeBSD$
.\"
.Dd November 22, 1988
.Os
.Dt COMPILE_ET 1
.Sh NAME
.Nm compile_et
.Nd error table compiler
.Sh SYNOPSIS
.Nm compile_et
.Ar file
.Sh DESCRIPTION
.Nm Compile_et
converts a table listing error-code names and associated messages into
a C source file suitable for use with the
.Xr com_err 3
library.
.Pp
The source file name must end with a suffix of ``.et''; the file
consists of a declaration supplying the name (up to four characters
long) of the error-code table:
.Em error_table name
followed by up to 256 entries of the form:
.Em error_code name ,
"
.Em string
"
and a final
.Em end
to indicate the end of the table.
.Pp
The name of the table is used to construct the name of a subroutine
.Em initialize_XXXX_error_table
which must be called in order for the
.Xr com_err 3
library to recognize the error table.
.Pp
The various error codes defined are assigned sequentially increasing
numbers (starting with a large number computed as a hash function of
the name of the table); thus for compatibility it is suggested that
new codes be added only to the end of an existing table, and that no
codes be removed from tables.
.Pp
The names defined in the table are placed into a C header file with
preprocessor directives defining them as integer constants of up to
32 bits in magnitude.
.Pp
A C source file is also generated which should be compiled and linked
with the object files which reference these error codes; it contains
the text of the messages and the initialization subroutine. Both C
files have names derived from that of the original source file, with
the ``.et'' suffix replaced by ``.c'' and ``.h''.
.Pp
A ``#'' in the source file is treated as a comment character, and all
remaining text to the end of the source line will be ignored.
.Sh BUGS
Since
.Nm compile_et
uses a very simple parser based on
.Xr yacc 1 ,
its error recovery leaves much to be desired.
.Sh "SEE ALSO"
.Xr yacc 1 ,
.Xr com_err 3
.Pp
.Rs
.%A Ken Raeburn
.%T "A Common Error Description Library for UNIX"
.Re
-234
View File
@@ -1,234 +0,0 @@
/*
* Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Kungliga Tekniska
* Högskolan and its contributors.
*
* 4. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#undef ROKEN_RENAME
#include "compile_et.h"
#include <getarg.h>
#if 0
RCSID("$Id: compile_et.c,v 1.12 1999/04/01 09:13:52 joda Exp $");
#endif
#include <err.h>
#include "parse.h"
int numerror;
extern FILE *yyin;
extern void yyparse(void);
long base;
int number;
char *prefix;
char *id_str;
char name[128];
char Basename[128];
#ifdef YYDEBUG
extern int yydebug = 1;
#endif
char *filename;
char hfn[128];
char cfn[128];
struct error_code *codes = NULL;
static int
generate_c(void)
{
int n;
struct error_code *ec;
FILE *c_file = fopen(cfn, "w");
if(c_file == NULL)
return 1;
fprintf(c_file, "/* Generated from %s */\n", filename);
if(id_str)
fprintf(c_file, "/* %s */\n", id_str);
fprintf(c_file, "\n");
fprintf(c_file, "#include <stddef.h>\n");
fprintf(c_file, "#include <com_err.h>\n");
fprintf(c_file, "#include \"%s\"\n", hfn);
fprintf(c_file, "\n");
fprintf(c_file, "static const char *text[] = {\n");
for(ec = codes, n = 0; ec; ec = ec->next, n++) {
while(n < ec->number) {
fprintf(c_file, "\t/* %03d */ \"Reserved %s error (%d)\",\n",
n, name, n);
n++;
}
fprintf(c_file, "\t/* %03d */ \"%s\",\n", ec->number, ec->string);
}
fprintf(c_file, "\tNULL\n");
fprintf(c_file, "};\n");
fprintf(c_file, "\n");
fprintf(c_file,
"void initialize_%s_error_table_r(struct et_list **list)\n",
name);
fprintf(c_file, "{\n");
fprintf(c_file,
" initialize_error_table_r(list, text, "
"%s_num_errors, ERROR_TABLE_BASE_%s);\n", name, name);
fprintf(c_file, "}\n");
fprintf(c_file, "\n");
fprintf(c_file, "void initialize_%s_error_table(void)\n", name);
fprintf(c_file, "{\n");
fprintf(c_file,
" init_error_table(text, ERROR_TABLE_BASE_%s, "
"%s_num_errors);\n", name, name);
fprintf(c_file, "}\n");
fclose(c_file);
return 0;
}
static int
generate_h(void)
{
struct error_code *ec;
char fn[128];
FILE *h_file = fopen(hfn, "w");
char *p;
if(h_file == NULL)
return 1;
snprintf(fn, sizeof(fn), "__%s__", hfn);
for(p = fn; *p; p++)
if(!isalnum((unsigned char)*p))
*p = '_';
fprintf(h_file, "/* Generated from %s */\n", filename);
if(id_str)
fprintf(h_file, "/* %s */\n", id_str);
fprintf(h_file, "\n");
fprintf(h_file, "#ifndef %s\n", fn);
fprintf(h_file, "#define %s\n", fn);
fprintf(h_file, "\n");
fprintf(h_file, "#include <com_right.h>\n");
fprintf(h_file, "\n");
fprintf(h_file,
"void initialize_%s_error_table_r(struct et_list **);\n",
name);
fprintf(h_file, "\n");
fprintf(h_file, "void initialize_%s_error_table(void);\n", name);
fprintf(h_file, "#define init_%s_err_tbl initialize_%s_error_table\n",
name, name);
fprintf(h_file, "\n");
fprintf(h_file, "typedef enum %s_error_number{\n", name);
fprintf(h_file, "\tERROR_TABLE_BASE_%s = %ld,\n", name, base);
fprintf(h_file, "\t%s_err_base = %ld,\n", name, base);
for(ec = codes; ec; ec = ec->next) {
fprintf(h_file, "\t%s = %ld,\n", ec->name, base + ec->number);
}
fprintf(h_file, "\t%s_num_errors = %d\n", name, number);
fprintf(h_file, "} %s_error_number;\n", name);
fprintf(h_file, "\n");
fprintf(h_file, "#endif /* %s */\n", fn);
fclose(h_file);
return 0;
}
static int
generate(void)
{
return generate_c() || generate_h();
}
int help_flag;
struct getargs args[] = {
{ "help", 0, arg_flag, &help_flag }
};
int num_args = sizeof(args) / sizeof(args[0]);
static void
usage(int code)
{
arg_printusage(args, num_args, NULL, "error-table");
exit(code);
}
int
main(int argc, char **argv)
{
char *p;
int optind = 0;
if(getarg(args, num_args, argc, argv, &optind))
usage(1);
if(help_flag)
usage(0);
if(optind == argc)
usage(1);
filename = argv[optind];
yyin = fopen(filename, "r");
if(yyin == NULL)
err(1, "%s", filename);
p = strrchr(filename, '/');
if(p)
p++;
else
p = filename;
strncpy(Basename, p, sizeof(Basename));
Basename[sizeof(Basename) - 1] = '\0';
Basename[strcspn(Basename, ".")] = '\0';
snprintf(hfn, sizeof(hfn), "%s.h", Basename);
snprintf(cfn, sizeof(cfn), "%s.c", Basename);
yyparse();
if(numerror)
return 1;
return generate();
}
-83
View File
@@ -1,83 +0,0 @@
/*
* Copyright (c) 1998 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Kungliga Tekniska
* Högskolan and its contributors.
*
* 4. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* $Id: compile_et.h,v 1.3 1998/11/22 09:39:46 assar Exp $ */
#ifndef __COMPILE_ET_H__
#define __COMPILE_ET_H__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
extern long base;
extern int number;
extern char *prefix;
extern char name[128];
extern char *id_str;
extern char *filename;
extern int numerror;
struct error_code {
unsigned number;
char *name;
char *string;
struct error_code *next, **tail;
};
extern struct error_code *codes;
#define APPEND(L, V) \
do { \
if((L) == NULL) { \
(L) = (V); \
(L)->tail = &(V)->next; \
(L)->next = NULL; \
}else{ \
*(L)->tail = (V); \
(L)->tail = &(V)->next; \
} \
}while(0)
#endif /* __COMPILE_ET_H__ */
-96
View File
@@ -1,96 +0,0 @@
/*
* Copyright (c) 1997, 1998 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Kungliga Tekniska
* Högskolan and its contributors.
*
* 4. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
RCSID("$Id: error.c,v 1.13 1998/02/17 21:19:44 bg Exp $");
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <com_right.h>
const char *
com_right(struct et_list *list, long code)
{
struct et_list *p;
for (p = list; p; p = p->next) {
if (code >= p->table->base && code < p->table->base + p->table->n_msgs)
return p->table->msgs[code - p->table->base];
}
return NULL;
}
struct foobar {
struct et_list etl;
struct error_table et;
};
void
initialize_error_table_r(struct et_list **list,
const char **messages,
int num_errors,
long base)
{
struct et_list *et;
struct foobar *f;
for (et = *list; et; et = et->next)
if (et->table->msgs == messages)
return;
f = malloc(sizeof(*f));
if (f == NULL)
return;
et = &f->etl;
et->table = &f->et;
et->table->msgs = messages;
et->table->n_msgs = num_errors;
et->table->base = base;
et->next = *list;
*list = et;
}
void
free_error_table(struct et_list *et)
{
while(et){
struct et_list *p = et;
et = et->next;
free(p);
}
}
-376
View File
@@ -1,376 +0,0 @@
/*
* Copyright (c) 1997, 1998 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Kungliga Tekniska
* Högskolan and its contributors.
*
* 4. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#if 0
RCSID("$Id: getarg.c,v 1.25 1998/11/22 09:45:05 assar Exp $");
#endif
#include <sys/ttycom.h>
#include <time.h>
#include <stdio.h>
#include "getarg.h"
#define ISFLAG(X) ((X).type == arg_flag || (X).type == arg_negative_flag)
static size_t
print_arg (char *string, size_t len, int mdoc, int longp, struct getargs *arg)
{
const char *s;
*string = '\0';
if (ISFLAG(*arg))
return 0;
if(mdoc){
if(longp)
strncat(string, "= Ns", len);
strncat(string, " Ar ", len);
}else
if (longp)
strncat (string, "=", len);
else
strncat (string, " ", len);
if (arg->arg_help)
s = arg->arg_help;
else if (arg->type == arg_integer)
s = "number";
else if (arg->type == arg_string)
s = "string";
else
s = "<undefined>";
strncat(string, s, len);
return 1 + strlen(s);
}
static int
check_column(FILE *f, int col, int len, int columns)
{
if(col + len > columns) {
fprintf(f, "\n");
col = fprintf(f, " ");
}
return col;
}
void
arg_printusage (struct getargs *args,
size_t num_args,
const char *progname,
const char *extra_string)
{
int i;
size_t max_len = 0;
char buf[128];
int col = 0, columns;
struct winsize ws;
columns = 80;
col = 0;
col += fprintf (stderr, "Usage: %s", progname);
for (i = 0; i < num_args; ++i) {
size_t len = 0;
if (args[i].long_name) {
buf[0] = '\0';
strncat(buf, "[--", sizeof(buf));
len += 2;
if(args[i].type == arg_negative_flag) {
strncat(buf, "no-", sizeof(buf));
len += 3;
}
strncat(buf, args[i].long_name, sizeof(buf));
len += strlen(args[i].long_name);
len += print_arg(buf + strlen(buf), sizeof(buf) - strlen(buf),
0, 1, &args[i]);
strncat(buf, "]", sizeof(buf));
if(args[i].type == arg_strings)
strncat(buf, "...", sizeof(buf));
col = check_column(stderr, col, strlen(buf) + 1, columns);
col += fprintf(stderr, " %s", buf);
}
if (args[i].short_name) {
snprintf(buf, sizeof(buf), "[-%c", args[i].short_name);
len += 2;
len += print_arg(buf + strlen(buf), sizeof(buf) - strlen(buf),
0, 0, &args[i]);
strncat(buf, "]", sizeof(buf));
if(args[i].type == arg_strings)
strncat(buf, "...", sizeof(buf));
col = check_column(stderr, col, strlen(buf) + 1, columns);
col += fprintf(stderr, " %s", buf);
}
if (args[i].long_name && args[i].short_name)
len += 2; /* ", " */
max_len = max(max_len, len);
}
if (extra_string) {
col = check_column(stderr, col, strlen(extra_string) + 1, columns);
fprintf (stderr, " %s\n", extra_string);
} else
fprintf (stderr, "\n");
for (i = 0; i < num_args; ++i) {
if (args[i].help) {
size_t count = 0;
if (args[i].short_name) {
count += fprintf (stderr, "-%c", args[i].short_name);
print_arg (buf, sizeof(buf), 0, 0, &args[i]);
count += fprintf(stderr, "%s", buf);
}
if (args[i].short_name && args[i].long_name)
count += fprintf (stderr, ", ");
if (args[i].long_name) {
count += fprintf (stderr, "--");
if (args[i].type == arg_negative_flag)
count += fprintf (stderr, "no-");
count += fprintf (stderr, "%s", args[i].long_name);
print_arg (buf, sizeof(buf), 0, 1, &args[i]);
count += fprintf(stderr, "%s", buf);
}
while(count++ <= max_len)
putc (' ', stderr);
fprintf (stderr, "%s\n", args[i].help);
}
}
}
static void
add_string(getarg_strings *s, char *value)
{
s->strings = realloc(s->strings, (s->num_strings + 1) * sizeof(*s->strings));
s->strings[s->num_strings] = value;
s->num_strings++;
}
static int
arg_match_long(struct getargs *args, size_t num_args,
char *argv)
{
int i;
char *optarg = NULL;
int negate = 0;
int partial_match = 0;
struct getargs *partial = NULL;
struct getargs *current = NULL;
int argv_len;
char *p;
argv_len = strlen(argv);
p = strchr (argv, '=');
if (p != NULL)
argv_len = p - argv;
for (i = 0; i < num_args; ++i) {
if(args[i].long_name) {
int len = strlen(args[i].long_name);
char *p = argv;
int p_len = argv_len;
negate = 0;
for (;;) {
if (strncmp (args[i].long_name, p, p_len) == 0) {
if(p_len == len)
current = &args[i];
else {
++partial_match;
partial = &args[i];
}
optarg = p + p_len;
} else if (ISFLAG(args[i]) && strncmp (p, "no-", 3) == 0) {
negate = !negate;
p += 3;
p_len -= 3;
continue;
}
break;
}
if (current)
break;
}
}
if (current == NULL) {
if (partial_match == 1)
current = partial;
else
return ARG_ERR_NO_MATCH;
}
if(*optarg == '\0' && !ISFLAG(*current))
return ARG_ERR_NO_MATCH;
switch(current->type){
case arg_integer:
{
int tmp;
if(sscanf(optarg + 1, "%d", &tmp) != 1)
return ARG_ERR_BAD_ARG;
*(int*)current->value = tmp;
return 0;
}
case arg_string:
{
*(char**)current->value = optarg + 1;
return 0;
}
case arg_strings:
{
add_string((getarg_strings*)current->value, optarg + 1);
return 0;
}
case arg_flag:
case arg_negative_flag:
{
int *flag = current->value;
if(*optarg == '\0' ||
strcmp(optarg + 1, "yes") == 0 ||
strcmp(optarg + 1, "true") == 0){
*flag = !negate;
return 0;
} else if (*optarg && strcmp(optarg + 1, "maybe") == 0) {
*flag = rand() & 1;
} else {
*flag = negate;
return 0;
}
return ARG_ERR_BAD_ARG;
}
default:
abort ();
}
}
int
getarg(struct getargs *args, size_t num_args,
int argc, char **argv, int *optind)
{
int i, j, k;
int ret = 0;
srand (time(NULL));
(*optind)++;
for(i = *optind; i < argc; i++) {
if(argv[i][0] != '-')
break;
if(argv[i][1] == '-'){
if(argv[i][2] == 0){
i++;
break;
}
ret = arg_match_long (args, num_args, argv[i] + 2);
if(ret)
return ret;
}else{
for(j = 1; argv[i][j]; j++) {
for(k = 0; k < num_args; k++) {
char *optarg;
if(args[k].short_name == 0)
continue;
if(argv[i][j] == args[k].short_name){
if(args[k].type == arg_flag){
*(int*)args[k].value = 1;
break;
}
if(args[k].type == arg_negative_flag){
*(int*)args[k].value = 0;
break;
}
if(argv[i][j + 1])
optarg = &argv[i][j + 1];
else{
i++;
optarg = argv[i];
}
if(optarg == NULL)
return ARG_ERR_NO_ARG;
if(args[k].type == arg_integer){
int tmp;
if(sscanf(optarg, "%d", &tmp) != 1)
return ARG_ERR_BAD_ARG;
*(int*)args[k].value = tmp;
goto out;
}else if(args[k].type == arg_string){
*(char**)args[k].value = optarg;
goto out;
}else if(args[k].type == arg_strings){
add_string((getarg_strings*)args[k].value, optarg);
goto out;
}
return ARG_ERR_BAD_ARG;
}
}
if (k == num_args)
return ARG_ERR_NO_MATCH;
}
out:;
}
}
*optind = i;
return 0;
}
#if TEST
int foo_flag = 2;
int flag1 = 0;
int flag2 = 0;
int bar_int;
char *baz_string;
struct getargs args[] = {
{ NULL, '1', arg_flag, &flag1, "one", NULL },
{ NULL, '2', arg_flag, &flag2, "two", NULL },
{ "foo", 'f', arg_negative_flag, &foo_flag, "foo", NULL },
{ "bar", 'b', arg_integer, &bar_int, "bar", "seconds"},
{ "baz", 'x', arg_string, &baz_string, "baz", "name" },
};
int main(int argc, char **argv)
{
int optind = 0;
while(getarg(args, 5, argc, argv, &optind))
printf("Bad arg: %s\n", argv[optind]);
printf("flag1 = %d\n", flag1);
printf("flag2 = %d\n", flag2);
printf("foo_flag = %d\n", foo_flag);
printf("bar_int = %d\n", bar_int);
printf("baz_flag = %s\n", baz_string);
arg_printusage (args, 5, argv[0], "nothing here");
}
#endif
-76
View File
@@ -1,76 +0,0 @@
/*
* Copyright (c) 1997 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Kungliga Tekniska
* Högskolan and its contributors.
*
* 4. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* $Id: getarg.h,v 1.5 1998/08/18 20:26:11 assar Exp $ */
#ifndef __GETARG_H__
#define __GETARG_H__
#include <stddef.h>
#define max(a,b) (((a)>(b))?(a):(b))
struct getargs{
const char *long_name;
char short_name;
enum { arg_integer, arg_string, arg_flag, arg_negative_flag, arg_strings } type;
void *value;
const char *help;
const char *arg_help;
};
enum {
ARG_ERR_NO_MATCH = 1,
ARG_ERR_BAD_ARG,
ARG_ERR_NO_ARG
};
typedef struct getarg_strings {
int num_strings;
char **strings;
} getarg_strings;
int getarg(struct getargs *args, size_t num_args,
int argc, char **argv, int *optind);
void arg_printusage (struct getargs *args,
size_t num_args,
const char *progname,
const char *extra_string);
#endif /* __GETARG_H__ */
-129
View File
@@ -1,129 +0,0 @@
%{
/*
* Copyright (c) 1998 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Kungliga Tekniska
* Högskolan and its contributors.
*
* 4. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* This is to handle the definition of this symbol in some AIX
* headers, which will conflict with the definition that lex will
* generate for it. It's only a problem for AIX lex.
*/
#undef ECHO
#include "compile_et.h"
#include "parse.h"
#if 0
RCSID("$Id: lex.l,v 1.4 1998/11/20 05:58:52 assar Exp $");
#endif
static unsigned lineno = 1;
void error_message(char *, ...);
int getstring(void);
%}
%%
et { return ET; }
error_table { return ET; }
ec { return EC; }
error_code { return EC; }
prefix { return PREFIX; }
index { return INDEX; }
id { return ID; }
end { return END; }
[0-9]+ { yylval.number = atoi(yytext); return NUMBER; }
#[^\n]* ;
[ \t] ;
\n { lineno++; }
\" { return getstring(); }
[a-zA-Z0-9_]+ { yylval.string = strdup(yytext); return STRING; }
. { return *yytext; }
%%
#ifndef yywrap /* XXX */
int
yywrap ()
{
return 1;
}
#endif
int
getstring(void)
{
char x[128];
int i = 0;
int c;
int quote = 0;
while((c = input()) != EOF){
if(quote) {
x[i++] = c;
quote = 0;
continue;
}
if(c == '\n'){
error_message("unterminated string");
lineno++;
break;
}
if(c == '\\'){
quote++;
continue;
}
if(c == '\"')
break;
x[i++] = c;
}
x[i] = '\0';
yylval.string = strdup(x);
return STRING;
}
void
error_message (char *format, ...)
{
va_list args;
va_start (args, format);
fprintf (stderr, "%s:%d:", filename, lineno);
vfprintf (stderr, format, args);
va_end (args);
numerror++;
}
-173
View File
@@ -1,173 +0,0 @@
%{
/*
* Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Kungliga Tekniska
* Högskolan and its contributors.
*
* 4. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include "compile_et.h"
#if 0
RCSID("$Id: parse.y,v 1.9 1999/07/04 14:54:58 assar Exp $");
#endif
void yyerror (char *s);
long name2number(const char *str);
void error_message(char *, ...);
extern char *yytext;
/* This is for bison */
#if !defined(alloca) && !defined(HAVE_ALLOCA)
#define alloca(x) malloc(x)
#endif
%}
%union {
char *string;
int number;
}
%token ET INDEX PREFIX EC ID END
%token <string> STRING
%token <number> NUMBER
%%
file : /* */
| header statements
;
header : id et
| et
;
id : ID STRING
{
id_str = $2;
}
;
et : ET STRING
{
base = name2number($2);
strncpy(name, $2, sizeof(name));
name[sizeof(name) - 1] = '\0';
free($2);
}
| ET STRING STRING
{
base = name2number($2);
strncpy(name, $3, sizeof(name));
name[sizeof(name) - 1] = '\0';
free($2);
free($3);
}
;
statements : statement
| statements statement
;
statement : INDEX NUMBER
{
number = $2;
}
| PREFIX STRING
{
prefix = realloc(prefix, strlen($2) + 2);
strcpy(prefix, $2);
strcat(prefix, "_");
free($2);
}
| PREFIX
{
prefix = realloc(prefix, 1);
*prefix = '\0';
}
| EC STRING ',' STRING
{
struct error_code *ec = malloc(sizeof(*ec));
ec->next = NULL;
ec->number = number;
if(prefix && *prefix != '\0') {
asprintf (&ec->name, "%s%s", prefix, $2);
free($2);
} else
ec->name = $2;
ec->string = $4;
APPEND(codes, ec);
number++;
}
| END
{
YYACCEPT;
}
;
%%
long
name2number(const char *str)
{
const char *p;
long base = 0;
const char *x = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz0123456789_";
if(strlen(str) > 4) {
yyerror("table name too long");
return 0;
}
for(p = str; *p; p++){
char *q = strchr(x, *p);
if(q == NULL) {
yyerror("invalid character in table name");
return 0;
}
base = (base << 6) + (q - x) + 1;
}
base <<= 8;
if(base > 0x7fffffff)
base = -(0xffffffff - base + 1);
return base;
}
void
yyerror (char *s)
{
error_message ("%s\n", s);
}
-44
View File
@@ -1,44 +0,0 @@
/*
* Copyright (c) 1998 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Kungliga Tekniska
* Högskolan and its contributors.
*
* 4. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* $Id: roken_rename.h,v 1.2 1999/03/11 18:14:53 bg Exp $ */
#ifndef __roken_rename_h__
#define __roken_rename_h__
#endif /* __roken_rename_h__ */
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
-209
View File
@@ -1,209 +0,0 @@
.\"
.\" Copyright (C) 1999 Alexey M. Zelkin <[email protected]>,
.\" Simferopol, Urkaine
.\"
.\" This file is addition to groff package. It allows to translate Section
.\" Headers (.Sh) and correctly display man page header and footer. It
.\" also contains translated version of .Dt macros (.DtL).
.\" Current translation: Russian (ru_RU.KOI8-R)
.\"
.\" $FreeBSD$
.\"
.\" Localized (russian) .Sh macro version for troff
.\" Original code derived from mdoc/doc-ditroff
.\"
.if t \{\
. rm Sh
. de Sh
. nr nS 0
. nr sE 0
. nr iS 0
' ad
. ie "\\$1"NAME" \{\
. hK
' in 0
. \}
. el \{\
. ie "\\$1"îáú÷áîéå" \{\
. hK
' in 0
. \}
. el \{\
. nr nS 0
. nr nA 0
. nr nF 0
. nr nT 0
. nr nY 0
. nr oT 0
. if "\\$1"SYNOPSIS" \{\
. na
. nr nS 1
. \}
. if "\\$1"DESCRIPTION" \{\
. nr fY 0
. nr fZ 0
. nr fB 0
. nr Fb 0
. ds Fb
. \}
. if "\\$1"SEE" \{\
. nr nA 1
. na
. \}
. if "\\$1"FILES" .nr nF 1
. if "\\$1"STANDARDS" .nr nT 1
. if "\\$1"AUTHORS" .nr nY 1
. if "\\$1"SEE" .nr sE 1
.\"
.\" russian chapter names
.\"
. if "\\$1"óéîôáëóéó" \{\
. na
. nr nS 1
. \}
. if "\\$1"ïðéóáîéå" \{\
. nr fY 0
. nr fZ 0
. nr fB 0
. nr Fb 0
. ds Fb
. \}
. if "\\$1"óíïôòé" \{\
. nr nA 1
. na
. \}
. if "\\$1"æáêìù" .nr nF 1
. if "\\$1"óôáîäáòôù" .nr nT 1
. if "\\$1"á÷ôïòù" .nr nY 1
. if "\\$1"óíïôòé" .nr sE 1
. in 0
. nr aN 0
. \}
. \}
. pL
' sp
. ns
. ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
. if !\\n(cR .ne 3
' fi
\&\\*(sH\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
\&\fP\s0\&
. in \\n(.iu+\\n(Tiu
. ns
..
. \}
.\"
.\" Localized .Sh macro version for nroff
.\" Original code derived from mdoc/doc-nroff
.\"
.if n \{\
. rm Sh
. de Sh
. nr nS 0
. nr sE 0
. nr iS 0
. ie "\\$1"NAME" \{\
. hK
' in 0
. \}
. el \{\
. ie "\\$1"îáú÷áîéå" \{\
. hK
' in 0
. \}
. el \{\
. nr nS 0
. nr nA 0
. nr nF 0
. nr nT 0
. nr nY 0
. nr aN 0
. nr oT 0
. if "\\$1"SEE" .nr nA 1
. if "\\$1"FILES" .nr nF 1
. if "\\$1"STANDARDS" .nr nT 1
. if "\\$1"SYNOPSIS" .nr nS 1
. if "\\$1"DESCRIPTION" \{\
. rr fB
. rr Fb
. ds Fb
. nr fY 0
. nr fZ 0
. \}
. if "\\$1"AUTHORS" .nr nY 1
.\"
.\" russian chapters names
.\"
. if "\\$1"óíïôòé" .nr nA 1
. if "\\$1"æáêìù" .nr nF 1
. if "\\$1"óôáîäáòôù" .nr nT 1
. if "\\$1"óéîôáëóéó" .nr nS 1
. if "\\$1"ïðéóáîéå" \{\
. rr fB
. rr Fb
. ds Fb
. nr fY 0
. nr fZ 0
. \}
. if "\\$1"á÷ôïòù" .nr nY 1
. in 0
. \}
. \}
. pL
' sp
. ns
. ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
. if !\\n(cR .ne 3
' fi
\&\\*(sH\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
\&\fP\s0\&
. in \\n(.iu+\\n(Tiu
. if "\\$1"SEE" .nr sE 1
. if "\\$1"óíïôòé" .nr sE 1
. ns
..
.\}
.\"
.\" .Dt macro replacement for localized manpages (.DtL)
.\" Original code derived from mdoc/doc-common
.\"
.de DtL
.ds dT UNTITLED
.ds vT LOCAL
.ds cH Null
.if !"\\$1"" .ds dT \\$1
.if !"\\$2"" \{\
. ds cH \\$2
. if \\$2>=1 .if \\$2<=9 \{\
. ds vT óÐÒÁ×ÏÞÎÉË FreeBSD
. if "\\$2"1" .ds vT óÐÒÁ×ÏÞÎÉË ïÓÎÏ×ÎÙÈ ëÏÍÁÎÄ FreeBSD
. if "\\$2"2" .ds vT óÐÒÁ×ÏÞÎÉË óÉÓÔÅÍÎÙÈ ÷ÙÚÏ×Ï× FreeBSD
. if "\\$2"3" .ds vT óÐÒÁ×ÏÞÎÉË âÉÂÌÉÏÔÅÞÎÙÈ æÕÎËÃÉÊ FreeBSD
. if "\\$2"4" .ds vT óÐÒÁ×ÏÞÎÉË éÎÔÅÒÆÅÊÓÏ× ñÄÒÁ FreeBSD
. if "\\$2"5" .ds vT óÐÒÁ×ÏÞÎÉË æÏÒÍÁÔÏ× æÁÊÌÏ× FreeBSD
. if "\\$2"6" .ds vT óÐÒÁ×ÏÞÎÉË éÇÒ FreeBSD
. if "\\$2"7" .ds vT óÐÒÁ×ÏÞÎÉË òÁÚÎÏÊ éÎÆÏÒÍÁÃÉÉ FreeBSD
. if "\\$2"8" .ds vT óÐÒÁ×ÏÞÎÉË óÉÓÔÅÍÎÏÇÏ áÄÍÉÎÉÓÔÒÁÔÏÒÁ FreeBSD
. if "\\$2"9" .ds vT óÐÒÁ×ÏÞÎÉË òÁÚÒÁÂÏÔÞÉËÁ ñÄÒÁ FreeBSD
. nr sN \\$2
. \}
. if "\\$2"unass" .ds vT DRAFT
. if "\\$2"draft" .ds vT DRAFT
. if "\\$2"paper" .ds vT UNTITLED
.\}
.if !"\\$3"" \{\
. if "\\$3"USD" .ds vT FreeBSD äÏÐÏÌÎÉÔÅÌØÎÙÅ äÏËÕÍÅÎÔÙ ÄÌÑ ðÏÌØÚÏ×ÁÔÅÌÑ
. if "\\$3"PS1" .ds vT FreeBSD äÏÐÏÌÎÉÔÅÌØÎÙÅ äÏËÕÍÅÎÔÙ ÄÌÑ ðÒÏÇÒÁÍÍÉÓÔÁ
. if "\\$3"AMD" .ds vT FreeBSD äÏËÕÍÅÎÔÙ õÎÁÓÌÅÄÏ×ÁÎÎÏÇÏ óÐÒÁ×ÏÞÎÉËÁ
. if "\\$3"SMM" .ds vT FreeBSD òÕËÏ×ÏÄÓÔ×Ï óÉÓÔÅÍÎÏÇÏ áÄÍÉÎÉÓÔÒÁÔÏÒÁ
. if "\\$3"URM" .ds vT FreeBSD óÐÒÁ×ÏÞÎÏÅ òÕËÏ×ÏÄÓÔ×Ï
. if "\\$3"PRM" .ds vT FreeBSD òÕËÏ×ÏÄÓÔ×Ï ðÒÏÇÒÁÍÍÉÓÔÁ
. if "\\$3"IND" .ds vT FreeBSD ïÓÎÏ×ÎÏÊ ðÒÅÄÍÅÔÎÙÊ õËÁÚÁÔÅÌØ óÐÒÁ×ÏÞÎÉËÁ
. if "\\$3"LOCAL" .ds vT FreeBSD ìÏËÁÌØÎÙÊ óÐÒÁ×ÏÞÎÉË
. if "\\$3"tahoe" .as vT \ (áÒÈÉÔÅËÔÕÒÁ Tahoe)
. if "\\$3"vax" .as vT \ (áÒÈÉÔÅËÔÕÒÁ VAX)
. if "\\$3"hp300" .as vT \ (áÒÈÉÔÅËÔÕÒÁ HP300)
. if "\\$3"i386" .as vT \ (áÒÈÉÔÅËÔÕÒÁ i386)
. if "\\*(vT"LOCAL" .ds vT \\$3
.\}
..
-13
View File
@@ -1,13 +0,0 @@
.\"
.\" Copyright (C) 1999 Alexey M. Zelkin <[email protected]>,
.\" Simferopol, Crimea, Urkaine
.\"
.\" DESC
.\"
.\" $FreeBSD$
.\"
.\" Include [tg]roff russian translated if [tg]roff invoked with -Tkoi8-r.
.\"
.if "\*[.T]"koi8-r" \{\
. sOl koi8-r
.\}
-9
View File
@@ -1,9 +0,0 @@
dnl $Id: acinclude.m4,v 1.2 1999/03/01 13:06:21 joda Exp $
dnl
dnl Only put things that for some reason can't live in the `cf'
dnl directory in this file.
dnl
dnl $xId: misc.m4,v 1.1 1997/12/14 15:59:04 joda Exp $
dnl
define(upcase,`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`)dnl
@@ -1,89 +0,0 @@
# $Id: Makefile.in,v 1.27 1999/03/10 19:01:10 joda Exp $
SHELL = /bin/sh
srcdir = @srcdir@
VPATH = @srcdir@
top_builddir = ../..
CC = @CC@
LINK = @LINK@
AR = ar
RANLIB = @RANLIB@
DEFS = @DEFS@
CFLAGS = @CFLAGS@ $(WFLAGS)
WFLAGS = @WFLAGS@
LD_FLAGS= @LD_FLAGS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
LIBROKEN = -L../../lib/roken -lroken
LIBS = @KRB_KAFS_LIB@ -L../../lib/krb -lkrb -L../../lib/des -ldes $(LIBROKEN) @LIBS@ $(LIBROKEN)
MKINSTALLDIRS = @top_srcdir@/mkinstalldirs
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
libexecdir = @libexecdir@
bindir = @bindir@
transform=@program_transform_name@
EXECSUFFIX=@EXECSUFFIX@
PROG_BIN = pagsh$(EXECSUFFIX) \
afslog$(EXECSUFFIX) \
kstring2key$(EXECSUFFIX)
PROG_LIBEXEC =
PROGS = $(PROG_BIN) $(PROG_LIBEXEC)
SOURCES = pagsh.c aklog.c kstring2key.c
OBJECTS = pagsh.o aklog.o kstring2key.o
all: $(PROGS)
Wall:
make CFLAGS="-g -Wall -Wno-comment -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__"
.c.o:
$(CC) -c $(DEFS) -I../../include -I$(srcdir) $(CFLAGS) $(CPPFLAGS) $<
install: all
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
for x in $(PROG_BIN); do \
$(INSTALL_PROGRAM) $$x $(DESTDIR)$(bindir)/`echo $$x | sed '$(transform)'`; \
done
uninstall:
for x in $(PROG_BIN); do \
rm -f $(DESTDIR)$(bindir)/`echo $$x | sed '$(transform)'`; \
done
TAGS: $(SOURCES)
etags $(SOURCES)
check:
clean:
rm -f *.a *.o $(PROGS)
mostlyclean: clean
distclean: clean
rm -f Makefile *.tab.c *~
realclean: distclean
rm -f TAGS
pagsh$(EXECSUFFIX): pagsh.o
$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ pagsh.o $(LIBS)
afslog$(EXECSUFFIX): aklog.o
$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ aklog.o $(LIBS)
kstring2key$(EXECSUFFIX): kstring2key.o
$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ kstring2key.o $(LIBS)
$(OBJECTS): ../../include/config.h
.PHONY: all Wall install uninstall check clean mostlyclean distclean realclean
-5
View File
@@ -1,5 +0,0 @@
# $Id: Makefile.am,v 1.5 1999/03/20 13:58:14 joda Exp $
include $(top_srcdir)/Makefile.am.common
SUBDIRS = common ftp ftpd
@@ -1,44 +0,0 @@
# $Id: Makefile.am,v 1.12 1999/04/09 18:22:08 assar Exp $
include $(top_srcdir)/Makefile.am.common
INCLUDES += -I$(srcdir)/../common $(INCLUDE_readline) $(INCLUDE_krb4)
bin_PROGRAMS = ftp
CHECK_LOCAL =
if KRB4
krb4_sources = krb4.c kauth.c
endif
if KRB5
krb5_sources = gssapi.c
endif
ftp_SOURCES = \
cmds.c \
cmdtab.c \
extern.h \
ftp.c \
ftp_locl.h \
ftp_var.h \
main.c \
pathnames.h \
ruserpass.c \
domacro.c \
globals.c \
security.c \
security.h \
$(krb4_sources) \
$(krb5_sources)
EXTRA_ftp_SOURCES = krb4.c kauth.c gssapi.c
LDADD = \
../common/libcommon.a \
$(LIB_gssapi) \
$(LIB_krb5) \
$(LIB_krb4) \
$(top_builddir)/lib/des/libdes.la \
$(LIB_roken) \
$(LIB_readline)
-42
View File
@@ -1,42 +0,0 @@
# $Id: Makefile.am,v 1.7 1999/04/09 18:22:45 assar Exp $
include $(top_srcdir)/Makefile.am.common
INCLUDES += $(INCLUDE_krb4)
bin_PROGRAMS = kauth
bin_SCRIPTS = ksrvtgt
libexec_PROGRAMS = kauthd
EXTRA_DIST = zrefresh ksrvtgt.in
kauth_SOURCES = \
kauth.c \
kauth.h \
rkinit.c \
marshall.c \
encdata.c
kauthd_SOURCES = \
kauthd.c \
kauth.h \
marshall.c \
encdata.c
ksrvtgt: ksrvtgt.in
sed -e "s!%bindir%!$(bindir)!" $(srcdir)/ksrvtgt.in > $@
chmod +x $@
install-exec-local:
if test -f $(bindir)/zrefresh -o -r $(bindir)/zrefresh; then \
true; \
else \
$(INSTALL_PROGRAM) $(srcdir)/zrefresh $(bindir)/`echo zrefresh | sed '$(transform)'`; \
fi
LDADD = \
$(LIB_kafs) \
$(LIB_krb5) \
$(LIB_krb4) \
$(top_builddir)/lib/des/libdes.la \
$(LIB_roken)
-83
View File
@@ -1,83 +0,0 @@
# $Id: Makefile.in,v 1.18 1999/03/10 19:01:13 joda Exp $
SHELL = /bin/sh
srcdir = @srcdir@
VPATH = @srcdir@
top_builddir = ../..
CC = @CC@
LINK = @LINK@
AR = ar
DEFS = @DEFS@
CFLAGS = @CFLAGS@ $(WFLAGS)
WFLAGS = @WFLAGS@
LD_FLAGS = @LD_FLAGS@
INSTALL = @INSTALL@
LIBS = @LIBS@
MKINSTALLDIRS = @top_srcdir@/mkinstalldirs
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
libexecdir = @libexecdir@
bindir = @bindir@
transform=@program_transform_name@
EXECSUFFIX=@EXECSUFFIX@
PROG_BIN = sample_client$(EXECSUFFIX) \
simple_client$(EXECSUFFIX)
PROG_LIBEXEC = sample_server$(EXECSUFFIX) \
simple_server$(EXECSUFFIX)
PROGS = $(PROG_BIN) $(PROG_LIBEXEC)
OBJECTS = sample_client.o sample_server.o simple_client.o simple_server.o
SOURCES = sample_client.c sample_server.c simple_client.c simple_server.c
all: $(PROGS)
Wall:
make CFLAGS="-g -Wall -Wno-comment -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__"
.c.o:
$(CC) -c $(DEFS) -I../../include -I$(srcdir) $(CFLAGS) $(CPPFLAGS) $<
install: all
uninstall:
TAGS: $(SOURCES)
etags $(SOURCES)
check:
clean:
rm -f *.a *.o $(PROGS)
mostlyclean: clean
distclean: clean
rm -f Makefile *.tab.c *~
realclean: distclean
rm -f TAGS
KLIB=-L../../lib/krb -lkrb -L../../lib/des -ldes
LIBROKEN=-L../../lib/roken -lroken
sample_client$(EXECSUFFIX): sample_client.o
$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ sample_client.o $(KLIB) $(LIBROKEN) $(LIBS) $(LIBROKEN)
simple_client$(EXECSUFFIX): simple_client.o
$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ simple_client.o $(KLIB) $(LIBROKEN) $(LIBS) $(LIBROKEN)
sample_server$(EXECSUFFIX): sample_server.o
$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ sample_server.o $(KLIB) $(LIBROKEN) $(LIBS) $(LIBROKEN)
simple_server$(EXECSUFFIX): simple_server.o
$(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ simple_server.o $(KLIB) $(LIBROKEN) $(LIBS) $(LIBROKEN)
$(OBJECTS): ../../include/config.h
.PHONY: all Wall install uninstall check clean mostlyclean distclean realclean
-14
View File
@@ -1,14 +0,0 @@
/*
* $Id: simple.h,v 1.3 1996/09/27 15:54:23 assar Exp $
*
* Copyright 1988 by the Massachusetts Institute of Technology.
*
* For copying and distribution information, please see the file
* <mit-copyright.h>.
*
* Common definitions for the simple UDP-based Kerberos-mediated
* server & client applications.
*/
#define SERVICE "sample"
#define HOST "bach"
-27
View File
@@ -1,27 +0,0 @@
dnl $Id: auth-modules.m4,v 1.1 1999/03/21 13:48:00 joda Exp $
dnl
dnl Figure what authentication modules should be built
AC_DEFUN(AC_AUTH_MODULES,[
AC_MSG_CHECKING(which authentication modules should be built)
LIB_AUTH_SUBDIRS=
if test "$ac_cv_header_siad_h" = yes; then
LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS sia"
fi
if test "$ac_cv_header_security_pam_modules_h" = yes -a "$enable_shared" = yes; then
LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS pam"
fi
case "${host}" in
changequote(,)dnl
*-*-irix[56]*) LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS afskauthlib" ;;
changequote([,])dnl
esac
AC_MSG_RESULT($LIB_AUTH_SUBDIRS)
AC_SUBST(LIB_AUTH_SUBDIRS)dnl
])
-22
View File
@@ -1,22 +0,0 @@
dnl $Id: broken-glob.m4,v 1.2 1999/03/01 09:52:15 joda Exp $
dnl
dnl check for glob(3)
dnl
AC_DEFUN(AC_BROKEN_GLOB,[
AC_CACHE_CHECK(for working glob, ac_cv_func_glob_working,
ac_cv_func_glob_working=yes
AC_TRY_LINK([
#include <stdio.h>
#include <glob.h>],[
glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE, NULL, NULL);
],:,ac_cv_func_glob_working=no,:))
if test "$ac_cv_func_glob_working" = yes; then
AC_DEFINE(HAVE_GLOB, 1, [define if you have a glob() that groks
GLOB_BRACE, GLOB_NOCHECK, GLOB_QUOTE, and GLOB_TILDE])
fi
if test "$ac_cv_func_glob_working" = yes; then
AC_NEED_PROTO([#include <stdio.h>
#include <glob.h>],glob)
fi
])
-58
View File
@@ -1,58 +0,0 @@
dnl $Id: broken-snprintf.m4,v 1.3 1999/03/01 09:52:22 joda Exp $
dnl
AC_DEFUN(AC_BROKEN_SNPRINTF, [
AC_CACHE_CHECK(for working snprintf,ac_cv_func_snprintf_working,
ac_cv_func_snprintf_working=yes
AC_TRY_RUN([
#include <stdio.h>
#include <string.h>
int main()
{
changequote(`,')dnl
char foo[3];
changequote([,])dnl
snprintf(foo, 2, "12");
return strcmp(foo, "1");
}],:,ac_cv_func_snprintf_working=no,:))
if test "$ac_cv_func_snprintf_working" = yes; then
AC_DEFINE_UNQUOTED(HAVE_SNPRINTF, 1, [define if you have a working snprintf])
fi
if test "$ac_cv_func_snprintf_working" = yes; then
AC_NEED_PROTO([#include <stdio.h>],snprintf)
fi
])
AC_DEFUN(AC_BROKEN_VSNPRINTF,[
AC_CACHE_CHECK(for working vsnprintf,ac_cv_func_vsnprintf_working,
ac_cv_func_vsnprintf_working=yes
AC_TRY_RUN([
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
int foo(int num, ...)
{
changequote(`,')dnl
char bar[3];
changequote([,])dnl
va_list arg;
va_start(arg, num);
vsnprintf(bar, 2, "%s", arg);
va_end(arg);
return strcmp(bar, "1");
}
int main()
{
return foo(0, "12");
}],:,ac_cv_func_vsnprintf_working=no,:))
if test "$ac_cv_func_vsnprintf_working" = yes; then
AC_DEFINE_UNQUOTED(HAVE_VSNPRINTF, 1, [define if you have a working vsnprintf])
fi
if test "$ac_cv_func_vsnprintf_working" = yes; then
AC_NEED_PROTO([#include <stdio.h>],vsnprintf)
fi
])
-19
View File
@@ -1,19 +0,0 @@
dnl $Id: broken.m4,v 1.3 1998/03/16 22:16:19 joda Exp $
dnl
dnl
dnl Same as AC _REPLACE_FUNCS, just define HAVE_func if found in normal
dnl libraries
AC_DEFUN(AC_BROKEN,
[for ac_func in $1
do
AC_CHECK_FUNC($ac_func, [
ac_tr_func=HAVE_[]upcase($ac_func)
AC_DEFINE_UNQUOTED($ac_tr_func)],[LIBOBJS[]="$LIBOBJS ${ac_func}.o"])
dnl autoheader tricks *sigh*
: << END
@@@funcs="$funcs $1"@@@
END
done
AC_SUBST(LIBOBJS)dnl
])
-31
View File
@@ -1,31 +0,0 @@
dnl
dnl $Id: c-attribute.m4,v 1.2 1999/03/01 09:52:23 joda Exp $
dnl
dnl
dnl Test for __attribute__
dnl
AC_DEFUN(AC_C___ATTRIBUTE__, [
AC_MSG_CHECKING(for __attribute__)
AC_CACHE_VAL(ac_cv___attribute__, [
AC_TRY_COMPILE([
#include <stdlib.h>
],
[
static void foo(void) __attribute__ ((noreturn));
static void
foo(void)
{
exit(1);
}
],
ac_cv___attribute__=yes,
ac_cv___attribute__=no)])
if test "$ac_cv___attribute__" = "yes"; then
AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
fi
AC_MSG_RESULT($ac_cv___attribute__)
])
-33
View File
@@ -1,33 +0,0 @@
dnl
dnl $Id: c-function.m4,v 1.2 1999/03/01 09:52:23 joda Exp $
dnl
dnl
dnl Test for __FUNCTION__
dnl
AC_DEFUN(AC_C___FUNCTION__, [
AC_MSG_CHECKING(for __FUNCTION__)
AC_CACHE_VAL(ac_cv___function__, [
AC_TRY_RUN([
#include <string.h>
static char *foo()
{
return __FUNCTION__;
}
int main()
{
return strcmp(foo(), "foo") != 0;
}
],
ac_cv___function__=yes,
ac_cv___function__=no,
ac_cv___function__=no)])
if test "$ac_cv___function__" = "yes"; then
AC_DEFINE(HAVE___FUNCTION__, 1, [define if your compiler has __FUNCTION__])
fi
AC_MSG_RESULT($ac_cv___function__)
])
-25
View File
@@ -1,25 +0,0 @@
dnl $Id: check-declaration.m4,v 1.3 1999/03/01 13:03:08 joda Exp $
dnl
dnl
dnl Check if we need the declaration of a variable
dnl
dnl AC_HAVE_DECLARATION(includes, variable)
AC_DEFUN(AC_CHECK_DECLARATION, [
AC_MSG_CHECKING([if $2 is properly declared])
AC_CACHE_VAL(ac_cv_var_$2_declaration, [
AC_TRY_COMPILE([$1
extern struct { int foo; } $2;],
[$2.foo = 1;],
eval "ac_cv_var_$2_declaration=no",
eval "ac_cv_var_$2_declaration=yes")
])
define(foo, [HAVE_]translit($2, [a-z], [A-Z])[_DECLARATION])
AC_MSG_RESULT($ac_cv_var_$2_declaration)
if eval "test \"\$ac_cv_var_$2_declaration\" = yes"; then
AC_DEFINE(foo, 1, [define if your system declares $2])
fi
undefine([foo])
])
@@ -1,24 +0,0 @@
dnl $Id: check-getpwnam_r-posix.m4,v 1.2 1999/03/23 16:47:31 joda Exp $
dnl
dnl check for getpwnam_r, and if it's posix or not
AC_DEFUN(AC_CHECK_GETPWNAM_R_POSIX,[
AC_FIND_FUNC_NO_LIBS(getpwnam_r,c_r)
if test "$ac_cv_func_getpwnam_r" = yes; then
AC_CACHE_CHECK(if getpwnam_r is posix,ac_cv_func_getpwnam_r_posix,
ac_libs="$LIBS"
LIBS="$LIBS $LIB_getpwnam_r"
AC_TRY_RUN([
#include <pwd.h>
int main()
{
struct passwd pw, *pwd;
return getpwnam_r("", &pw, NULL, 0, &pwd) < 0;
}
],ac_cv_func_getpwnam_r_posix=yes,ac_cv_func_getpwnam_r_posix=no,:)
LIBS="$ac_libs")
if test "$ac_cv_func_getpwnam_r_posix" = yes; then
AC_DEFINE(POSIX_GETPWNAM_R, 1, [Define if getpwnam_r has POSIX flavour.])
fi
fi
])
-59
View File
@@ -1,59 +0,0 @@
dnl $Id: check-man.m4,v 1.2 1999/03/21 14:30:50 joda Exp $
dnl check how to format manual pages
dnl
AC_DEFUN(AC_CHECK_MAN,
[AC_PATH_PROG(NROFF, nroff)
AC_PATH_PROG(GROFF, groff)
AC_CACHE_CHECK(how to format man pages,ac_cv_sys_man_format,
[cat > conftest.1 << END
.Dd January 1, 1970
.Dt CONFTEST 1
.Sh NAME
.Nm conftest
.Nd
foobar
END
if test "$NROFF" ; then
for i in "-mdoc" "-mandoc"; do
if "$NROFF" $i conftest.1 2> /dev/null | \
grep Jan > /dev/null 2>&1 ; then
ac_cv_sys_man_format="$NROFF $i"
break
fi
done
fi
if test "$ac_cv_sys_man_format" = "" -a "$GROFF" ; then
for i in "-mdoc" "-mandoc"; do
if "$GROFF" -Tascii $i conftest.1 2> /dev/null | \
grep Jan > /dev/null 2>&1 ; then
ac_cv_sys_man_format="$GROFF -Tascii $i"
break
fi
done
fi
if test "$ac_cv_sys_man_format"; then
ac_cv_sys_man_format="$ac_cv_sys_man_format \[$]< > \[$]@"
fi
])
if test "$ac_cv_sys_man_format"; then
CATMAN="$ac_cv_sys_man_format"
AC_SUBST(CATMAN)
fi
AM_CONDITIONAL(CATMAN, test "$CATMAN")
AC_CACHE_CHECK(extension of pre-formatted manual pages,ac_cv_sys_catman_ext,
[if grep _suffix /etc/man.conf > /dev/null 2>&1; then
ac_cv_sys_catman_ext=0
else
ac_cv_sys_catman_ext=number
fi
])
if test "$ac_cv_sys_catman_ext" = number; then
CATMANEXT='$$ext'
else
CATMANEXT=0
fi
AC_SUBST(CATMANEXT)
])
@@ -1,38 +0,0 @@
dnl
dnl $Id: check-netinet-ip-and-tcp.m4,v 1.2 1999/05/14 13:15:40 assar Exp $
dnl
dnl extra magic check for netinet/{ip.h,tcp.h} because on irix 6.5.3
dnl you have to include standards.h before including these files
AC_DEFUN(CHECK_NETINET_IP_AND_TCP,
[
AC_CHECK_HEADERS(standards.h)
for i in netinet/ip.h netinet/tcp.h; do
cv=`echo "$i" | sed 'y%./+-%__p_%'`
AC_MSG_CHECKING([for $i])
AC_CACHE_VAL([ac_cv_header_$cv],
[AC_TRY_CPP([\
#ifdef HAVE_STANDARDS_H
#include <standards.h>
#endif
#include <$i>
],
eval "ac_cv_header_$cv=yes",
eval "ac_cv_header_$cv=no")])
AC_MSG_RESULT(`eval echo \\$ac_cv_header_$cv`)
changequote(, )dnl
if test `eval echo \\$ac_cv_header_$cv` = yes; then
ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
changequote([, ])dnl
AC_DEFINE_UNQUOTED($ac_tr_hdr, 1)
fi
done
dnl autoheader tricks *sigh*
: << END
@@@headers="$headers netinet/ip.h netinet/tcp.h"@@@
END
])
-23
View File
@@ -1,23 +0,0 @@
dnl $Id: check-type-extra.m4,v 1.2 1999/03/01 09:52:23 joda Exp $
dnl
dnl ac_check_type + extra headers
dnl AC_CHECK_TYPE_EXTRA(TYPE, DEFAULT, HEADERS)
AC_DEFUN(AC_CHECK_TYPE_EXTRA,
[AC_REQUIRE([AC_HEADER_STDC])dnl
AC_MSG_CHECKING(for $1)
AC_CACHE_VAL(ac_cv_type_$1,
[AC_EGREP_CPP(dnl
changequote(<<,>>)dnl
<<$1[^a-zA-Z_0-9]>>dnl
changequote([,]), [#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
$3], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
AC_MSG_RESULT($ac_cv_type_$1)
if test $ac_cv_type_$1 = no; then
AC_DEFINE($1, $2, [Define this to what the type $1 should be.])
fi
])
-20
View File
@@ -1,20 +0,0 @@
dnl $Id: check-var.m4,v 1.2 1999/03/01 09:52:23 joda Exp $
dnl
dnl AC_CHECK_VAR(includes, variable)
AC_DEFUN(AC_CHECK_VAR, [
AC_MSG_CHECKING(for $2)
AC_CACHE_VAL(ac_cv_var_$2, [
AC_TRY_LINK([extern int $2;
int foo() { return $2; }],
[foo()],
ac_cv_var_$2=yes, ac_cv_var_$2=no)
])
define([foo], [HAVE_]translit($2, [a-z], [A-Z]))
AC_MSG_RESULT(`eval echo \\$ac_cv_var_$2`)
if test `eval echo \\$ac_cv_var_$2` = yes; then
AC_DEFINE_UNQUOTED(foo, 1, [define if you have $2])
AC_CHECK_DECLARATION([$1],[$2])
fi
undefine([foo])
])
-64
View File
@@ -1,64 +0,0 @@
dnl $Id: check-xau.m4,v 1.3 1999/05/14 01:17:06 assar Exp $
dnl
dnl check for Xau{Read,Write}Auth and XauFileName
dnl
AC_DEFUN(AC_CHECK_XAU,[
save_CFLAGS="$CFLAGS"
CFLAGS="$X_CFLAGS $CFLAGS"
save_LIBS="$LIBS"
dnl LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS $LIBS"
LIBS="$X_PRE_LIBS $X_EXTRA_LIBS $LIBS"
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
## check for XauWriteAuth first, so we detect the case where
## XauReadAuth is in -lX11, but XauWriteAuth is only in -lXau this
## could be done by checking for XauReadAuth in -lXau first, but this
## breaks in IRIX 6.5
AC_FIND_FUNC_NO_LIBS(XauWriteAuth, X11 Xau)
ac_xxx="$LIBS"
LIBS="$LIB_XauWriteAuth $LIBS"
AC_FIND_FUNC_NO_LIBS(XauReadAuth, X11 Xau)
LIBS="$LIB_XauReadAauth $LIBS"
AC_FIND_FUNC_NO_LIBS(XauFileName, X11 Xau)
LIBS="$ac_xxx"
## set LIB_XauReadAuth to union of these tests, since this is what the
## Makefiles are using
case "$ac_cv_funclib_XauWriteAuth" in
yes) ;;
no) ;;
*) if test "$ac_cv_funclib_XauReadAuth" = yes; then
if test "$ac_cv_funclib_XauFileName" = yes; then
LIB_XauReadAuth="$LIB_XauWriteAuth"
else
LIB_XauReadAuth="$LIB_XauWriteAuth $LIB_XauFileName"
fi
else
if test "$ac_cv_funclib_XauFileName" = yes; then
LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth"
else
LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth $LIB_XauFileName"
fi
fi
;;
esac
if test "$AUTOMAKE" != ""; then
AM_CONDITIONAL(NEED_WRITEAUTH, test "$ac_cv_func_XauWriteAuth" != "yes")
else
AC_SUBST(NEED_WRITEAUTH_TRUE)
AC_SUBST(NEED_WRITEAUTH_FALSE)
if test "$ac_cv_func_XauWriteAuth" != "yes"; then
NEED_WRITEAUTH_TRUE=
NEED_WRITEAUTH_FALSE='#'
else
NEED_WRITEAUTH_TRUE='#'
NEED_WRITEAUTH_FALSE=
fi
fi
CFLAGS=$save_CFLAGS
LIBS=$save_LIBS
LDFLAGS=$save_LDFLAGS
])
-9
View File
@@ -1,9 +0,0 @@
dnl $Id: find-func.m4,v 1.1 1997/12/14 15:58:58 joda Exp $
dnl
dnl AC_FIND_FUNC(func, libraries, includes, arguments)
AC_DEFUN(AC_FIND_FUNC, [
AC_FIND_FUNC_NO_LIBS([$1], [$2], [$3], [$4])
if test -n "$LIB_$1"; then
LIBS="$LIB_$1 $LIBS"
fi
])
@@ -1,13 +0,0 @@
dnl $Id: find-if-not-broken.m4,v 1.2 1998/03/16 22:16:27 joda Exp $
dnl
dnl
dnl Mix between AC_FIND_FUNC and AC_BROKEN
dnl
AC_DEFUN(AC_FIND_IF_NOT_BROKEN,
[AC_FIND_FUNC([$1], [$2], [$3], [$4])
if eval "test \"$ac_cv_func_$1\" != yes"; then
LIBOBJS[]="$LIBOBJS $1.o"
fi
AC_SUBST(LIBOBJS)dnl
])
-37
View File
@@ -1,37 +0,0 @@
dnl $Id: have-pragma-weak.m4,v 1.3 1999/03/01 11:55:25 joda Exp $
dnl
AC_DEFUN(AC_HAVE_PRAGMA_WEAK, [
if test "${enable_shared}" = "yes"; then
AC_MSG_CHECKING(for pragma weak)
AC_CACHE_VAL(ac_have_pragma_weak, [
ac_have_pragma_weak=no
cat > conftest_foo.$ac_ext <<'EOF'
[#]line __oline__ "configure"
#include "confdefs.h"
#pragma weak foo = _foo
int _foo = 17;
EOF
cat > conftest_bar.$ac_ext <<'EOF'
[#]line __oline__ "configure"
#include "confdefs.h"
extern int foo;
int t() {
return foo;
}
int main() {
return t();
}
EOF
if AC_TRY_EVAL('CC -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest_foo.$ac_ext conftest_bar.$ac_ext 1>&AC_FD_CC'); then
ac_have_pragma_weak=yes
fi
rm -rf conftest*
])
if test "$ac_have_pragma_weak" = "yes"; then
AC_DEFINE(HAVE_PRAGMA_WEAK, 1, [Define this if your compiler supports \`#pragma weak.'])dnl
fi
AC_MSG_RESULT($ac_have_pragma_weak)
fi
])
-98
View File
@@ -1,98 +0,0 @@
dnl $Id: krb-find-db.m4,v 1.5 1999/05/08 02:24:04 assar Exp $
dnl
dnl find a suitable database library
dnl
dnl AC_FIND_DB(libraries)
AC_DEFUN(KRB_FIND_DB, [
lib_dbm=no
lib_db=no
for i in $1; do
if test "$i"; then
m="lib$i"
l="-l$i"
else
m="libc"
l=""
fi
AC_MSG_CHECKING(for dbm_open in $m)
AC_CACHE_VAL(ac_cv_krb_dbm_open_$m, [
save_LIBS="$LIBS"
LIBS="$l $LIBS"
AC_TRY_RUN([
#include <unistd.h>
#include <fcntl.h>
#if defined(HAVE_NDBM_H)
#include <ndbm.h>
#elif defined(HAVE_DBM_H)
#include <dbm.h>
#elif defined(HAVE_RPCSVC_DBM_H)
#include <rpcsvc/dbm.h>
#elif defined(HAVE_DB_H)
#define DB_DBM_HSEARCH 1
#include <db.h>
#endif
int main()
{
DBM *d;
d = dbm_open("conftest", O_RDWR | O_CREAT, 0666);
if(d == NULL)
return 1;
dbm_close(d);
return 0;
}], [
if test -f conftest.db; then
ac_res=db
else
ac_res=dbm
fi], ac_res=no, ac_res=no)
LIBS="$save_LIBS"
eval ac_cv_krb_dbm_open_$m=$ac_res])
eval ac_res=\$ac_cv_krb_dbm_open_$m
AC_MSG_RESULT($ac_res)
if test "$lib_dbm" = no -a $ac_res = dbm; then
lib_dbm="$l"
elif test "$lib_db" = no -a $ac_res = db; then
lib_db="$l"
break
fi
done
AC_MSG_CHECKING(for NDBM library)
ac_ndbm=no
if test "$lib_db" != no; then
LIB_DBM="$lib_db"
ac_ndbm=yes
AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files ending in .db).])
if test "$LIB_DBM"; then
ac_res="yes, $LIB_DBM"
else
ac_res=yes
fi
elif test "$lib_dbm" != no; then
LIB_DBM="$lib_dbm"
ac_ndbm=yes
if test "$LIB_DBM"; then
ac_res="yes, $LIB_DBM"
else
ac_res=yes
fi
else
LIB_DBM=""
ac_res=no
fi
test "$ac_ndbm" = yes && AC_DEFINE(NDBM, 1, [Define if you have NDBM (and not DBM)])dnl
AC_SUBST(LIB_DBM)
DBLIB="$LIB_DBM"
AC_SUBST(DBLIB)
AC_MSG_RESULT($ac_res)
])
@@ -1,42 +0,0 @@
dnl $Id: krb-func-getcwd-broken.m4,v 1.2 1999/03/01 13:03:32 joda Exp $
dnl
dnl
dnl test for broken getcwd in (SunOS braindamage)
dnl
AC_DEFUN(AC_KRB_FUNC_GETCWD_BROKEN, [
if test "$ac_cv_func_getcwd" = yes; then
AC_MSG_CHECKING(if getcwd is broken)
AC_CACHE_VAL(ac_cv_func_getcwd_broken, [
ac_cv_func_getcwd_broken=no
AC_TRY_RUN([
#include <errno.h>
char *getcwd(char*, int);
void *popen(char *cmd, char *mode)
{
errno = ENOTTY;
return 0;
}
int main()
{
char *ret;
ret = getcwd(0, 1024);
if(ret == 0 && errno == ENOTTY)
return 0;
return 1;
}
], ac_cv_func_getcwd_broken=yes,:,:)
])
if test "$ac_cv_func_getcwd_broken" = yes; then
AC_DEFINE(BROKEN_GETCWD, 1, [Define if getcwd is broken (like in SunOS 4).])dnl
LIBOBJS="$LIBOBJS getcwd.o"
AC_SUBST(LIBOBJS)dnl
AC_MSG_RESULT($ac_cv_func_getcwd_broken)
else
AC_MSG_RESULT([seems ok])
fi
fi
])
-130
View File
@@ -1,130 +0,0 @@
dnl $Id: krb-ipv6.m4,v 1.5 1999/03/21 14:06:16 joda Exp $
dnl
dnl test for IPv6
dnl
AC_DEFUN(AC_KRB_IPV6, [
AC_CACHE_CHECK(for IPv6,ac_cv_lib_ipv6,
AC_TRY_COMPILE([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
#endif
],
[
#if defined(IN6ADDR_ANY_INIT)
struct in6_addr any = IN6ADDR_ANY_INIT;
#elif defined(IPV6ADDR_ANY_INIT)
struct in6_addr any = IPV6ADDR_ANY_INIT;
#else
#error no any?
#endif
struct sockaddr_in6 sin6;
int s;
s = socket(AF_INET6, SOCK_DGRAM, 0);
sin6.sin6_family = AF_INET6;
sin6.sin6_port = htons(17);
sin6.sin6_addr = any;
bind(s, (struct sockaddr *)&sin6, sizeof(sin6));
],
ac_cv_lib_ipv6=yes,
ac_cv_lib_ipv6=no))
if test "$ac_cv_lib_ipv6" = yes; then
AC_DEFINE(HAVE_IPV6, 1, [Define if you have IPv6.])
dnl check for different v6 implementations (by itojun)
v6type=unknown
v6lib=none
AC_MSG_CHECKING([ipv6 stack type])
for i in v6d toshiba kame inria zeta linux; do
case $i in
v6d)
AC_EGREP_CPP(yes, [dnl
#include </usr/local/v6/include/sys/types.h>
#ifdef __V6D__
yes
#endif],
[v6type=$i; v6lib=v6;
v6libdir=/usr/local/v6/lib;
CFLAGS="-I/usr/local/v6/include $CFLAGS"])
;;
toshiba)
AC_EGREP_CPP(yes, [dnl
#include <sys/param.h>
#ifdef _TOSHIBA_INET6
yes
#endif],
[v6type=$i; v6lib=inet6;
v6libdir=/usr/local/v6/lib;
CFLAGS="-DINET6 $CFLAGS"])
;;
kame)
AC_EGREP_CPP(yes, [dnl
#include <netinet/in.h>
#ifdef __KAME__
yes
#endif],
[v6type=$i; v6lib=inet6;
v6libdir=/usr/local/v6/lib;
CFLAGS="-DINET6 $CFLAGS"])
;;
inria)
AC_EGREP_CPP(yes, [dnl
#include <netinet/in.h>
#ifdef IPV6_INRIA_VERSION
yes
#endif],
[v6type=$i; CFLAGS="-DINET6 $CFLAGS"])
;;
zeta)
AC_EGREP_CPP(yes, [dnl
#include <sys/param.h>
#ifdef _ZETA_MINAMI_INET6
yes
#endif],
[v6type=$i; v6lib=inet6;
v6libdir=/usr/local/v6/lib;
CFLAGS="-DINET6 $CFLAGS"])
;;
linux)
if test -d /usr/inet6; then
v6type=$i
v6lib=inet6
v6libdir=/usr/inet6
CFLAGS="-DINET6 $CFLAGS"
fi
;;
esac
if test "$v6type" != "unknown"; then
break
fi
done
AC_MSG_RESULT($v6type)
if test "$v6lib" != "none"; then
for dir in $v6libdir /usr/local/v6/lib /usr/local/lib; do
if test -d $dir -a -f $dir/lib$v6lib.a; then
LIBS="-L$dir -l$v6lib $LIBS"
break
fi
done
dnl AC_CHECK_LIB($v6lib, getaddrinfo,
dnl [SERVER_LIBS="-l$v6lib $SERVER_LIBS"],
dnl [dnl
dnl echo "Fatal: no $v6lib library found. cannot continue."
dnl echo "You need to fetch lib$v6lib.a from appropriate v6 kit and"
dnl echo 'compile beforehand.'
dnl exit 1])
fi
fi
])
-28
View File
@@ -1,28 +0,0 @@
dnl $Id: krb-prog-ln-s.m4,v 1.1 1997/12/14 15:59:01 joda Exp $
dnl
dnl
dnl Better test for ln -s, ln or cp
dnl
AC_DEFUN(AC_KRB_PROG_LN_S,
[AC_MSG_CHECKING(for ln -s or something else)
AC_CACHE_VAL(ac_cv_prog_LN_S,
[rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
then
rm -f conftestdata
ac_cv_prog_LN_S="ln -s"
else
touch conftestdata1
if ln conftestdata1 conftestdata2; then
rm -f conftestdata*
ac_cv_prog_LN_S=ln
else
ac_cv_prog_LN_S=cp
fi
fi])dnl
LN_S="$ac_cv_prog_LN_S"
AC_MSG_RESULT($ac_cv_prog_LN_S)
AC_SUBST(LN_S)dnl
])
-8
View File
@@ -1,8 +0,0 @@
dnl $Id: krb-prog-ranlib.m4,v 1.1 1997/12/14 15:59:01 joda Exp $
dnl
dnl
dnl Also look for EMXOMF for OS/2
dnl
AC_DEFUN(AC_KRB_PROG_RANLIB,
[AC_CHECK_PROGS(RANLIB, ranlib EMXOMF, :)])
-8
View File
@@ -1,8 +0,0 @@
dnl $Id: krb-prog-yacc.m4,v 1.1 1997/12/14 15:59:02 joda Exp $
dnl
dnl
dnl We prefer byacc or yacc because they do not use `alloca'
dnl
AC_DEFUN(AC_KRB_PROG_YACC,
[AC_CHECK_PROGS(YACC, byacc yacc 'bison -y')])
@@ -1,27 +0,0 @@
dnl $Id: krb-struct-winsize.m4,v 1.2 1999/03/01 09:52:23 joda Exp $
dnl
dnl
dnl Search for struct winsize
dnl
AC_DEFUN(AC_KRB_STRUCT_WINSIZE, [
AC_MSG_CHECKING(for struct winsize)
AC_CACHE_VAL(ac_cv_struct_winsize, [
ac_cv_struct_winsize=no
for i in sys/termios.h sys/ioctl.h; do
AC_EGREP_HEADER(
changequote(, )dnl
struct[ ]*winsize,dnl
changequote([,])dnl
$i, ac_cv_struct_winsize=yes; break)dnl
done
])
if test "$ac_cv_struct_winsize" = "yes"; then
AC_DEFINE(HAVE_STRUCT_WINSIZE, 1, [define if struct winsize is declared in sys/termios.h])
fi
AC_MSG_RESULT($ac_cv_struct_winsize)
AC_EGREP_HEADER(ws_xpixel, termios.h,
AC_DEFINE(HAVE_WS_XPIXEL, 1, [define if struct winsize has ws_xpixel]))
AC_EGREP_HEADER(ws_ypixel, termios.h,
AC_DEFINE(HAVE_WS_YPIXEL, 1, [define if struct winsize has ws_ypixel]))
])
-15
View File
@@ -1,15 +0,0 @@
dnl $Id: krb-sys-aix.m4,v 1.1 1997/12/14 15:59:02 joda Exp $
dnl
dnl
dnl AIX have a very different syscall convention
dnl
AC_DEFUN(AC_KRB_SYS_AIX, [
AC_MSG_CHECKING(for AIX)
AC_CACHE_VAL(krb_cv_sys_aix,
AC_EGREP_CPP(yes,
[#ifdef _AIX
yes
#endif
], krb_cv_sys_aix=yes, krb_cv_sys_aix=no) )
AC_MSG_RESULT($krb_cv_sys_aix)
])
-21
View File
@@ -1,21 +0,0 @@
dnl $Id: krb-sys-nextstep.m4,v 1.2 1998/06/03 23:48:40 joda Exp $
dnl
dnl
dnl NEXTSTEP is not posix compliant by default,
dnl you need a switch -posix to the compiler
dnl
AC_DEFUN(AC_KRB_SYS_NEXTSTEP, [
AC_MSG_CHECKING(for NEXTSTEP)
AC_CACHE_VAL(krb_cv_sys_nextstep,
AC_EGREP_CPP(yes,
[#if defined(NeXT) && !defined(__APPLE__)
yes
#endif
], krb_cv_sys_nextstep=yes, krb_cv_sys_nextstep=no) )
if test "$krb_cv_sys_nextstep" = "yes"; then
CFLAGS="$CFLAGS -posix"
LIBS="$LIBS -posix"
fi
AC_MSG_RESULT($krb_cv_sys_nextstep)
])
-25
View File
@@ -1,25 +0,0 @@
dnl $Id: krb-version.m4,v 1.1 1997/12/14 15:59:03 joda Exp $
dnl
dnl
dnl output a C header-file with some version strings
dnl
AC_DEFUN(AC_KRB_VERSION,[
dnl AC_OUTPUT_COMMANDS([
cat > include/newversion.h.in <<FOOBAR
char *${PACKAGE}_long_version = "@(#)\$Version: $PACKAGE-$VERSION by @USER@ on @HOST@ ($host) @DATE@ \$";
char *${PACKAGE}_version = "$PACKAGE-$VERSION";
FOOBAR
if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then
echo "include/version.h is unchanged"
rm -f include/newversion.h.in
else
echo "creating include/version.h"
User=${USER-${LOGNAME}}
Host=`(hostname || uname -n) 2>/dev/null | sed 1q`
Date=`date`
mv -f include/newversion.h.in include/version.h.in
sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/version.h.in > include/version.h
fi
dnl ],host=$host PACKAGE=$PACKAGE VERSION=$VERSION)
])
-199
View File
@@ -1,199 +0,0 @@
# Make prototypes from .c files
# $Id: make-proto.pl,v 1.11 1999/04/15 12:37:54 joda Exp $
##use Getopt::Std;
require 'getopts.pl';
$brace = 0;
$line = "";
$debug = 0;
do Getopts('o:p:d') || die "foo";
if($opt_d) {
$debug = 1;
}
while(<>) {
print $brace, " ", $_ if($debug);
if(/^\#if 0/) {
$if_0 = 1;
}
if($if_0 && /^\#endif/) {
$if_0 = 0;
}
if($if_0) { next }
if(/^\s*\#/) {
next;
}
if(/^\s*$/) {
$line = "";
next;
}
if(/\{/){
$_ = $line;
while(s/\*\//\ca/){
s/\/\*(.|\n)*\ca//;
}
s/^\s*//;
s/\s$//;
s/\s+/ /g;
if($line =~ /\)\s$/){
if(!/^static/ && !/^PRIVATE/){
if(/(.*)(__attribute__\s?\(.*\))/) {
$attr = $2;
$_ = $1;
} else {
$attr = "";
}
# remove outer ()
s/\s*\(/@/;
s/\)\s?$/@/;
# remove , within ()
while(s/\(([^()]*),(.*)\)/($1\$$2)/g){}
s/,\s*/,\n\t/g;
# fix removed ,
s/\$/,/g;
# match function name
/([a-zA-Z0-9_]+)\s*@/;
$f = $1;
# only add newline if more than one parameter
$LP = "(("; # XXX workaround for indentation bug in emacs
$RP = "))";
$P = "__P((";
if(/,/){
s/@/ __P$LP\n\t/;
}else{
s/@/ __P$LP/;
}
s/@/$RP/;
# insert newline before function name
s/(.*)\s([a-zA-Z0-9_]+ __P)/$1\n$2/;
if($attr ne "") {
$_ .= "\n $attr";
}
$_ = $_ . ";";
$funcs{$f} = $_;
}
}
$line = "";
$brace++;
}
if(/\}/){
$brace--;
}
if(/^\}/){
$brace = 0;
}
if($brace == 0) {
$line = $line . " " . $_;
}
}
sub foo {
local ($arg) = @_;
$_ = $arg;
s/.*\/([^\/]*)/$1/;
s/[^a-zA-Z0-9]/_/g;
"__" . $_ . "__";
}
if($opt_o) {
open(OUT, ">$opt_o");
$block = &foo($opt_o);
} else {
$block = "__public_h__";
}
if($opt_p) {
open(PRIV, ">$opt_p");
$private = &foo($opt_p);
} else {
$private = "__private_h__";
}
$public_h = "";
$private_h = "";
$public_h_header = "/* This is a generated file */
#ifndef $block
#define $block
#ifdef __STDC__
#include <stdarg.h>
#ifndef __P
#define __P(x) x
#endif
#else
#ifndef __P
#define __P(x) ()
#endif
#endif
";
$private_h_header = "/* This is a generated file */
#ifndef $private
#define $private
#ifdef __STDC__
#include <stdarg.h>
#ifndef __P
#define __P(x) x
#endif
#else
#ifndef __P
#define __P(x) ()
#endif
#endif
";
foreach(sort keys %funcs){
if(/^(main)$/) { next }
if(/^_/) {
$private_h .= $funcs{$_} . "\n\n";
if($funcs{$_} =~ /__attribute__/) {
$private_attribute_seen = 1;
}
} else {
$public_h .= $funcs{$_} . "\n\n";
if($funcs{$_} =~ /__attribute__/) {
$public_attribute_seen = 1;
}
}
}
if ($public_attribute_seen) {
$public_h_header .= "#if !defined(__GNUC__) && !defined(__attribute__)
#define __attribute__(x)
#endif
";
}
if ($private_attribute_seen) {
$private_h_header .= "#if !defined(__GNUC__) && !defined(__attribute__)
#define __attribute__(x)
#endif
";
}
if ($public_h ne "") {
$public_h = $public_h_header . $public_h . "#endif /* $block */\n";
}
if ($private_h ne "") {
$private_h = $private_h_header . $private_h . "#endif /* $private */\n";
}
if($opt_o) {
print OUT $public_h;
}
if($opt_p) {
print PRIV $private_h;
}
close OUT;
close PRIV;
-87
View File
@@ -1,87 +0,0 @@
dnl $Id: mips-abi.m4,v 1.4 1998/05/16 20:44:15 joda Exp $
dnl
dnl
dnl Check for MIPS/IRIX ABI flags. Sets $abi and $abilibdirext to some
dnl value.
AC_DEFUN(AC_MIPS_ABI, [
AC_ARG_WITH(mips_abi,
[ --with-mips-abi=abi ABI to use for IRIX (32, n32, or 64)])
case "$host_os" in
irix*)
with_mips_abi="${with_mips_abi:-yes}"
if test -n "$GCC"; then
# GCC < 2.8 only supports the O32 ABI. GCC >= 2.8 has a flag to select
# which ABI to use, but only supports (as of 2.8.1) the N32 and 64 ABIs.
#
# Default to N32, but if GCC doesn't grok -mabi=n32, we assume an old
# GCC and revert back to O32. The same goes if O32 is asked for - old
# GCCs doesn't like the -mabi option, and new GCCs can't output O32.
#
# Don't you just love *all* the different SGI ABIs?
case "${with_mips_abi}" in
32|o32) abi='-mabi=32'; abilibdirext='' ;;
n32|yes) abi='-mabi=n32'; abilibdirext='32' ;;
64) abi='-mabi=64'; abilibdirext='64' ;;
no) abi=''; abilibdirext='';;
*) AC_ERROR("Invalid ABI specified") ;;
esac
if test -n "$abi" ; then
ac_foo=krb_cv_gcc_`echo $abi | tr =- __`
dnl
dnl can't use AC_CACHE_CHECK here, since it doesn't quote CACHE-ID to
dnl AC_MSG_RESULT
dnl
AC_MSG_CHECKING([if $CC supports the $abi option])
AC_CACHE_VAL($ac_foo, [
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $abi"
AC_TRY_COMPILE(,int x;, eval $ac_foo=yes, eval $ac_foo=no)
CFLAGS="$save_CFLAGS"
])
ac_res=`eval echo \\\$$ac_foo`
AC_MSG_RESULT($ac_res)
if test $ac_res = no; then
# Try to figure out why that failed...
case $abi in
-mabi=32)
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mabi=n32"
AC_TRY_COMPILE(,int x;, ac_res=yes, ac_res=no)
CLAGS="$save_CFLAGS"
if test $ac_res = yes; then
# New GCC
AC_ERROR([$CC does not support the $with_mips_abi ABI])
fi
# Old GCC
abi=''
abilibdirext=''
;;
-mabi=n32|-mabi=64)
if test $with_mips_abi = yes; then
# Old GCC, default to O32
abi=''
abilibdirext=''
else
# Some broken GCC
AC_ERROR([$CC does not support the $with_mips_abi ABI])
fi
;;
esac
fi #if test $ac_res = no; then
fi #if test -n "$abi" ; then
else
case "${with_mips_abi}" in
32|o32) abi='-32'; abilibdirext='' ;;
n32|yes) abi='-n32'; abilibdirext='32' ;;
64) abi='-64'; abilibdirext='64' ;;
no) abi=''; abilibdirext='';;
*) AC_ERROR("Invalid ABI specified") ;;
esac
fi #if test -n "$GCC"; then
;;
esac
])
-3
View File
@@ -1,3 +0,0 @@
dnl $Id: misc.m4,v 1.1 1997/12/14 15:59:04 joda Exp $
dnl
define(upcase,`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`)dnl
-25
View File
@@ -1,25 +0,0 @@
dnl $Id: need-proto.m4,v 1.2 1999/03/01 09:52:24 joda Exp $
dnl
dnl
dnl Check if we need the prototype for a function
dnl
dnl AC_NEED_PROTO(includes, function)
AC_DEFUN(AC_NEED_PROTO, [
if test "$ac_cv_func_$2+set" != set -o "$ac_cv_func_$2" = yes; then
AC_CACHE_CHECK([if $2 needs a prototype], ac_cv_func_$2_noproto,
AC_TRY_COMPILE([$1],
[struct foo { int foo; } xx;
extern int $2 (struct foo*);
$2(&xx);
],
eval "ac_cv_func_$2_noproto=yes",
eval "ac_cv_func_$2_noproto=no"))
define([foo], [NEED_]translit($2, [a-z], [A-Z])[_PROTO])
if test "$ac_cv_func_$2_noproto" = yes; then
AC_DEFINE(foo, 1, [define if the system is missing a prototype for $2()])
fi
undefine([foo])
fi
])
-14
View File
@@ -1,14 +0,0 @@
dnl $Id: osfc2.m4,v 1.2 1999/03/27 17:28:16 joda Exp $
dnl
dnl enable OSF C2 stuff
AC_DEFUN(AC_CHECK_OSFC2,[
AC_ARG_ENABLE(osfc2,
[ --enable-osfc2 enable some OSF C2 support])
LIB_security=
if test "$enable_osfc2" = yes; then
AC_DEFINE(HAVE_OSFC2, 1, [Define to enable basic OSF C2 support.])
LIB_security=-lsecurity
fi
AC_SUBST(LIB_security)
])
-22
View File
@@ -1,22 +0,0 @@
dnl $Id: proto-compat.m4,v 1.3 1999/03/01 13:03:48 joda Exp $
dnl
dnl
dnl Check if the prototype of a function is compatible with another one
dnl
dnl AC_PROTO_COMPAT(includes, function, prototype)
AC_DEFUN(AC_PROTO_COMPAT, [
AC_CACHE_CHECK([if $2 is compatible with system prototype],
ac_cv_func_$2_proto_compat,
AC_TRY_COMPILE([$1],
[$3;],
eval "ac_cv_func_$2_proto_compat=yes",
eval "ac_cv_func_$2_proto_compat=no"))
define([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE])
if test "$ac_cv_func_$2_proto_compat" = yes; then
AC_DEFINE(foo, 1, [define if prototype of $2 is compatible with
$3])
fi
undefine([foo])
])
-88
View File
@@ -1,88 +0,0 @@
dnl $Id: test-package.m4,v 1.7 1999/04/19 13:33:05 assar Exp $
dnl
dnl AC_TEST_PACKAGE_NEW(package,headers,libraries,extra libs,default locations)
AC_DEFUN(AC_TEST_PACKAGE,[AC_TEST_PACKAGE_NEW($1,[#include <$2>],$4,,$5)])
AC_DEFUN(AC_TEST_PACKAGE_NEW,[
AC_ARG_WITH($1,
[ --with-$1=dir use $1 in dir])
AC_ARG_WITH($1-lib,
[ --with-$1-lib=dir use $1 libraries in dir],
[if test "$withval" = "yes" -o "$withval" = "no"; then
AC_MSG_ERROR([No argument for --with-$1-lib])
elif test "X$with_$1" = "X"; then
with_$1=yes
fi])
AC_ARG_WITH($1-include,
[ --with-$1-include=dir use $1 headers in dir],
[if test "$withval" = "yes" -o "$withval" = "no"; then
AC_MSG_ERROR([No argument for --with-$1-include])
elif test "X$with_$1" = "X"; then
with_$1=yes
fi])
AC_MSG_CHECKING(for $1)
case "$with_$1" in
yes) ;;
no) ;;
"") ;;
*) if test "$with_$1_include" = ""; then
with_$1_include="$with_$1/include"
fi
if test "$with_$1_lib" = ""; then
with_$1_lib="$with_$1/lib$abilibdirext"
fi
;;
esac
header_dirs=
lib_dirs=
d='$5'
for i in $d; do
header_dirs="$header_dirs $i/include"
lib_dirs="$lib_dirs $i/lib$abilibdirext"
done
case "$with_$1_include" in
yes) ;;
no) ;;
*) header_dirs="$with_$1_include $header_dirs";;
esac
case "$with_$1_lib" in
yes) ;;
no) ;;
*) lib_dirs="$with_$1_lib $lib_dirs";;
esac
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
ires= lres=
for i in $header_dirs; do
CFLAGS="-I$i $save_CFLAGS"
AC_TRY_COMPILE([$2],,ires=$i;break)
done
for i in $lib_dirs; do
LIBS="-L$i $3 $4 $save_LIBS"
AC_TRY_LINK([$2],,lres=$i;break)
done
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
if test "$ires" -a "$lres" -a "$with_$1" != "no"; then
$1_includedir="$ires"
$1_libdir="$lres"
INCLUDE_$1="-I$$1_includedir"
LIB_$1="-L$$1_libdir $3"
AC_DEFINE_UNQUOTED(upcase($1),1,[Define if you have the $1 package.])
with_$1=yes
AC_MSG_RESULT([headers $ires, libraries $lres])
else
INCLUDE_$1=
LIB_$1=
with_$1=no
AC_MSG_RESULT($with_$1)
fi
AC_SUBST(INCLUDE_$1)
AC_SUBST(LIB_$1)
])
-21
View File
@@ -1,21 +0,0 @@
dnl $Id: wflags.m4,v 1.3 1999/03/11 12:11:41 joda Exp $
dnl
dnl set WFLAGS
AC_DEFUN(AC_WFLAGS,[
WFLAGS_NOUNUSED=""
WFLAGS_NOIMPLICITINT=""
if test -z "$WFLAGS" -a "$GCC" = "yes"; then
# -Wno-implicit-int for broken X11 headers
# leave these out for now:
# -Wcast-align doesn't work well on alpha osf/1
# -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast
# -Wmissing-declarations -Wnested-externs
WFLAGS="ifelse($#, 0,-Wall, $1)"
WFLAGS_NOUNUSED="-Wno-unused"
WFLAGS_NOIMPLICITINT="-Wno-implicit-int"
fi
AC_SUBST(WFLAGS)dnl
AC_SUBST(WFLAGS_NOUNUSED)dnl
AC_SUBST(WFLAGS_NOIMPLICITINT)dnl
])
-17
View File
@@ -1,17 +0,0 @@
$Id: dir,v 1.1 1997/06/12 16:15:21 joda Exp $
This is the file .../info/dir, which contains the topmost node of the
Info hierarchy. The first time you invoke Info you start off
looking at that node, which is (dir)Top.

File: dir Node: Top This is the top of the INFO tree
This (the Directory node) gives a menu of major topics.
Typing "q" exits, "?" lists all Info commands, "d" returns here,
"h" gives a primer for first-timers,
"mEmacs<Return>" visits the Emacs topic, etc.
In Emacs, you can click mouse button 2 on a menu item or cross reference
to select it.
* Menu:
-7
View File
@@ -1,7 +0,0 @@
/* fix for broken ultrix sys/socket.h. */
#ifndef __SOCKET_H__
#define __SOCKET_H__
#include "/usr/include/sys/socket.h"
#endif /* __SOCKET_H__ */
-6
View File
@@ -1,6 +0,0 @@
# $Id: Makefile.am,v 1.2 1999/03/21 17:11:08 joda Exp $
include $(top_srcdir)/Makefile.am.common
SUBDIRS = @LIB_AUTH_SUBDIRS@
DIST_SUBDIRS = afskauthlib pam sia
-55
View File
@@ -1,55 +0,0 @@
#
# $Id: Makefile.in,v 1.12 1998/03/15 05:58:10 assar Exp $
#
srcdir = @srcdir@
VPATH = @srcdir@
SHELL = /bin/sh
@SET_MAKE@
SUBDIRS = @LIB_AUTH_SUBDIRS@
all:
SUBDIRS='$(SUBDIRS)'; \
for i in $$SUBDIRS; \
do (cd $$i && $(MAKE) $(MFLAGS) all); done
Wall:
make CFLAGS="-g -Wall -Wno-comment -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__"
install:
SUBDIRS=$(SUBDIRS); \
for i in $$SUBDIRS; \
do (cd $$i && $(MAKE) $(MFLAGS) install); done
uninstall:
SUBDIRS=$(SUBDIRS); \
for i in $$SUBDIRS; \
do (cd $$i && $(MAKE) $(MFLAGS) uninstall); done
check:
SUBDIRS=$(SUBDIRS); \
for i in $$SUBDIRS; \
do (cd $$i && $(MAKE) $(MFLAGS) check); done
clean:
SUBDIRS=$(SUBDIRS); \
for i in $$SUBDIRS; \
do (cd $$i && $(MAKE) $(MFLAGS) clean); done
mostlyclean: clean
distclean:
SUBDIRS=$(SUBDIRS); \
for i in $$SUBDIRS; \
do (cd $$i && $(MAKE) $(MFLAGS) distclean); done
rm -f Makefile *~
realclean:
SUBDIRS=$(SUBDIRS); \
for i in $$SUBDIRS; \
do (cd $$i && $(MAKE) $(MFLAGS) realclean); done
.PHONY: all Wall install uninstall check clean mostlyclean distclean realclean
@@ -1,38 +0,0 @@
# $Id: Makefile.am,v 1.3 1999/04/08 12:35:33 joda Exp $
include $(top_srcdir)/Makefile.am.common
INCLUDES += $(INCLUDE_krb4)
DEFS = @DEFS@
foodir = $(libdir)
foo_DATA = afskauthlib.so
SUFFIXES += .c .o
SRCS = verify.c
OBJS = verify.o
CLEANFILES = $(foo_DATA) $(OBJS) so_locations
afskauthlib.so: $(OBJS)
$(LD) -shared -o $@ $(LDFLAGS) $(OBJS) $(L)
.c.o:
$(COMPILE) -c $<
if KRB4
KAFS = $(top_builddir)/lib/kafs/.libs/libkafs.a
endif
L = \
$(KAFS) \
$(top_builddir)/lib/krb5/.libs/libkrb5.a \
$(top_builddir)/lib/asn1/.libs/libasn1.a \
$(LIB_krb4) \
$(top_builddir)/lib/des/.libs/libdes.a \
$(top_builddir)/lib/roken/.libs/libroken.a \
-lc
$(OBJS): $(top_builddir)/include/config.h
@@ -1,25 +0,0 @@
IRIX
----
The IRIX support is a module that is compatible with Transarc's
`afskauthlib.so'. It should work with all programs that use this
library, this should include `login' and `xdm'.
The interface is not very documented but it seems that you have to copy
`libkafs.so', `libkrb.so', and `libdes.so' to `/usr/lib', or build your
`afskauthlib.so' statically.
The `afskauthlib.so' itself is able to reside in `/usr/vice/etc',
`/usr/afsws/lib', or the current directory (wherever that is).
IRIX 6.4 and newer seems to have all programs (including `xdm' and
`login') in the N32 object format, whereas in older versions they were
O32. For it to work, the `afskauthlib.so' library has to be in the same
object format as the program that tries to load it. This might require
that you have to configure and build for O32 in addition to the default
N32.
Appart from this it should "just work", there are no configuration
files.
@@ -1,3 +0,0 @@
# $Id: Makefile.am,v 1.2 1999/04/01 14:57:04 joda Exp $
include $(top_srcdir)/Makefile.am.common
@@ -1,48 +0,0 @@
# $Id: Makefile.am,v 1.4 1999/04/08 12:36:40 joda Exp $
include $(top_srcdir)/Makefile.am.common
INCLUDES += $(INCLUDE_krb4)
WFLAGS += $(WFLAGS_NOIMPLICITINT)
DEFS = @DEFS@
## this is horribly ugly, but automake/libtool doesn't allow us to
## unconditionally build shared libraries, and it does not allow us to
## link with non-installed libraries
if KRB4
KAFS=$(top_builddir)/lib/kafs/.libs/libkafs.a
endif
L = \
$(KAFS) \
$(top_builddir)/lib/krb5/.libs/libkrb5.a \
$(top_builddir)/lib/asn1/.libs/libasn1.a \
$(LIB_krb4) \
$(top_builddir)/lib/des/.libs/libdes.a \
$(top_builddir)/lib/com_err/.libs/libcom_err.a \
$(top_builddir)/lib/roken/.libs/libroken.a \
$(LIB_getpwnam_r) \
-lc
EXTRA_DIST = sia.c krb5_matrix.conf krb5+c2_matrix.conf security.patch
foodir = $(libdir)
foo_DATA = libsia_krb5.so
LDFLAGS = -rpath $(libdir) -hidden -exported_symbol siad_\*
OBJS = sia.o posix_getpw.o
libsia_krb5.so: $(OBJS)
ld -shared -o $@ $(LDFLAGS) $(OBJS) $(L)
ostrip -x -z $@
CLEANFILES = libsia_krb5.so $(OBJS) so_locations
SUFFIXES += .c .o
.c.o:
$(COMPILE) -c $<
@@ -1,27 +0,0 @@
# $Id: krb5+c2_matrix.conf,v 1.2 1998/11/26 20:58:18 assar Exp $
# sia matrix configuration file (Kerberos 5 + C2)
siad_init=(KRB5,/usr/athena/lib/libsia_krb5.so)(BSD,libc.so)
siad_chk_invoker=(OSFC2,/usr/shlib/libsecurity.so)
siad_ses_init=(KRB5,/usr/athena/lib/libsia_krb5.so)(OSFC2,/usr/shlib/libsecurity.so)
siad_ses_authent=(KRB5,/usr/athena/lib/libsia_krb5.so)(OSFC2,/usr/shlib/libsecurity.so)
siad_ses_estab=(KRB5,/usr/athena/lib/libsia_krb5.so)(OSFC2,/usr/shlib/libsecurity.so)
siad_ses_launch=(KRB5,/usr/athena/lib/libsia_krb5.so)(OSFC2,/usr/shlib/libsecurity.so)
siad_ses_suauthent=(KRB5,/usr/athena/lib/libsia_krb5.so)(OSFC2,/usr/shlib/libsecurity.so)
siad_ses_reauthent=(KRB5,/usr/athena/lib/libsia_krb5.so)(OSFC2,/usr/shlib/libsecurity.so)
siad_chg_finger=(KRB5,/usr/athena/lib/libsia_krb5.so)(OSFC2,/usr/shlib/libsecurity.so)
siad_chg_password=(KRB5,/usr/athena/lib/libsia_krb5.so)(OSFC2,/usr/shlib/libsecurity.so)
siad_chg_shell=(KRB5,/usr/athena/lib/libsia_krb5.so)(OSFC2,/usr/shlib/libsecurity.so)
siad_getpwent=(BSD,libc.so)
siad_getpwuid=(BSD,libc.so)
siad_getpwnam=(BSD,libc.so)
siad_setpwent=(BSD,libc.so)
siad_endpwent=(BSD,libc.so)
siad_getgrent=(BSD,libc.so)
siad_getgrgid=(BSD,libc.so)
siad_getgrnam=(BSD,libc.so)
siad_setgrent=(BSD,libc.so)
siad_endgrent=(BSD,libc.so)
siad_ses_release=(KRB5,/usr/athena/lib/libsia_krb5.so)(OSFC2,/usr/shlib/libsecurity.so)
siad_chk_user=(KRB5,/usr/athena/lib/libsia_krb5.so)(OSFC2,/usr/shlib/libsecurity.so)
@@ -1,27 +0,0 @@
# $Id: krb5_matrix.conf,v 1.1 1997/05/15 18:34:18 joda Exp $
# sia matrix configuration file (Kerberos 5 + BSD)
siad_init=(KRB5,/usr/athena/lib/libsia_krb5.so)(BSD,libc.so)
siad_chk_invoker=(BSD,libc.so)
siad_ses_init=(KRB5,/usr/athena/lib/libsia_krb5.so)
siad_ses_authent=(KRB5,/usr/athena/lib/libsia_krb5.so)(BSD,libc.so)
siad_ses_estab=(BSD,libc.so)
siad_ses_launch=(KRB5,/usr/athena/lib/libsia_krb5.so)(BSD,libc.so)
siad_ses_suauthent=(KRB5,/usr/athena/lib/libsia_krb5.so)(BSD,libc.so)
siad_ses_reauthent=(BSD,libc.so)
siad_chg_finger=(BSD,libc.so)
siad_chg_password=(BSD,libc.so)
siad_chg_shell=(BSD,libc.so)
siad_getpwent=(BSD,libc.so)
siad_getpwuid=(BSD,libc.so)
siad_getpwnam=(BSD,libc.so)
siad_setpwent=(BSD,libc.so)
siad_endpwent=(BSD,libc.so)
siad_getgrent=(BSD,libc.so)
siad_getgrgid=(BSD,libc.so)
siad_getgrnam=(BSD,libc.so)
siad_setgrent=(BSD,libc.so)
siad_endgrent=(BSD,libc.so)
siad_ses_release=(KRB5,/usr/athena/lib/libsia_krb5.so)(BSD,libc.so)
siad_chk_user=(BSD,libc.so)
@@ -1,78 +0,0 @@
/*
* Copyright (c) 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of KTH nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
#include "sia_locl.h"
RCSID("$Id: posix_getpw.c,v 1.1 1999/03/21 17:07:02 joda Exp $");
#ifndef POSIX_GETPWNAM_R
/*
* These functions translate from the old Digital UNIX 3.x interface
* to POSIX.1c.
*/
int
posix_getpwnam_r(const char *name, struct passwd *pwd,
char *buffer, int len, struct passwd **result)
{
int ret = getpwnam_r(name, pwd, buffer, len);
if(ret == 0)
*result = pwd;
else{
*result = NULL;
ret = _Geterrno();
if(ret == 0){
ret = ERANGE;
_Seterrno(ret);
}
}
return ret;
}
int
posix_getpwuid_r(uid_t uid, struct passwd *pwd,
char *buffer, int len, struct passwd **result)
{
int ret = getpwuid_r(uid, pwd, buffer, len);
if(ret == 0)
*result = pwd;
else{
*result = NULL;
ret = _Geterrno();
if(ret == 0){
ret = ERANGE;
_Seterrno(ret);
}
}
return ret;
}
#endif /* POSIX_GETPWNAM_R */
@@ -1,11 +0,0 @@
--- /sbin/init.d/security~ Tue Aug 20 22:44:09 1996
+++ /sbin/init.d/security Fri Nov 1 14:52:56 1996
@@ -49,7 +49,7 @@
SECURITY=BASE
fi
;;
- BASE)
+ BASE|KRB4)
;;
*)
echo "security configuration set to default (BASE)."
-94
View File
@@ -1,94 +0,0 @@
/*
* Copyright (c) 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of KTH nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
/* $Id: sia_locl.h,v 1.2 1999/04/01 16:09:22 joda Exp $ */
#ifndef __sia_locl_h__
#define __sia_locl_h__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <siad.h>
#include <pwd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef KRB5
#define SIA_KRB5
#elif defined(KRB4)
#define SIA_KRB4
#endif
#ifdef SIA_KRB5
#include <krb5.h>
#include <com_err.h>
#endif
#ifdef SIA_KRB4
#include <krb.h>
#include <krb_err.h>
#include <kadm.h>
#include <kadm_err.h>
#endif
#ifdef KRB4
#include <kafs.h>
#endif
#include <roken.h>
#ifndef POSIX_GETPWNAM_R
#define getpwnam_r posix_getpwnam_r
#define getpwuid_r posix_getpwuid_r
#endif /* POSIX_GETPWNAM_R */
#ifndef DEBUG
#define SIA_DEBUG(X)
#else
#define SIA_DEBUG(X) SIALOG X
#endif
struct state{
#ifdef SIA_KRB5
krb5_context context;
krb5_auth_context auth_context;
#endif
char ticket[MaxPathLen];
int valid;
};
#endif /* __sia_locl_h__ */
-246
View File
@@ -1,246 +0,0 @@
Copyright (c) 1992,1993,1995,1996, Jens-Uwe Mager, Helios Software GmbH
Not derived from licensed software.
Permission is granted to freely use, copy, modify, and redistribute
this software, provided that the author is not construed to be liable
for any results of using the software, alterations are clearly marked
as such, and this notice is not modified.
libdl.a
-------
This is an emulation library to emulate the SunOS/System V.4 functions
to access the runtime linker. The functions are emulated by using the
AIX load() function and by reading the .loader section of the loaded
module to find the exports. The to be loaded module should be linked as
follows (if using AIX 3):
cc -o module.so -bM:SRE -bE:module.exp -e _nostart $(OBJS)
For AIX 4:
cc -o module.so -bM:SRE -bE:module.exp -bnoentry $(OBJS)
If you want to reference symbols from the main part of the program in a
loaded module, you will have to link against the export file of the
main part:
cc -o main -bE:main.exp $(MAIN_OBJS)
cc -o module.so -bM:SRE -bI:main.exp -bE:module.exp -bnoentry $(OBJS)
Note that you explicitely have to specify what functions are supposed
to be accessible from your loaded modules, this is different from
SunOS/System V.4 where any global is automatically exported. If you
want to export all globals, the following script might be of help:
#!/bin/sh
/usr/ucb/nm -g $* | awk '$2 == "B" || $2 == "D" { print $3 }'
The module export file contains the symbols to be exported. Because
this library uses the loader section, the final module.so file can be
stripped. C++ users should build their shared objects using the script
makeC++SharedLib (part of the IBM C++ compiler), this will make sure
that constructors and destructors for static and global objects will be
called upon loading and unloading the module. GNU C++ users should use
the -shared option to g++ to link the shared object:
g++ -o module.so -shared $(OBJS)
If the shared object does have permissions for anybody, the shared
object will be loaded into the shared library segment and it will stay
there even if the main application terminates. If you rebuild your
shared object after a bugfix and you want to make sure that you really
get the newest version you will have to use the "slibclean" command
before starting the application again to garbage collect the shared
library segment. If the performance utilities (bosperf) are installed
you can use the following command to see what shared objects are
loaded:
/usr/lpp/bosperf/genkld | sort | uniq
For easier debugging you can avoid loading the shared object into the
shared library segment alltogether by removing permissions for others
from the module.so file:
chmod o-rwx module.so
This will ensure you get a fresh copy of the shared object for every
dlopen() call which is loaded into the application's data segment.
Usage
-----
void *dlopen(const char *path, int mode);
This routine loads the module pointed to by path and reads its export
table. If the path does not contain a '/' character, dlopen will search
for the module using the LIBPATH environment variable. It returns an
opaque handle to the module or NULL on error. The mode parameter can be
either RTLD_LAZY (for lazy function binding) or RTLD_NOW for immediate
function binding. The AIX implementation currently does treat RTLD_NOW
the same as RTLD_LAZY. The flag RTLD_GLOBAL might be or'ed into the
mode parameter to allow loaded modules to bind to global variables or
functions in other loaded modules loaded by dlopen(). If RTLD_GLOBAL is
not specified, only globals from the main part of the executable or
shared libraries are used to look for undefined symbols in loaded
modules.
void *dlsym(void *handle, const char *symbol);
This routine searches for the symbol in the module referred to by
handle and returns its address. If the symbol could not be found, the
function returns NULL. The return value must be casted to a proper
function pointer before it can be used. SunOS/System V.4 allows handle
to be a NULL pointer to refer to the module the call is made from, this
is not implemented.
int dlclose(void *handle);
This routine unloads the module referred to by the handle and disposes
of any local storage. this function returns -1 on failure. Any function
pointers obtained through dlsym() should be considered invalid after
closing a module.
As AIX caches shared objects in the shared library segment, function
pointers obtained through dlsym() might still work even though the
module has been unloaded. This can introduce subtle bugs that will
segment fault later if AIX garbage collects or immediatly on
SunOS/System V.4 as the text segment is unmapped.
char *dlerror(void);
This routine can be used to retrieve a text message describing the most
recent error that occured on on of the above routines. This function
returns NULL if there is no error information.
Initialization and termination handlers
---------------------------------------
The emulation provides for an initialization and a termination
handler. The dlfcn.h file contains a structure declaration named
dl_info with following members:
void (*init)(void);
void (*fini)(void);
The init function is called upon first referencing the library. The
fini function is called at dlclose() time or when the process exits.
The module should declare a variable named dl_info that contains this
structure which must be exported. These functions correspond to the
documented _init() and _fini() functions of SunOS 4.x, but these are
appearently not implemented in SunOS. When using SunOS 5.0, these
correspond to #pragma init and #pragma fini respectively. At the same
time any static or global C++ object's constructors or destructors will
be called.
BUGS
----
Please note that there is currently a problem with implicitely loaded
shared C++ libaries: if you refer to a shared C++ library from a loaded
module that is not yet used by the main program, the dlopen() emulator
does not notice this and does not call the static constructors for the
implicitely loaded library. This can be easily demonstrated by
referencing the C++ standard streams from a loaded module if the main
program is a plain C program.
Jens-Uwe Mager
HELIOS Software GmbH
Lavesstr. 80
30159 Hannover
Germany
Phone: +49 511 36482-0
FAX: +49 511 36482-69
AppleLink: helios.de/jum
Internet: [email protected]
Revison History
---------------
SCCS/s.dlfcn.h:
D 1.4 95/04/25 09:36:52 jum 4 3 00018/00004/00028
MRs:
COMMENTS:
added RTLD_GLOBAL, include and C++ guards
D 1.3 92/12/27 20:58:32 jum 3 2 00001/00001/00031
MRs:
COMMENTS:
we always have prototypes on RS/6000
D 1.2 92/08/16 17:45:11 jum 2 1 00009/00000/00023
MRs:
COMMENTS:
added dl_info structure to implement initialize and terminate functions
D 1.1 92/08/02 18:08:45 jum 1 0 00023/00000/00000
MRs:
COMMENTS:
Erstellungsdatum und -uhrzeit 92/08/02 18:08:45 von jum
SCCS/s.dlfcn.c:
D 1.11 96/04/10 20:12:51 jum 13 12 00037/00000/00533
MRs:
COMMENTS:
Integrated the changes from John W. Eaton <[email protected]> to initialize
g++ generated shared objects.
D 1.10 96/02/15 17:42:44 jum 12 10 00012/00007/00521
MRs:
COMMENTS:
the C++ constructor and destructor chains are now called properly for either
xlC 2 or xlC 3 (CSet++).
D 1.9 95/09/22 11:09:38 markus 10 9 00001/00008/00527
MRs:
COMMENTS:
Fix version number
D 1.8 95/09/22 10:14:34 markus 9 8 00008/00001/00527
MRs:
COMMENTS:
Added version number for dl lib
D 1.7 95/08/14 19:08:38 jum 8 6 00026/00004/00502
MRs:
COMMENTS:
Integrated the fixes from Kirk Benell ([email protected]) to allow loading of
shared objects generated under AIX 4. Fixed bug that symbols with exactly
8 characters would use garbage characters from the following symbol value.
D 1.6 95/04/25 09:38:03 jum 6 5 00046/00006/00460
MRs:
COMMENTS:
added handling of C++ static constructors and destructors, added RTLD_GLOBAL to bind against other loaded modules
D 1.5 93/02/14 20:14:17 jum 5 4 00002/00000/00464
MRs:
COMMENTS:
added path to dlopen error message to make clear where there error occured.
D 1.4 93/01/03 19:13:56 jum 4 3 00061/00005/00403
MRs:
COMMENTS:
to allow calling symbols in the main module call load with L_NOAUTODEFER and
do a loadbind later with the main module.
D 1.3 92/12/27 20:59:55 jum 3 2 00066/00008/00342
MRs:
COMMENTS:
added search by L_GETINFO if module got loaded by LIBPATH
D 1.2 92/08/16 17:45:43 jum 2 1 00074/00006/00276
MRs:
COMMENTS:
implemented initialize and terminate functions, added reference counting to avoid multiple loads of the same library
D 1.1 92/08/02 18:08:45 jum 1 0 00282/00000/00000
MRs:
COMMENTS:
Erstellungsdatum und -uhrzeit 92/08/02 18:08:45 von jum
-131
View File
@@ -1,131 +0,0 @@
/*
* $Id: krb-archaeology.h,v 1.2 1997/12/05 02:04:44 joda Exp $
*
* Most of the cruft in this file is probably:
*
* Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute
* of Technology.
*
* For copying and distribution information, please see the file
* <mit-copyright.h>.
*/
#ifndef __KRB_ARCHAEOLOGY_H__
#define __KRB_ARCHAEOLOGY_H__
/* Compare x and y in VAX byte order, result is -1, 0 or 1. */
#define krb_lsb_antinet_ulong_less(x, y) (((x) == (y)) ? 0 : krb_lsb_antinet_ulong_cmp(x, y))
#define krb_lsb_antinet_ushort_less(x, y) (((x) == (y)) ? 0 : krb_lsb_antinet_ushort_cmp(x, y))
int krb_lsb_antinet_ulong_cmp(u_int32_t x, u_int32_t y);
int krb_lsb_antinet_ushort_cmp(u_int16_t x, u_int16_t y);
u_int32_t lsb_time(time_t t, struct sockaddr_in *src, struct sockaddr_in *dst);
/* Macro's to obtain various fields from a packet */
#define pkt_version(packet) (unsigned int) *(packet->dat)
#define pkt_msg_type(packet) (unsigned int) *(packet->dat+1)
#define pkt_a_name(packet) (packet->dat+2)
#define pkt_a_inst(packet) \
(packet->dat+3+strlen((char *)pkt_a_name(packet)))
#define pkt_a_realm(packet) \
(pkt_a_inst(packet)+1+strlen((char *)pkt_a_inst(packet)))
/* Macro to obtain realm from application request */
#define apreq_realm(auth) (auth->dat + 3)
#define pkt_time_ws(packet) (char *) \
(packet->dat+5+strlen((char *)pkt_a_name(packet)) + \
strlen((char *)pkt_a_inst(packet)) + \
strlen((char *)pkt_a_realm(packet)))
#define pkt_no_req(packet) (unsigned short) \
*(packet->dat+9+strlen((char *)pkt_a_name(packet)) + \
strlen((char *)pkt_a_inst(packet)) + \
strlen((char *)pkt_a_realm(packet)))
#define pkt_x_date(packet) (char *) \
(packet->dat+10+strlen((char *)pkt_a_name(packet)) + \
strlen((char *)pkt_a_inst(packet)) + \
strlen((char *)pkt_a_realm(packet)))
#define pkt_err_code(packet) ( (char *) \
(packet->dat+9+strlen((char *)pkt_a_name(packet)) + \
strlen((char *)pkt_a_inst(packet)) + \
strlen((char *)pkt_a_realm(packet))))
#define pkt_err_text(packet) \
(packet->dat+13+strlen((char *)pkt_a_name(packet)) + \
strlen((char *)pkt_a_inst(packet)) + \
strlen((char *)pkt_a_realm(packet)))
/*
* macros for byte swapping; also scratch space
* u_quad 0-->7, 1-->6, 2-->5, 3-->4, 4-->3, 5-->2, 6-->1, 7-->0
* u_int32_t 0-->3, 1-->2, 2-->1, 3-->0
* u_int16_t 0-->1, 1-->0
*/
#define swap_u_16(x) {\
u_int32_t _krb_swap_tmp[4];\
swab(((char *) x) +0, ((char *) _krb_swap_tmp) +14 ,2); \
swab(((char *) x) +2, ((char *) _krb_swap_tmp) +12 ,2); \
swab(((char *) x) +4, ((char *) _krb_swap_tmp) +10 ,2); \
swab(((char *) x) +6, ((char *) _krb_swap_tmp) +8 ,2); \
swab(((char *) x) +8, ((char *) _krb_swap_tmp) +6 ,2); \
swab(((char *) x) +10,((char *) _krb_swap_tmp) +4 ,2); \
swab(((char *) x) +12,((char *) _krb_swap_tmp) +2 ,2); \
swab(((char *) x) +14,((char *) _krb_swap_tmp) +0 ,2); \
memcpy(x, _krb_swap_tmp, 16);\
}
#define swap_u_12(x) {\
u_int32_t _krb_swap_tmp[4];\
swab(( char *) x, ((char *) _krb_swap_tmp) +10 ,2); \
swab(((char *) x) +2, ((char *) _krb_swap_tmp) +8 ,2); \
swab(((char *) x) +4, ((char *) _krb_swap_tmp) +6 ,2); \
swab(((char *) x) +6, ((char *) _krb_swap_tmp) +4 ,2); \
swab(((char *) x) +8, ((char *) _krb_swap_tmp) +2 ,2); \
swab(((char *) x) +10,((char *) _krb_swap_tmp) +0 ,2); \
memcpy(x, _krb_swap_tmp, 12);\
}
#define swap_C_Block(x) {\
u_int32_t _krb_swap_tmp[4];\
swab(( char *) x, ((char *) _krb_swap_tmp) +6 ,2); \
swab(((char *) x) +2,((char *) _krb_swap_tmp) +4 ,2); \
swab(((char *) x) +4,((char *) _krb_swap_tmp) +2 ,2); \
swab(((char *) x) +6,((char *) _krb_swap_tmp) ,2); \
memcpy(x, _krb_swap_tmp, 8);\
}
#define swap_u_quad(x) {\
u_int32_t _krb_swap_tmp[4];\
swab(( char *) &x, ((char *) _krb_swap_tmp) +6 ,2); \
swab(((char *) &x) +2,((char *) _krb_swap_tmp) +4 ,2); \
swab(((char *) &x) +4,((char *) _krb_swap_tmp) +2 ,2); \
swab(((char *) &x) +6,((char *) _krb_swap_tmp) ,2); \
memcpy(x, _krb_swap_tmp, 8);\
}
#define swap_u_long(x) {\
u_int32_t _krb_swap_tmp[4];\
swab((char *) &x, ((char *) _krb_swap_tmp) +2 ,2); \
swab(((char *) &x) +2,((char *) _krb_swap_tmp),2); \
x = _krb_swap_tmp[0]; \
}
#define swap_u_short(x) {\
u_int16_t _krb_swap_sh_tmp; \
swab((char *) &x, ( &_krb_swap_sh_tmp) ,2); \
x = (u_int16_t) _krb_swap_sh_tmp; \
}
/* Kerberos ticket flag field bit definitions */
#define K_FLAG_ORDER 0 /* bit 0 --> lsb */
#define K_FLAG_1 /* reserved */
#define K_FLAG_2 /* reserved */
#define K_FLAG_3 /* reserved */
#define K_FLAG_4 /* reserved */
#define K_FLAG_5 /* reserved */
#define K_FLAG_6 /* reserved */
#define K_FLAG_7 /* reserved, bit 7 --> msb */
#endif /* __KRB_ARCHAEOLOGY_H__ */
-398
View File
@@ -1,398 +0,0 @@
# Microsoft Developer Studio Project File - Name="krb" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=krb - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "krb.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "krb.mak" CFG="krb - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "krb - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "krb - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "krb - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir ".\Release"
# PROP Intermediate_Dir ".\Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "..\..\include" /I "..\..\include\win32" /I "..\des" /I "..\roken" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_CONFIG_H" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 ..\roken\Release\roken.lib ..\des\Release\des.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /machine:I386
!ELSEIF "$(CFG)" == "krb - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\Debug"
# PROP BASE Intermediate_Dir ".\Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ".\Debug"
# PROP Intermediate_Dir ".\Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I "..\..\include" /I "..\..\include\win32" /I "..\des" /I "..\roken" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_CONFIG_H" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
# ADD LINK32 ..\roken\Debug\roken.lib ..\des\Debug\des.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /debug /machine:I386
!ENDIF
# Begin Target
# Name "krb - Win32 Release"
# Name "krb - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
# Begin Source File
SOURCE=.\cr_err_reply.c
# End Source File
# Begin Source File
SOURCE=.\create_auth_reply.c
# End Source File
# Begin Source File
SOURCE=.\create_ciph.c
# End Source File
# Begin Source File
SOURCE=.\create_ticket.c
# End Source File
# Begin Source File
SOURCE=.\debug_decl.c
# End Source File
# Begin Source File
SOURCE=.\decomp_ticket.c
# End Source File
# Begin Source File
SOURCE=.\dllmain.c
# End Source File
# Begin Source File
SOURCE=.\encrypt_ktext.c
# End Source File
# Begin Source File
SOURCE=.\extra.c
# End Source File
# Begin Source File
SOURCE=.\get_ad_tkt.c
# End Source File
# Begin Source File
SOURCE=.\get_cred.c
# End Source File
# Begin Source File
SOURCE=.\get_default_principal.c
# End Source File
# Begin Source File
SOURCE=.\get_host.c
# End Source File
# Begin Source File
SOURCE=.\get_in_tkt.c
# End Source File
# Begin Source File
SOURCE=.\get_krbrlm.c
# End Source File
# Begin Source File
SOURCE=.\get_svc_in_tkt.c
# End Source File
# Begin Source File
SOURCE=.\get_tf_fullname.c
# End Source File
# Begin Source File
SOURCE=.\get_tf_realm.c
# End Source File
# Begin Source File
SOURCE=.\getaddrs.c
# End Source File
# Begin Source File
SOURCE=.\getfile.c
# End Source File
# Begin Source File
SOURCE=.\getrealm.c
# End Source File
# Begin Source File
SOURCE=.\getst.c
# End Source File
# Begin Source File
SOURCE=.\k_gethostname.c
# End Source File
# Begin Source File
SOURCE=.\k_getport.c
# End Source File
# Begin Source File
SOURCE=.\k_getsockinst.c
# End Source File
# Begin Source File
SOURCE=.\k_localtime.c
# End Source File
# Begin Source File
SOURCE=.\kdc_reply.c
# End Source File
# Begin Source File
SOURCE=.\kntoln.c
# End Source File
# Begin Source File
SOURCE=.\krb.def
# End Source File
# Begin Source File
SOURCE=.\krb_check_auth.c
# End Source File
# Begin Source File
SOURCE=.\krb_equiv.c
# End Source File
# Begin Source File
SOURCE=.\krb_err_txt.c
# End Source File
# Begin Source File
SOURCE=.\krb_get_in_tkt.c
# End Source File
# Begin Source File
SOURCE=.\lifetime.c
# End Source File
# Begin Source File
SOURCE=.\logging.c
# End Source File
# Begin Source File
SOURCE=.\lsb_addr_comp.c
# End Source File
# Begin Source File
SOURCE=.\mk_auth.c
# End Source File
# Begin Source File
SOURCE=.\mk_err.c
# End Source File
# Begin Source File
SOURCE=.\mk_priv.c
# End Source File
# Begin Source File
SOURCE=.\mk_req.c
# End Source File
# Begin Source File
SOURCE=.\mk_safe.c
# End Source File
# Begin Source File
SOURCE=.\month_sname.c
# End Source File
# Begin Source File
SOURCE=.\name2name.c
# End Source File
# Begin Source File
SOURCE=.\netread.c
# End Source File
# Begin Source File
SOURCE=.\netwrite.c
# End Source File
# Begin Source File
SOURCE=.\one.c
# End Source File
# Begin Source File
SOURCE=.\parse_name.c
# End Source File
# Begin Source File
SOURCE=.\rd_err.c
# End Source File
# Begin Source File
SOURCE=.\rd_priv.c
# End Source File
# Begin Source File
SOURCE=.\rd_req.c
# End Source File
# Begin Source File
SOURCE=.\rd_safe.c
# End Source File
# Begin Source File
SOURCE=.\read_service_key.c
# End Source File
# Begin Source File
SOURCE=.\realm_parse.c
# End Source File
# Begin Source File
SOURCE=.\recvauth.c
# End Source File
# Begin Source File
SOURCE=.\rw.c
# End Source File
# Begin Source File
SOURCE=.\save_credentials.c
# End Source File
# Begin Source File
SOURCE=.\send_to_kdc.c
# End Source File
# Begin Source File
SOURCE=.\sendauth.c
# End Source File
# Begin Source File
SOURCE=.\stime.c
# End Source File
# Begin Source File
SOURCE=.\str2key.c
# End Source File
# Begin Source File
SOURCE=.\ticket_memory.c
# End Source File
# Begin Source File
SOURCE=.\time.c
# End Source File
# Begin Source File
SOURCE=.\tkt_string.c
# End Source File
# Begin Source File
SOURCE=.\unparse_name.c
# End Source File
# Begin Source File
SOURCE=.\util.c
# End Source File
# Begin Source File
SOURCE=.\verify_user.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=.\klog.h
# End Source File
# Begin Source File
SOURCE=".\krb-protos.h"
# End Source File
# Begin Source File
SOURCE=.\krb.h
# End Source File
# Begin Source File
SOURCE=.\krb_locl.h
# End Source File
# Begin Source File
SOURCE=.\krb_log.h
# End Source File
# Begin Source File
SOURCE=.\prot.h
# End Source File
# Begin Source File
SOURCE=.\ticket_memory.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\krb.rc
# End Source File
# End Group
# End Target
# End Project
-105
View File
@@ -1,105 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Swedish resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_SVE)
#ifdef _WIN32
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Royal Institute of Technology (KTH)\0"
VALUE "FileDescription", "krb\0"
VALUE "FileVersion", "4, 0, 9, 9\0"
VALUE "InternalName", "krb\0"
VALUE "LegalCopyright", "Copyright © 1996 - 1998 Royal Institute of Technology (KTH)\0"
VALUE "OriginalFilename", "krb.dll\0"
VALUE "ProductName", "KTH Kerberos\0"
VALUE "ProductVersion", "4,0,9,9\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
#endif // Swedish resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
-15
View File
@@ -1,15 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by krb.rc
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
-173
View File
@@ -1,173 +0,0 @@
/* $NetBSD: fnmatch.c,v 1.11 1995/02/27 03:43:06 cgd Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Guido van Rossum.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
#else
static char rcsid[] = "$NetBSD: fnmatch.c,v 1.11 1995/02/27 03:43:06 cgd Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
/*
* Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
* Compares a filename or pathname to a pattern.
*/
#include <fnmatch.h>
#include <string.h>
#define EOS '\0'
static const char *rangematch (const char *, int, int);
int
fnmatch(const char *pattern, const char *string, int flags)
{
const char *stringstart;
char c, test;
for (stringstart = string;;)
switch (c = *pattern++) {
case EOS:
return (*string == EOS ? 0 : FNM_NOMATCH);
case '?':
if (*string == EOS)
return (FNM_NOMATCH);
if (*string == '/' && (flags & FNM_PATHNAME))
return (FNM_NOMATCH);
if (*string == '.' && (flags & FNM_PERIOD) &&
(string == stringstart ||
((flags & FNM_PATHNAME) && *(string - 1) == '/')))
return (FNM_NOMATCH);
++string;
break;
case '*':
c = *pattern;
/* Collapse multiple stars. */
while (c == '*')
c = *++pattern;
if (*string == '.' && (flags & FNM_PERIOD) &&
(string == stringstart ||
((flags & FNM_PATHNAME) && *(string - 1) == '/')))
return (FNM_NOMATCH);
/* Optimize for pattern with * at end or before /. */
if (c == EOS)
if (flags & FNM_PATHNAME)
return (strchr(string, '/') == NULL ?
0 : FNM_NOMATCH);
else
return (0);
else if (c == '/' && flags & FNM_PATHNAME) {
if ((string = strchr(string, '/')) == NULL)
return (FNM_NOMATCH);
break;
}
/* General case, use recursion. */
while ((test = *string) != EOS) {
if (!fnmatch(pattern, string, flags & ~FNM_PERIOD))
return (0);
if (test == '/' && flags & FNM_PATHNAME)
break;
++string;
}
return (FNM_NOMATCH);
case '[':
if (*string == EOS)
return (FNM_NOMATCH);
if (*string == '/' && flags & FNM_PATHNAME)
return (FNM_NOMATCH);
if ((pattern =
rangematch(pattern, *string, flags)) == NULL)
return (FNM_NOMATCH);
++string;
break;
case '\\':
if (!(flags & FNM_NOESCAPE)) {
if ((c = *pattern++) == EOS) {
c = '\\';
--pattern;
}
}
/* FALLTHROUGH */
default:
if (c != *string++)
return (FNM_NOMATCH);
break;
}
/* NOTREACHED */
}
static const char *
rangematch(const char *pattern, int test, int flags)
{
int negate, ok;
char c, c2;
/*
* A bracket expression starting with an unquoted circumflex
* character produces unspecified results (IEEE 1003.2-1992,
* 3.13.2). This implementation treats it like '!', for
* consistency with the regular expression syntax.
* J.T. Conklin ([email protected])
*/
if (negate = (*pattern == '!' || *pattern == '^'))
++pattern;
for (ok = 0; (c = *pattern++) != ']';) {
if (c == '\\' && !(flags & FNM_NOESCAPE))
c = *pattern++;
if (c == EOS)
return (NULL);
if (*pattern == '-'
&& (c2 = *(pattern+1)) != EOS && c2 != ']') {
pattern += 2;
if (c2 == '\\' && !(flags & FNM_NOESCAPE))
c2 = *pattern++;
if (c2 == EOS)
return (NULL);
if (c <= test && test <= c2)
ok = 1;
} else if (c == test)
ok = 1;
}
return (ok == negate ? NULL : pattern);
}
-49
View File
@@ -1,49 +0,0 @@
/* $NetBSD: fnmatch.h,v 1.5 1994/10/26 00:55:53 cgd Exp $ */
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)fnmatch.h 8.1 (Berkeley) 6/2/93
*/
#ifndef _FNMATCH_H_
#define _FNMATCH_H_
#define FNM_NOMATCH 1 /* Match failed. */
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
int fnmatch (const char *, const char *, int);
#endif /* !_FNMATCH_H_ */
-84
View File
@@ -1,84 +0,0 @@
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Guido van Rossum.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)glob.h 8.1 (Berkeley) 6/2/93
*/
#ifndef _GLOB_H_
#define _GLOB_H_
struct stat;
typedef struct {
int gl_pathc; /* Count of total paths so far. */
int gl_matchc; /* Count of paths matching pattern. */
int gl_offs; /* Reserved at beginning of gl_pathv. */
int gl_flags; /* Copy of flags parameter to glob. */
char **gl_pathv; /* List of paths matching pattern. */
/* Copy of errfunc parameter to glob. */
int (*gl_errfunc) (const char *, int);
/*
* Alternate filesystem access methods for glob; replacement
* versions of closedir(3), readdir(3), opendir(3), stat(2)
* and lstat(2).
*/
void (*gl_closedir) (void *);
struct dirent *(*gl_readdir) (void *);
void *(*gl_opendir) (const char *);
int (*gl_lstat) (const char *, struct stat *);
int (*gl_stat) (const char *, struct stat *);
} glob_t;
#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
#define GLOB_ERR 0x0004 /* Return on error. */
#define GLOB_MARK 0x0008 /* Append / to matching directories. */
#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */
#define GLOB_NOSORT 0x0020 /* Don't sort. */
#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */
#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
#define GLOB_NOSPACE (-1) /* Malloc call failed. */
#define GLOB_ABEND (-2) /* Unignored error. */
int glob (const char *, int, int (*)(const char *, int), glob_t *);
void globfree (glob_t *);
#endif /* !_GLOB_H_ */
-49
View File
@@ -1,49 +0,0 @@
/*
* Copyright (c) 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of KTH nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "roken.h"
#ifndef HAVE_INNETGR
RCSID("$Id: innetgr.c,v 1.1 1999/03/11 14:04:01 joda Exp $");
int
innetgr(const char *netgroup, const char *machine,
const char *user, const char *domain)
{
return 0;
}
#endif
-15
View File
@@ -1,15 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by roken.rc
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
-156
View File
@@ -1,156 +0,0 @@
# Microsoft Developer Studio Project File - Name="roken" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=roken - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "roken.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "roken.mak" CFG="roken - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "roken - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "roken - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "roken - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir ".\Release"
# PROP Intermediate_Dir ".\Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MT /GX /O2 /I "..\krb" /I "..\des" /I "..\..\include" /I "..\..\include\win32" /I "." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_CONFIG_H" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x68e7780" /subsystem:windows /dll /machine:I386
!ELSEIF "$(CFG)" == "roken - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\Debug"
# PROP BASE Intermediate_Dir ".\Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ".\Debug"
# PROP Intermediate_Dir ".\Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MDd /Gm /GX /Zi /Od /I "..\krb" /I "..\des" /I "..\..\include" /I "..\..\include\win32" /I "." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_CONFIG_H" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /def:".\roken.def"
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "roken - Win32 Release"
# Name "roken - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
# Begin Source File
SOURCE=.\base64.c
# End Source File
# Begin Source File
SOURCE=.\concat.c
# End Source File
# Begin Source File
SOURCE=.\gettimeofday.c
# End Source File
# Begin Source File
SOURCE=.\getuid.c
# End Source File
# Begin Source File
SOURCE=.\resolve.c
# End Source File
# Begin Source File
SOURCE=.\roken.def
!IF "$(CFG)" == "roken - Win32 Release"
!ELSEIF "$(CFG)" == "roken - Win32 Debug"
# PROP Exclude_From_Build 1
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\snprintf.c
# End Source File
# Begin Source File
SOURCE=.\strcasecmp.c
# End Source File
# Begin Source File
SOURCE=.\strtok_r.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=.\resolve.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\roken.rc
# End Source File
# End Group
# End Target
# End Project
-105
View File
@@ -1,105 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Swedish resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_SVE)
#ifdef _WIN32
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Royal Institute of Technology (KTH)\0"
VALUE "FileDescription", "roken\0"
VALUE "FileVersion", "4, 0, 9, 9\0"
VALUE "InternalName", "roken\0"
VALUE "LegalCopyright", "Copyright © 1996 - 1998 Royal Institute of Technology (KTH)\0"
VALUE "OriginalFilename", "roken.dll\0"
VALUE "ProductName", "KTH Kerberos\0"
VALUE "ProductVersion", "4,0,9,9\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
#endif // Swedish resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
-112
View File
@@ -1,112 +0,0 @@
Thu Apr 1 17:03:59 1999 Johan Danielsson <[email protected]>
* make_cmds.c: use getarg
Tue Mar 23 14:36:21 1999 Johan Danielsson <[email protected]>
* Makefile.am: don't rename
Sun Mar 21 14:13:29 1999 Johan Danielsson <[email protected]>
* Makefile.am: don't roken-rename
Sat Mar 20 03:43:30 1999 Assar Westerlund <[email protected]>
* parse.y: replace return with YYACCEPT
Fri Mar 19 14:53:20 1999 Johan Danielsson <[email protected]>
* Makefile.am: add libss; add version-info
Thu Mar 18 15:07:06 1999 Johan Danielsson <[email protected]>
* Makefile.am: clean lex.c parse.c parse.h
* Makefile.am: install ss.h
* Makefile.am: include Makefile.am.common
Thu Mar 11 15:01:01 1999 Johan Danielsson <[email protected]>
* parse.y: prototype for error_message
Tue Feb 9 23:45:37 1999 Johan Danielsson <[email protected]>
* Makefile.in: add snprintf.o to make_cmds
Sun Nov 22 10:46:23 1998 Assar Westerlund <[email protected]>
* sl.c (sl_command_loop): remove unused variable
* ss.c (ss_error): remove unused variable
* make_cmds.c: include err.h
(main): remove unused variable
* Makefile.in (WFLAGS): set
Sun Sep 27 01:28:21 1998 Assar Westerlund <[email protected]>
* make_cmds.c: clean-up and simplification
Mon May 25 02:54:13 1998 Assar Westerlund <[email protected]>
* Makefile.in (clean): try to remove shared library debris
* Makefile.in: make symlink magic work
Sun Apr 19 10:00:26 1998 Assar Westerlund <[email protected]>
* Makefile.in: add symlink magic for linux
Sun Apr 5 09:21:43 1998 Assar Westerlund <[email protected]>
* parse.y: define alloca to malloc in case we're using bison but
don't have alloca
Sat Mar 28 11:39:00 1998 Assar Westerlund <[email protected]>
* sl.c (sl_loop): s/2/1
Sat Mar 21 00:46:51 1998 Johan Danielsson <[email protected]>
* sl.c (sl_loop): check that there is at least one argument before
calling sl_command
Sun Mar 1 05:14:37 1998 Johan Danielsson <[email protected]>
* sl.c (sl_loop): Fix general broken-ness.
* sl.c: Cleanup printing of help strings.
Thu Feb 26 02:22:02 1998 Assar Westerlund <[email protected]>
* Makefile.am: @LEXLIB@
Sat Feb 21 15:18:21 1998 assar westerlund <[email protected]>
* Makefile.in: set YACC and LEX
Mon Feb 16 16:08:25 1998 Johan Danielsson <[email protected]>
* Makefile.am: Some fixes for ss/mk_cmds.
Sun Feb 15 05:12:11 1998 Johan Danielsson <[email protected]>
* Makefile.in: Install libsl under the `libss' name too. Install
mk_cmds, and ss.h.
* make_cmds.c: A mk_cmds clone that creates SL structures.
* ss.c: SS compatibility functions.
* sl.c: Move command line split to function `sl_make_argv'.
Tue Feb 3 16:45:44 1998 Johan Danielsson <[email protected]>
* sl.c: Add sl_command_loop, that is the loop body of sl_loop.
Mon Oct 20 01:13:21 1997 Assar Westerlund <[email protected]>
* sl.c (sl_help): actually use the `help' field of `SL_cmd'
-44
View File
@@ -1,44 +0,0 @@
# $Id: Makefile.am,v 1.14 1999/04/09 18:28:29 assar Exp $
include $(top_srcdir)/Makefile.am.common
YFLAGS = -d
include_HEADERS = sl.h
lib_LTLIBRARIES = libsl.la libss.la
libsl_la_LDFLAGS = -version-info 0:0:0
libss_la_LDFLAGS = -version-info 0:0:0
RENAME_SRC = roken_rename.h strtok_r.c snprintf.c
libsl_la_SOURCES = sl_locl.h sl.c
libss_la_SOURCES = $(libsl_la_SOURCES) ss.c ss.h
EXTRA_libsl_la_SOURCES = strtok_r.c snprintf.c roken_rename.h
# install these?
noinst_PROGRAMS = mk_cmds
mk_cmds_SOURCES = make_cmds.c make_cmds.h parse.y lex.l
RENAME_mk_cmds_SRC = roken_rename.h snprintf.c
EXTRA_mk_cmds_SOURCES = snprintf.c roken_rename.h
ssincludedir = $(includedir)/ss
ssinclude_HEADERS = ss.h
CLEANFILES = lex.c parse.c parse.h snprintf.c strtok_r.c
$(mk_cmds_OBJECTS): parse.h
LDADD = \
$(LIB_roken) \
$(LEXLIB)
strtok_r.c:
$(LN_S) $(srcdir)/../roken/strtok_r.c .
snprintf.c:
$(LN_S) $(srcdir)/../roken/snprintf.c .
-11
View File
@@ -1,11 +0,0 @@
#
# *** THIS FILE IS NORMALLY OVERWRITTEN BY CONFIGURE ***
#
#
# $Id: Makefile,v 1.3 1997/09/09 15:06:35 bg Exp $
all:
$(MAKE) -f Makefile.in cat
clean:
rm -f *.cat[1358] *~
-72
View File
@@ -1,72 +0,0 @@
.\" $Id: afslog.1,v 1.3 1998/06/30 15:28:48 assar Exp $
.\"
.Dd April 27, 1996
.Dt AFSLOG 1
.Os KTH-KRB
.Sh NAME
.Nm afslog
.Nd
obtains AFS tokens for specified cells
.Sh SYNOPSIS
.Nm
.Op Fl d
.Op Fl c Ar cell
.Op Fl k Ar realm
.Op Fl p Pa path
.Op Fl unlog
.Op Fl createuser
.Op Ar args
.Sh DESCRIPTION
The
.Nm
command obtains AFS tokens,
.Ar args
are either a name of a cell or a pathnames of a file in the cell to
get tokens for. If an argument is
.Li .
or
.Li ..
or contains a slash it is assumed to be a pathname. Otherwise it is
assumed to be a name of a cell or a prefix thereof.
.Pp
The
.Fl c
and
.Fl p
flags can be used to resolve ambiguities.
.Pp
.Nm
might fail to guess the Kerberos realm to get tickets for (for
instance if the volume location servers of the cell does not reside in
the kerberos realm that holds the AFS service key, and the correct
realm isn't the same as the cell name or the local realm (I didn't say
this was a common problem)). Anyway, the
.Fl k
can be used to give a hint. It should not be used unless there is a
problem, since all tickets will be taken from the specified realm and
this is not (usually) what you want.
.Pp
.Fl createuser
means that
.Nm
should try to run
.Nm pts
to create a remote user principal in another cell.
.Fl d
can be used for debugging.
.Pp
If the
.Fl unlog
flag is given any tokens are removed and all other arguments are ignored.
.Sh SEE ALSO
.Xr kauth 1 ,
.Xr kafs 3
.Sh BUGS
It should be able to handle the MIT Athena
.Nm aklog
flags
.Fl hosts ,
.Fl zsubs ,
and
.Fl noprdb ,
but does not.
File diff suppressed because it is too large. Load diff
-473
View File
@@ -1,473 +0,0 @@
.\" $NetBSD: ftpd.8,v 1.7 1995/04/11 02:44:53 cgd Exp $
.\"
.\" Copyright (c) 1985, 1988, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)ftpd.8 8.2 (Berkeley) 4/19/94
.\"
.Dd April 19, 1997
.Dt FTPD 8
.Os BSD 4.2
.Sh NAME
.Nm ftpd
.Nd
Internet File Transfer Protocol server
.Sh SYNOPSIS
.Nm ftpd
.Op Fl a Ar authmode
.Op Fl dilv
.Op Fl g Ar umask
.Op Fl p Ar port
.Op Fl T Ar maxtimeout
.Op Fl t Ar timeout
.Op Fl u Ar default umask
.Sh DESCRIPTION
.Nm Ftpd
is the
Internet File Transfer Protocol
server process. The server uses the
.Tn TCP
protocol
and listens at the port specified in the
.Dq ftp
service specification; see
.Xr services 5 .
.Pp
Available options:
.Bl -tag -width Ds
.It Fl a
Select the level of authentication required. Kerberised login can not
be turned off. The default is to only allow kerberised login. Other
possibilities can be turned on by giving a string of comma separated
flags as argument to
.Fl a .
Recognised flags are:
.Bl -tag -width plain
.It Ar plain
Allow logging in with plaintext password. The password can be a(n) OTP
or an ordinary password.
.It Ar otp
Same as
.Ar plain ,
but only OTP is allowed.
.It Ar ftp
Allow anonymous login.
.El
The following combination modes exists for backwards compatibility:
.Bl -tag -width plain
.It Ar none
Same as
.Ar plain,ftp .
.It Ar safe
Same as
.Ar ftp .
.It Ar user
Ignored.
.El
.It Fl d
Debugging information is written to the syslog using LOG_FTP.
.It Fl g
Anonymous users will get a umask of
.Ar umask .
.It Fl i
Open a socket and wait for a connection. This is mainly used for
debugging when ftpd isn't started by inetd.
.It Fl l
Each successful and failed
.Xr ftp 1
session is logged using syslog with a facility of LOG_FTP.
If this option is specified twice, the retrieve (get), store (put), append,
delete, make directory, remove directory and rename operations and
their filename arguments are also logged.
.It Fl p
Use
.Ar port
(a service name or number) instead of the default
.Ar ftp/tcp .
.It Fl T
A client may also request a different timeout period;
the maximum period allowed may be set to
.Ar timeout
seconds with the
.Fl T
option.
The default limit is 2 hours.
.It Fl t
The inactivity timeout period is set to
.Ar timeout
seconds (the default is 15 minutes).
.It Fl u
Set the initial umask to something else than the default 027.
.It Fl v
Verbose mode.
.El
.Pp
The file
.Pa /etc/nologin
can be used to disable ftp access.
If the file exists,
.Nm
displays it and exits.
If the file
.Pa /etc/ftpwelcome
exists,
.Nm
prints it before issuing the
.Dq ready
message.
If the file
.Pa /etc/motd
exists,
.Nm
prints it after a successful login.
.Pp
The ftp server currently supports the following ftp requests.
The case of the requests is ignored.
.Bl -column "Request" -offset indent
.It Request Ta "Description"
.It ABOR Ta "abort previous command"
.It ACCT Ta "specify account (ignored)"
.It ALLO Ta "allocate storage (vacuously)"
.It APPE Ta "append to a file"
.It CDUP Ta "change to parent of current working directory"
.It CWD Ta "change working directory"
.It DELE Ta "delete a file"
.It HELP Ta "give help information"
.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lgA"
.It MKD Ta "make a directory"
.It MDTM Ta "show last modification time of file"
.It MODE Ta "specify data transfer" Em mode
.It NLST Ta "give name list of files in directory"
.It NOOP Ta "do nothing"
.It PASS Ta "specify password"
.It PASV Ta "prepare for server-to-server transfer"
.It PORT Ta "specify data connection port"
.It PWD Ta "print the current working directory"
.It QUIT Ta "terminate session"
.It REST Ta "restart incomplete transfer"
.It RETR Ta "retrieve a file"
.It RMD Ta "remove a directory"
.It RNFR Ta "specify rename-from file name"
.It RNTO Ta "specify rename-to file name"
.It SITE Ta "non-standard commands (see next section)"
.It SIZE Ta "return size of file"
.It STAT Ta "return status of server"
.It STOR Ta "store a file"
.It STOU Ta "store a file with a unique name"
.It STRU Ta "specify data transfer" Em structure
.It SYST Ta "show operating system type of server system"
.It TYPE Ta "specify data transfer" Em type
.It USER Ta "specify user name"
.It XCUP Ta "change to parent of current working directory (deprecated)"
.It XCWD Ta "change working directory (deprecated)"
.It XMKD Ta "make a directory (deprecated)"
.It XPWD Ta "print the current working directory (deprecated)"
.It XRMD Ta "remove a directory (deprecated)"
.El
.Pp
The following commands are specified by RFC2228.
.Bl -column Request -offset indent
.It AUTH Ta "authentication/security mechanism"
.It ADAT Ta "authentication/security data"
.It PROT Ta "data channel protection level"
.It PBSZ Ta "protection buffer size"
.It MIC Ta "integrity protected command"
.It CONF Ta "confidentiality protected command"
.It ENC Ta "privacy protected command"
.It CCC Ta "clear command channel"
.El
.Pp
The following non-standard or
.Tn UNIX
specific commands are supported
by the
SITE request.
.Pp
.Bl -column Request -offset indent
.It UMASK Ta change umask, (e.g.
.Ic "SITE UMASK 002" )
.It IDLE Ta set idle-timer, (e.g.
.Ic "SITE IDLE 60" )
.It CHMOD Ta change mode of a file (e.g.
.Ic "SITE CHMOD 755 filename" )
.It FIND Ta quickly find a specific file with GNU
.Xr locate 1 .
.It HELP Ta give help information.
.El
.Pp
The following Kerberos related site commands are understood.
.Bl -column Request -offset indent
.It KAUTH Ta obtain remote tickets.
.It KLIST Ta show remote tickets
.El
.Pp
The remaining ftp requests specified in Internet RFC 959
are
recognized, but not implemented.
MDTM and SIZE are not specified in RFC 959, but will appear in the
next updated FTP RFC.
.Pp
The ftp server will abort an active file transfer only when the
ABOR
command is preceded by a Telnet "Interrupt Process" (IP)
signal and a Telnet "Synch" signal in the command Telnet stream,
as described in Internet RFC 959.
If a
STAT
command is received during a data transfer, preceded by a Telnet IP
and Synch, transfer status will be returned.
.Pp
.Nm Ftpd
interprets file names according to the
.Dq globbing
conventions used by
.Xr csh 1 .
This allows users to utilize the metacharacters
.Dq Li \&*?[]{}~ .
.Pp
.Nm Ftpd
authenticates users according to these rules.
.Pp
.Bl -enum -offset indent
.It
If Kerberos authentication is used, the user must pass valid tickets
and the principal must be allowed to login as the remote user.
.It
The login name must be in the password data base, and not have a null
password (if kerberos is used the password field is not checked). In
this case a password must be provided by the client before any file
operations may be performed. If the user has an OTP key, the response
from a successful USER command will include an OTP challenge. The
client may choose to respond with a PASS command giving either a
standard password or an OTP one-time password. The server will
automatically determine which type of password it has been given and
attempt to authenticate accordingly. See
.Xr otp 1
for more information on OTP authentication.
.It
The login name must not appear in the file
.Pa /etc/ftpusers .
.It
The user must have a standard shell returned by
.Xr getusershell 3 .
.It
If the user name appears in the file
.Pa /etc/ftpchroot
the session's root will be changed to the user's login directory by
.Xr chroot 2
as for an
.Dq anonymous
or
.Dq ftp
account (see next item). However, the user must still supply a password.
This feature is intended as a compromise between a fully anonymous account
and a fully privileged account. The account should also be set up as for an
anonymous account.
.It
If the user name is
.Dq anonymous
or
.Dq ftp ,
an
anonymous ftp account must be present in the password
file (user
.Dq ftp ) .
In this case the user is allowed
to log in by specifying any password (by convention an email address for
the user should be used as the password).
.El
.Pp
In the last case,
.Nm ftpd
takes special measures to restrict the client's access privileges.
The server performs a
.Xr chroot 2
to the home directory of the
.Dq ftp
user.
In order that system security is not breached, it is recommended
that the
.Dq ftp
subtree be constructed with care, consider following these guidelines
for anonymous ftp.
In general all files should be owned by
.Dq root ,
and have non-write permissions (644 or 755 depending on the kind of
file). No files should be owned or writable by
.Dq ftp
(possibly with exception for the
.Pa ~ftp/incoming ,
as specified below).
.Bl -tag -width "~ftp/pub" -offset indent
.It Pa ~ftp
The
.Dq ftp
homedirectory should be owned by root.
.It Pa ~ftp/bin
The directory for external programs (such as
.Xr ls 1 ) .
These programs must either be statically linked, or you must setup an
environment for dynamic linking when running chrooted.
These programs will be used if present:
.Bl -tag -width "locate" -offset indent
.It ls
Used when listing files.
.It compress
When retrieving a filename that ends in
.Pa .Z ,
and that file isn't present,
.Nm
will try to find the filename without
.Pa .Z
and compress it on the fly.
.It gzip
Same as compress, just with files ending in
.Pa .gz .
.It gtar
Enables retrieval of whole directories as files ending in
.Pa .tar .
Can also be combined with compression. You must use GNU Tar (or some
other that supports the
.Fl z
and
.Fl Z
flags).
.It locate
Will enable ``fast find'' with the
.Ic SITE FIND
command. You must also create a
.Pa locatedb
file in
.Pa ~ftp/etc .
.El
.It Pa ~ftp/etc
If you put copies of the
.Xr passwd 5
and
.Xr group 5
files here, ls will be able to produce owner names rather than
numbers. Remember to remove any passwords from these files.
The file
.Pa motd ,
if present, will be printed after a successful login.
.It Pa ~ftp/dev
Put a copy of
.Xr /dev/null 7
here.
.It Pa ~ftp/pub
Traditional place to put whatever you want to make public.
.El
If you want guests to be able to upload files, create a
.Pa ~ftp/incoming
directory owned by
.Dq root ,
and group
.Dq ftp
with mode 730 (make sure
.Dq ftp
is member of group
.Dq ftp ) .
The following restrictions apply to anonymous users:
.Bl -bullet
.It
Directories created will have mode 700.
.It
Uploaded files will be created with an umask of 777, if not changed
with the
.Fl g
option.
.It
These command are not accessible:
.Ic DELE , RMD , RNTO , RNFR ,
.Ic SITE UMASK ,
and
.Ic SITE CHMOD .
.It
Filenames must start with an alpha-numeric character, and consist of
alpha-numeric characters or any of the following:
.Li \&+
(plus),
.Li \&-
(minus),
.Li \&=
(equal),
.Li \&_
(underscore),
.Li \&.
(period), and
.Li \&,
(comma).
.El
.Sh FILES
.Bl -tag -width /etc/ftpwelcome -compact
.It Pa /etc/ftpusers
Access list for users.
.It Pa /etc/ftpchroot
List of normal users who should be chroot'd.
.It Pa /etc/ftpwelcome
Welcome notice.
.It Pa /etc/motd
Welcome notice after login.
.It Pa /etc/nologin
Displayed and access refused.
.It Pa ~/.klogin
Login access for Kerberos.
.El
.Sh SEE ALSO
.Xr ftp 1 ,
.Xr otp 1 ,
.Xr getusershell 3 ,
.Xr ftpusers 5 ,
.Xr syslogd 8 ,
.Sh STANDARDS
.Bl -tag -compact -width "RFC 1938"
.It Cm RFC 959
FTP PROTOCOL SPECIFICATION
.It Cm RFC 1938
OTP Specification
.It Cm RFC 2228
FTP Security Extensions.
.Sh BUGS
The server must run as the super-user
to create sockets with privileged port numbers. It maintains
an effective user id of the logged in user, reverting to
the super-user only when binding addresses to sockets. The
possible security holes have been extensively
scrutinized, but are possibly incomplete.
.Sh HISTORY
The
.Nm
command appeared in
.Bx 4.2 .
-38
View File
@@ -1,38 +0,0 @@
.\" $Id: ftpusers.5,v 1.2 1997/05/07 20:11:11 joda Exp $
.\"
.Dd May 7, 1997
.Dt FTPUSERS 5
.Os KTH-KRB
.Sh NAME
.Pa /etc/ftpusers
.Nd
FTP access list file.
.Sh DESCRIPTION
.Pa /etc/ftpusers
contains a list of users that should be allowed or denied FTP
access. Each line contains a user, optionally followed by
.Dq allow
(anything but
.Dq allow
is ignored). The semi-user
.Dq *
matches any user. Users that has an explicit
.Dq allow ,
or that does not match any line, are allowed access. Anyone else is
denied access.
Note that this is compatible with the old format, where this file
contained a list of users that should be denied access.
.Sh EXAMPLES
This will deny anyone but
.Dq foo
and
.Dq bar
to use FTP:
.Bd -literal
foo allow
bar allow
*
.Ed
.Sh SEE ALSO
.Xr ftpd 8
-85
View File
@@ -1,85 +0,0 @@
.\" $Id: kpasswd.1,v 1.2 1996/06/12 21:29:21 bg Exp $
.\" Copyright 1989 by the Massachusetts Institute of Technology.
.\"
.\" For copying and distribution information,
.\" please see the file <mit-copyright.h>.
.\"
.TH KPASSWD 1 "Kerberos Version 4.0" "MIT Project Athena"
.FM mit
.SH NAME
kpasswd \- change a user's Kerberos password
.SH SYNOPSIS
.B kpasswd
[
.B \-h
] [
.B \-n
.I name
] [
.B \-i
.I instance
] [
.B \-r
.I realm
] [
\-u
.IR username[.instance][@realm] ]
.SH DESCRIPTION
The
.I kpasswd
command is used to change a Kerberos principal's password.
.PP
If the
.I \-h
option is specified, a brief summary of the options is printed, and
.I kpasswd
then exits.
.PP
If the
.I \-n
option is specified,
.I name
is used as the principal name rather than the username of the user
running
.IR kpasswd .
(This is determined from the ticket file if it exists;
otherwise, it is determined from the unix user id.)
.PP
If the
.I \-i
option is specified,
.I instance
is used as the instance rather than a null instance.
.PP
If the
.I \-r
option is specified,
.I realm
is used as the realm rather than the local realm.
.PP
If the
.I \-u
option is specified, a fully qualified kerberos
principal can be given.
.PP
The utility prompts for the current Kerberos password (printing
the name of the principal for which it intends to change the password),
which is verified by the Kerberos server. If the old password is
correct, the user is prompted twice for the new password. A message is
printed indicating the success or failure of the password changing
operation.
.SH BUGS
.I kpasswd
does not handle names, instances, or realms with special
characters in them when the -n, -i, or -r options are used. Any
valid fullname is accepted, however, if the -u option is used.
If the principal whose password you are trying to change does
not exist, you will not be told until after you have entered the
old password.
.SH SEE ALSO
kerberos(1), kinit(1), passwd(1), kadmin(8)
-160
View File
@@ -1,160 +0,0 @@
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)login.1 8.1 (Berkeley) 6/9/93
.\"
.Dd June 9, 1993
.Dt LOGIN 1
.Os BSD 4
.Sh NAME
.Nm login
.Nd log into the computer
.Sh SYNOPSIS
.Nm login
.Op Fl fp
.Op Fl h Ar hostname
.Op Ar user
.Sh DESCRIPTION
.Sy Note:
this manual page describes the original login program for
NetBSD. Everything in here might not be true.
.Pp
The
.Nm login
utility logs users (and pseudo-users) into the computer system.
.Pp
If no user is specified, or if a user is specified and authentication
of the user fails,
.Nm login
prompts for a user name.
Authentication of users is done via passwords.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl f
The
.Fl f
option is used when a user name is specified to indicate that proper
authentication has already been done and that no password need be
requested.
This option may only be used by the super-user or when an already
logged in user is logging in as themselves.
.It Fl h
The
.Fl h
option specifies the host from which the connection was received.
It is used by various daemons such as
.Xr telnetd 8 .
This option may only be used by the super-user.
.It Fl p
By default,
.Nm login
discards any previous environment.
The
.Fl p
option disables this behavior.
.El
.Pp
If the file
.Pa /etc/nologin
exists,
.Nm login
dislays its contents to the user and exits.
This is used by
.Xr shutdown 8
to prevent users from logging in when the system is about to go down.
.Pp
If the file
.Pa /etc/fbtab
exists,
.Nm login
changes the protection and ownership of certain devices specified in this
file.
.Pp
Immediately after logging a user in,
.Nm login
displays the system copyright notice, the date and time the user last
logged in, the message of the day as well as other information.
If the file
.Dq Pa .hushlogin
exists in the user's home directory, all of these messages are suppressed.
This is to simplify logins for non-human users, such as
.Xr uucp 1 .
.Nm Login
then records an entry in the
.Xr wtmp 5
and
.Xr utmp 5
files and executes the user's command interpretor.
.Pp
Login enters information into the environment (see
.Xr environ 7 )
specifying the user's home directory (HOME), command interpreter (SHELL),
search path (PATH), terminal type (TERM) and user name (both LOGNAME and
USER).
.Pp
The standard shells,
.Xr csh 1
and
.Xr sh 1 ,
do not fork before executing the
.Nm login
utility.
.Sh FILES
.Bl -tag -width /var/mail/userXXX -compact
.It Pa /etc/fbtab
changes device protections
.It Pa /etc/motd
message-of-the-day
.It Pa /etc/nologin
disallows logins
.It Pa /var/run/utmp
current logins
.It Pa /var/log/wtmp
login account records
.It Pa /var/mail/user
system mailboxes
.It Pa \&.hushlogin
makes login quieter
.El
.Sh SEE ALSO
.Xr chpass 1 ,
.Xr passwd 1 ,
.Xr rlogin 1 ,
.Xr getpass 3 ,
.Xr fbtab 5 ,
.Xr utmp 5 ,
.Xr environ 7
.Sh HISTORY
A
.Nm login
appeared in
.At v6 .
-50
View File
@@ -1,50 +0,0 @@
.\" this is comment
.Dd April 30, 1994
.Dt SKEY.ACCESS 5
.Os FreeBSD 1.2
.Sh NAME
.Nm login.access
.Nd Login access control table
.Sh DESCRIPTION
The
.Nm login.access
file specifies (user, host) combinations and/or (user, tty)
combinations for which a login will be either accepted or refused.
.Pp
When someone logs in, the
.Nm login.access
is scanned for the first entry that
matches the (user, host) combination, or, in case of non-networked
logins, the first entry that matches the (user, tty) combination. The
permissions field of that table entry determines whether the login will
be accepted or refused.
.Pp
Each line of the login access control table has three fields separated by a
":" character: permission : users : origins
The first field should be a "+" (access granted) or "-" (access denied)
character. The second field should be a list of one or more login names,
group names, or ALL (always matches). The third field should be a list
of one or more tty names (for non-networked logins), host names, domain
names (begin with "."), host addresses, internet network numbers (end
with "."), ALL (always matches) or LOCAL (matches any string that does
not contain a "." character). If you run NIS you can use @netgroupname
in host or user patterns.
The EXCEPT operator makes it possible to write very compact rules.
The group file is searched only when a name does not match that of the
logged-in user. Only groups are matched in which users are explicitly
listed: the program does not look at a user's primary group id value.
.Sh FILES
.Bl -tag -width /etc/login.access -compact
.It Pa /etc/login.access
The
.Nm login.access
file resides in
.Pa /etc .
.El
.Sh SEE ALSO
.Xr login 1
.Sh AUTHOR
Guido van Rooij
-22
View File
@@ -1,22 +0,0 @@
.\" $Id: pagsh.1,v 1.1 1996/04/27 23:03:35 d91-jda Exp $
.\"
.Dd April 27, 1996
.Dt PAGSH 1
.Os KTH-KRB
.Sh NAME
.Nm pagsh
.Nd
execute a command without authentication
.Sh SYNOPSIS
.Nm pagsh
.Op Oo Fl c Oc Nm command Ar args
.Sh DESCRIPTION
Starts a new subprocess that is detached from any Kerberos ticket
cache and AFS tokens. Without
.Nm command
a new shell is started.
.Sh ENVIRONMENT
.Bl -tag -width Fl
.It Ev $SHELL
Default shell.
.El
-161
View File
@@ -1,161 +0,0 @@
.\" $NetBSD: rcp.1,v 1.5 1995/03/21 08:19:04 cgd Exp $
.\"
.\" Copyright (c) 1983, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)rcp.1 8.1 (Berkeley) 5/31/93
.\"
.Dd May 31, 1993
.Dt RCP 1
.Os BSD 4.3r
.Sh NAME
.Nm rcp
.Nd remote file copy
.Sh SYNOPSIS
.Nm rcp
.Op Fl Kpx
.Op Fl k Ar realm
.Ar file1 file2
.Nm rcp
.Op Fl Kprx
.Op Fl k Ar realm
.Ar file ...
.Ar directory
.Sh DESCRIPTION
.Nm Rcp
copies files between machines. Each
.Ar file
or
.Ar directory
argument is either a remote file name of the
form ``rname@rhost:path'', or a local file name (containing no `:' characters,
or a `/' before any `:'s).
.Pp
.Bl -tag -width flag
.It Fl K
The
.Fl K
option turns off all Kerberos authentication.
.It Fl k
The
.Fl k
option requests
.Nm rcp
to obtain tickets
for the remote host in realm
.Ar realm
instead of the remote host's realm as determined by
.Xr krb_realmofhost 3 .
.It Fl p
The
.Fl p
option causes
.Nm rcp
to attempt to preserve (duplicate) in its copies the modification
times and modes of the source files, ignoring the
.Ar umask .
By default, the mode and owner of
.Ar file2
are preserved if it already existed; otherwise the mode of the source file
modified by the
.Xr umask 2
on the destination host is used.
.It Fl r
If any of the source files are directories,
.Nm rcp
copies each subtree rooted at that name; in this case
the destination must be a directory.
.It Fl x
The
.Fl x
option turns on
.Tn DES
encryption for all data passed by
.Nm rcp .
This may impact response time and
.Tn CPU
utilization, but provides
increased security.
.El
.Pp
If
.Ar path
is not a full path name, it is interpreted relative to
the login directory of the specified user
.Ar ruser
on
.Ar rhost ,
or your current user name if no other remote user name is specified.
A
.Ar path
on a remote host may be quoted (using \e, ", or \(aa)
so that the metacharacters are interpreted remotely.
.Pp
.Nm Rcp
does not prompt for passwords; it performs remote execution
via
.Xr rsh 1 ,
and requires the same authorization.
.Pp
.Nm Rcp
handles third party copies, where neither source nor target files
are on the current machine.
.Sh SEE ALSO
.Xr cp 1 ,
.Xr ftp 1 ,
.Xr rsh 1 ,
.Xr rlogin 1
.Sh HISTORY
The
.Nm rcp
command appeared in
.Bx 4.2 .
The version of
.Nm rcp
described here
has been reimplemented with Kerberos in
.Bx 4.3 Reno .
.Sh BUGS
Doesn't detect all cases where the target of a copy might
be a file in cases where only a directory should be legal.
.Pp
Is confused by any output generated by commands in a
.Pa \&.login ,
.Pa \&.profile ,
or
.Pa \&.cshrc
file on the remote host.
.Pp
The destination user and hostname may have to be specified as
``rhost.rname'' when the destination machine is running the
.Bx 4.2
version of
.Nm rcp .
-190
View File
@@ -1,190 +0,0 @@
.\" $NetBSD: rlogin.1,v 1.3 1995/03/21 07:58:37 cgd Exp $
.\"
.\" Copyright (c) 1983, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)rlogin.1 8.1 (Berkeley) 6/6/93
.\"
.Dd June 6, 1993
.Dt RLOGIN 1
.Os BSD 4.2
.Sh NAME
.Nm rlogin
.Nd remote login
.Sh SYNOPSIS
.Ar rlogin
.Op Fl 8EKLdx
.Op Fl e Ar char
.Op Fl k Ar realm
.Op Fl l Ar username
.Op Fl p Ar portnumber
.Ar host
.Sh DESCRIPTION
.Nm Rlogin
starts a terminal session on a remote host
.Ar host .
.Pp
.Nm Rlogin
first attempts to use the Kerberos authorization mechanism, described below.
If the remote host does not supporting Kerberos the standard Berkeley
.Pa rhosts
authorization mechanism is used.
The options are as follows:
.Bl -tag -width flag
.It Fl 8
The
.Fl 8
option allows an eight-bit input data path at all times; otherwise
parity bits are stripped except when the remote side's stop and start
characters are other than
^S/^Q .
.It Fl E
The
.Fl E
option stops any character from being recognized as an escape character.
When used with the
.Fl 8
option, this provides a completely transparent connection.
.It Fl K
The
.Fl K
option turns off all Kerberos authentication.
.It Fl L
The
.Fl L
option allows the rlogin session to be run in ``litout'' (see
.Xr tty 4 )
mode.
.It Fl d
The
.Fl d
option turns on socket debugging (see
.Xr setsockopt 2 )
on the TCP sockets used for communication with the remote host.
.It Fl e
The
.Fl e
option allows user specification of the escape character, which is
``~'' by default.
This specification may be as a literal character, or as an octal
value in the form \ennn.
.It Fl k
The
.FL k
option requests rlogin to obtain tickets for the remote host
in realm
.Ar realm
instead of the remote host's realm as determined by
.Xr krb_realmofhost 3 .
.It Fl x
The
.Fl x
option turns on
.Tn DES
encryption for all data passed via the
rlogin session.
This may impact response time and
.Tn CPU
utilization, but provides
increased security.
.It Fl D
Use the TCP nodelay option (see setsockopt(2)).
.It Fl p portnumber
Specifies the port number to connect to on the remote host.
.El
.Pp
A line of the form ``<escape char>.'' disconnects from the remote host.
Similarly, the line ``<escape char>^Z'' will suspend the
.Nm rlogin
session, and ``<escape char><delayed-suspend char>'' suspends the
send portion of the rlogin, but allows output from the remote system.
By default, the tilde (``~'') character is the escape character, and
normally control-Y (``^Y'') is the delayed-suspend character.
.Pp
All echoing takes place at the remote site, so that (except for delays)
the
.Nm rlogin
is transparent.
Flow control via ^S/^Q and flushing of input and output on interrupts
are handled properly.
.Sh KERBEROS AUTHENTICATION
Each user may have a private authorization list in the file
.Pa .klogin
in their home directory.
Each line in this file should contain a Kerberos principal name of the
form
.Ar principal.instance@realm .
If the originating user is authenticated to one of the principals named
in
.Pa .klogin ,
access is granted to the account.
The principal
.Ar accountname.@localrealm
is granted access if
there is no
.Pa .klogin
file.
Otherwise a login and password will be prompted for on the remote machine
as in
.Xr login 1 .
To avoid certain security problems, the
.Pa .klogin
file must be owned by
the remote user.
.Pp
If Kerberos authentication fails, a warning message is printed and the
standard Berkeley
.Nm rlogin
is used instead.
.Sh ENVIRONMENT
The following environment variable is utilized by
.Nm rlogin :
.Bl -tag -width TERM
.It Ev TERM
Determines the user's terminal type.
.El
.Sh SEE ALSO
.Xr rsh 1 ,
.Xr kerberos 3 ,
.Xr krb_sendauth 3 ,
.Xr krb_realmofhost 3
.Sh HISTORY
The
.Nm rlogin
command appeared in
.Bx 4.2 .
.Sh BUGS
.Nm Rlogin
will be replaced by
.Xr telnet 1
in the near future.
.Pp
More of the environment should be propagated.
-178
View File
@@ -1,178 +0,0 @@
.\" Copyright (c) 1983, 1989, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)rlogind.8 8.1 (Berkeley) 6/4/93
.\"
.Dd August 25, 1996
.Dt RLOGIND 8
.Os BSD 4.2
.Sh NAME
.Nm rlogind
.Nd remote login server
.Sh SYNOPSIS
.Nm rlogind
.Op Fl ailnkvxD
.Op Fl p Ar portnumber
.Op Fl L Ar /bin/login
.Sh DESCRIPTION
.Nm Rlogind
is the server for the
.Xr rlogin 1
program. The server provides a remote login facility with
kerberos-based authentication or traditional pseudo-authentication with
privileged port numbers from trusted hosts.
.Pp
Options supported by
.Nm rlogind :
.Bl -tag -width Ds
.It Fl a
No-op. For backwards compatibility. Hostnames are always verified.
.It Fl l
Prevent any authentication based on the user's
.Dq Pa .rhosts
file, unless the user is logging in as the superuser.
.It Fl n
Disable keep-alive messages.
.It Fl k
Enable kerberos authentication.
.It Fl i
Do not expect to be spawned by inetd and create a socket and listen on
it yourself.
.It Fl p portnumber
Specifies the port number it should listen on in case the
.It Fl i
flag has been given.
.It Fl v
Vacuous, echo "Remote host requires Kerberos authentication" and exit.
.It Fl x
Provides an encrypted communications channel. This options requires the
.Fl k
flag.
.It Fl L pathname
Specify pathname to an alternative login program.
.It Fl D
Use the TCP nodelay option (see setsockopt(2)).
.El
.Pp
When a service request is received,
.Nm rlogind
verifies the kerberos ticket supplied by the user.
.Pp
For non-kerberised connections, the following protocol is initiated:
.Bl -enum
.It
The server checks the client's source port.
If the port is not in the range 512-1023, the server
aborts the connection.
.It
The server checks the client's source address
and requests the corresponding host name (see
.Xr gethostbyaddr 3 ,
.Xr hosts 5
and
.Xr named 8 ) .
If the hostname cannot be determined,
the dot-notation representation of the host address is used.
The addresses for the hostname are requested,
verifying that the name and address correspond.
Normal authentication is bypassed if the address verification fails.
.El
.Pp
Once the source port and address have been checked,
.Nm rlogind
proceeds with the authentication process described in
.Xr rshd 8 .
.Pp
It then allocates a pseudo terminal (see
.Xr pty 4 ) ,
and manipulates file descriptors so that the slave
half of the pseudo terminal becomes the
.Em stdin ,
.Em stdout ,
and
.Em stderr
for a login process.
The login process is an instance of the
.Xr login 1
program, invoked with the
.Fl f
option if authentication has succeeded.
If automatic authentication fails, the user is
prompted to log in as if on a standard terminal line.
.Pp
The parent of the login process manipulates the master side of
the pseudo terminal, operating as an intermediary
between the login process and the client instance of the
.Xr rlogin
program. In normal operation, the packet protocol described
in
.Xr pty 4
is invoked to provide
.Ql ^S/^Q
type facilities and propagate
interrupt signals to the remote programs. The login process
propagates the client terminal's baud rate and terminal type,
as found in the environment variable,
.Ql Ev TERM ;
see
.Xr environ 7 .
The screen or window size of the terminal is requested from the client,
and window size changes from the client are propagated to the pseudo terminal.
.Pp
Transport-level keepalive messages are enabled unless the
.Fl n
option is present.
The use of keepalive messages allows sessions to be timed out
if the client crashes or becomes unreachable.
.Sh DIAGNOSTICS
All initial diagnostic messages are indicated
by a leading byte with a value of 1,
after which any network connections are closed.
If there are no errors before
.Xr login
is invoked, a null byte is returned as in indication of success.
.Bl -tag -width Ds
.It Sy Try again.
A
.Xr fork
by the server failed.
.El
.Sh SEE ALSO
.Xr login 1 ,
.Xr ruserok 3 ,
.Xr rshd 8
.Sh BUGS
A more extensible protocol should be used.
.Sh HISTORY
The
.Nm
command appeared in
.Bx 4.2 .
-182
View File
@@ -1,182 +0,0 @@
.\" Copyright (c) 1983, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" from: @(#)rsh.1 6.10 (Berkeley) 7/24/91
.\" $Id: rsh.1,v 1.1.1.1 1995/10/23 11:20:27 d91-jda Exp $
.\"
.Dd July 24, 1991
.Dt RSH 1
.Os BSD 4.2
.Sh NAME
.Nm rsh
.Nd remote shell
.Sh SYNOPSIS
.Nm rsh
.Op Fl Kdnx
.Op Fl k Ar realm
.Op Fl l Ar username
.Ar host
.Op command
.Sh DESCRIPTION
.Nm Rsh
executes
.Ar command
on
.Ar host .
.Pp
.Nm Rsh
copies its standard input to the remote command, the standard
output of the remote command to its standard output, and the
standard error of the remote command to its standard error.
Interrupt, quit and terminate signals are propagated to the remote
command;
.Nm rsh
normally terminates when the remote command does.
The options are as follows:
.Bl -tag -width flag
.It Fl K
The
.Fl K
option turns off all Kerberos authentication.
.It Fl d
The
.Fl d
option turns on socket debugging (using
.Xr setsockopt 2 )
on the
.Tn TCP
sockets used for communication with the remote host.
.It Fl k
The
.Fl k
option causes
.Nm rsh
to obtain tickets for the remote host in
.Ar realm
instead of the remote host's realm as determined by
.Xr krb_realmofhost 3 .
.It Fl l
By default, the remote username is the same as the local username.
The
.Fl l
option allows the remote name to be specified.
Kerberos authentication is used, and authorization is determined
as in
.Xr rlogin 1 .
.It Fl n
The
.Fl n
option redirects input from the special device
.Pa /dev/null
(see the
.Sx BUGS
section of this manual page).
.It Fl x
The
.Fl x
option turns on
.Tn DES
encryption for all data exchange.
This may introduce a significant delay in response time.
.El
.Pp
If no
.Ar command
is specified, you will be logged in on the remote host using
.Xr rlogin 1 .
.Pp
Shell metacharacters which are not quoted are interpreted on local machine,
while quoted metacharacters are interpreted on the remote machine.
For example, the command
.Pp
.Dl rsh otherhost cat remotefile >> localfile
.Pp
appends the remote file
.Ar remotefile
to the local file
.Ar localfile ,
while
.Pp
.Dl rsh otherhost cat remotefile \&">>\&" other_remotefile
.Pp
appends
.Ar remotefile
to
.Ar other_remotefile .
.\" .Pp
.\" Many sites specify a large number of host names as commands in the
.\" directory /usr/hosts.
.\" If this directory is included in your search path, you can use the
.\" shorthand ``host command'' for the longer form ``rsh host command''.
.Sh FILES
.Bl -tag -width /etc/hosts -compact
.It Pa /etc/hosts
.El
.Sh SEE ALSO
.Xr rlogin 1 ,
.Xr kerberos 3 ,
.Xr krb_sendauth 3 ,
.Xr krb_realmofhost 3
.Sh HISTORY
The
.Nm rsh
command appeared in
.Bx 4.2 .
.Sh BUGS
If you are using
.Xr csh 1
and put a
.Nm rsh
in the background without redirecting its input away from the terminal,
it will block even if no reads are posted by the remote command.
If no input is desired you should redirect the input of
.Nm rsh
to
.Pa /dev/null
using the
.Fl n
option.
.Pp
You cannot run an interactive command
(like
.Xr rogue 6
or
.Xr vi 1 )
using
.Nm rsh ;
use
.Xr rlogin 1
instead.
.Pp
Stop signals stop the local
.Nm rsh
process only; this is arguably wrong, but currently hard to fix for reasons
too complicated to explain here.
-221
View File
@@ -1,221 +0,0 @@
.\" Copyright (c) 1983, 1989, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)rshd.8 8.1 (Berkeley) 6/4/93
.\"
.Dd August 25, 1996
.Dt RSHD 8
.Os BSD 4.2
.Sh NAME
.Nm rshd
.Nd remote shell server
.Sh SYNOPSIS
.Nm rshd
.Op Fl ailnkvxLP
.Op Fl p Ar portnumber
.Sh DESCRIPTION
The
.Nm rshd
server
is the server for the
.Xr rcmd 3
routine and, consequently, for the
.Xr rsh 1
program. The server provides remote execution facilities with
kerberos-based authentication or traditional pseudo-authentication
with privileged port numbers from trusted hosts.
.Pp
The
.Nm rshd
server
listens for service requests at the port indicated in
the ``cmd'' service specification; see
.Xr services 5 .
When a service request is received
.Nm rshd
verifies the kerberos ticket supplied by the user.
.Pp
For non-kerberised connections, the following protocol is initiated:
.Bl -enum
.It
The server checks the client's source port.
If the port is not in the range 512-1023, the server
aborts the connection.
.It
The server reads characters from the socket up
to a null (`\e0') byte. The resultant string is
interpreted as an
.Tn ASCII
number, base 10.
.It
If the number received in step 2 is non-zero,
it is interpreted as the port number of a secondary
stream to be used for the
.Em stderr .
A second connection is then created to the specified
port on the client's machine. The source port of this
second connection is also in the range 512-1023.
.It
The server checks the client's source address
and requests the corresponding host name (see
.Xr gethostbyaddr 3 ,
.Xr hosts 5
and
.Xr named 8 ) .
If the hostname cannot be determined,
the dot-notation representation of the host address is used.
The addresses for the hostname are requested,
verifying that the name and address correspond.
If address verification fails, the connection is aborted
with the message, ``Host address mismatch.''
.It
A null terminated user name of at most 16 characters
is retrieved on the initial socket. This user name
is interpreted as the user identity on the
.Em client Ns 's
machine.
.It
A null terminated user name of at most 16 characters
is retrieved on the initial socket. This user name
is interpreted as a user identity to use on the
.Sy server Ns 's
machine.
.It
A null terminated command to be passed to a
shell is retrieved on the initial socket. The length of
the command is limited by the upper bound on the size of
the system's argument list.
.It
.Nm Rshd
then validates the user using
.Xr ruserok 3 ,
which uses the file
.Pa /etc/hosts.equiv
and the
.Pa .rhosts
file found in the user's home directory. The
.Fl l
option prevents
.Xr ruserok 3
from doing any validation based on the user's ``.rhosts'' file,
unless the user is the superuser.
.It
If the file
.Pa /etc/nologin
exists and the user is not the superuser,
the connection is closed.
.It
A null byte is returned on the initial socket
and the command line is passed to the normal login
shell of the user. The
shell inherits the network connections established
by
.Nm rshd .
.El
.Pp
Transport-level keepalive messages are enabled unless the
.Fl n
option is present.
The use of keepalive messages allows sessions to be timed out
if the client crashes or becomes unreachable.
.Pp
The
.Fl L
option causes all successful accesses to be logged to
.Xr syslogd 8
as
.Li auth.info
messages.
.Bl -tag -width Ds
.It Fl k
Enable kerberos authentication.
.It Fl i
Do not expect to be spawned by inetd and create a socket and listen on
it yourself.
.It Fl p portnumber
Specifies the port number it should listen on in case the
.It Fl i
flag has been given.
.It Fl v
Vacuous, echo "Remote host requires Kerberos authentication" and exit.
.It Fl x
Provides an encrypted communications channel. This option requires the
.Fl k
flag.
.It Fl P
AFS only! Doesn't put the remote proccess in a new PAG.
.El
.Sh DIAGNOSTICS
Except for the last one listed below,
all diagnostic messages
are returned on the initial socket,
after which any network connections are closed.
An error is indicated by a leading byte with a value of
1 (0 is returned in step 10 above upon successful completion
of all the steps prior to the execution of the login shell).
.Bl -tag -width indent
.It Sy Locuser too long.
The name of the user on the client's machine is
longer than 16 characters.
.It Sy Ruser too long.
The name of the user on the remote machine is
longer than 16 characters.
.It Sy Command too long .
The command line passed exceeds the size of the argument
list (as configured into the system).
.It Sy Login incorrect.
No password file entry for the user name existed.
.It Sy Remote directory.
The
.Xr chdir
command to the home directory failed.
.It Sy Permission denied.
The authentication procedure described above failed.
.It Sy Can't make pipe.
The pipe needed for the
.Em stderr ,
wasn't created.
.It Sy Can't fork; try again.
A
.Xr fork
by the server failed.
.It Sy <shellname>: ...
The user's login shell could not be started. This message is returned
on the connection associated with the
.Em stderr ,
and is not preceded by a flag byte.
.El
.Sh SEE ALSO
.Xr rsh 1 ,
.Xr rcmd 3 ,
.Xr ruserok 3
.Sh BUGS
A more extensible protocol (such as Telnet) should be used.
Loaded 100 of 158 files, more files were not shown because too many files have changed in this diff. Show more