summaryrefslogtreecommitdiffstats
path: root/crypto/kerberosIV/lib/kafs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/kerberosIV/lib/kafs')
-rw-r--r--crypto/kerberosIV/lib/kafs/ChangeLog175
-rw-r--r--crypto/kerberosIV/lib/kafs/Makefile.am70
-rw-r--r--crypto/kerberosIV/lib/kafs/Makefile.in121
-rw-r--r--crypto/kerberosIV/lib/kafs/README.dlfcn246
-rw-r--r--crypto/kerberosIV/lib/kafs/afskrb.c135
-rw-r--r--crypto/kerberosIV/lib/kafs/afskrb5.c179
-rw-r--r--crypto/kerberosIV/lib/kafs/afsl.exp6
-rw-r--r--crypto/kerberosIV/lib/kafs/afslib.c55
-rw-r--r--crypto/kerberosIV/lib/kafs/afslib.exp3
-rw-r--r--crypto/kerberosIV/lib/kafs/afssys.c398
-rw-r--r--crypto/kerberosIV/lib/kafs/afssysdefs.h91
-rw-r--r--crypto/kerberosIV/lib/kafs/common.c396
-rw-r--r--crypto/kerberosIV/lib/kafs/dlfcn.c581
-rw-r--r--crypto/kerberosIV/lib/kafs/dlfcn.h46
-rw-r--r--crypto/kerberosIV/lib/kafs/kafs.h192
-rw-r--r--crypto/kerberosIV/lib/kafs/kafs_locl.h135
16 files changed, 0 insertions, 2829 deletions
diff --git a/crypto/kerberosIV/lib/kafs/ChangeLog b/crypto/kerberosIV/lib/kafs/ChangeLog
deleted file mode 100644
index 43e93f6..0000000
--- a/crypto/kerberosIV/lib/kafs/ChangeLog
+++ /dev/null
@@ -1,175 +0,0 @@
-2000-03-20 Assar Westerlund <assar@sics.se>
-
- * afssysdefs.h: make versions later than 5.7 of solaris also use
- 73
-
-2000-03-13 Assar Westerlund <assar@sics.se>
-
- * afssysdefs.h: add 230 for MacOS X per information from
- <warner.c@apple.com>
-
-1999-11-22 Assar Westerlund <assar@sics.se>
-
- * afskrb5.c (afslog_uid_int): handle d->realm == NULL
-
-1999-11-17 Assar Westerlund <assar@sics.se>
-
- * afskrb5.c (afslog_uid_int): don't look at the local realm at
- all. just use the realm from the ticket file.
-
-1999-10-20 Assar Westerlund <assar@sics.se>
-
- * Makefile.am: set version to 1:1:1
-
- * afskrb5.c (get_cred): always request a DES key
-
-Mon Oct 18 17:40:21 1999 Bjoern Groenvall <bg@mummel.sics.se>
-
- * common.c (find_cells): Trim trailing whitespace from
- cellname. Lines starting with # are regarded as comments.
-
-Fri Oct 8 18:17:22 1999 Bjoern Groenvall <bg@mummel.sics.se>
-
- * afskrb.c, common.c : Change code to make a clear distinction
- between hinted realm and ticket realm.
-
- * kafs_locl.h: Added argument realm_hint.
-
- * common.c (_kafs_get_cred): Change code to acquire the ``best''
- possible ticket. Use cross-cell authentication only as method of
- last resort.
-
- * afskrb.c (afslog_uid_int): Add realm_hint argument and extract
- realm from ticket file.
-
- * afskrb5.c (afslog_uid_int): Added argument realm_hint.
-
-1999-10-03 Assar Westerlund <assar@sics.se>
-
- * afskrb5.c (get_cred): update to new krb524_convert_creds_kdc
-
-1999-08-12 Johan Danielsson <joda@pdc.kth.se>
-
- * Makefile.am: ignore the comlicated aix construct if !krb4
-
-1999-07-26 Assar Westerlund <assar@sics.se>
-
- * Makefile.am: set version to 1:0:1
-
-1999-07-22 Assar Westerlund <assar@sics.se>
-
- * afssysdefs.h: define AFS_SYSCALL to 73 for Solaris 2.7
-
-1999-07-07 Assar Westerlund <assar@sics.se>
-
- * afskrb5.c (krb5_realm_of_cell): new function
-
- * afskrb.c (krb_realm_of_cell): new function
- (afslog_uid_int): call krb_get_lrealm correctly
-
-1999-06-15 Assar Westerlund <assar@sics.se>
-
- * common.c (realm_of_cell): rename to _kafs_realm_of_cell and
- un-staticize
-
-Fri Mar 19 14:52:29 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: add version-info
-
-Thu Mar 18 11:24:02 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: include Makefile.am.common
-
-Sat Feb 27 19:46:21 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: remove EXTRA_DATA (as of autoconf 2.13/automake
- 1.4)
-
-Thu Feb 11 22:57:37 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: set AIX_SRC also if !AIX
-
-Tue Dec 1 14:45:15 1998 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: fix AIX linkage
-
-Sun Nov 22 10:40:44 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (WFLAGS): set
-
-Sat Nov 21 16:55:19 1998 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * afskrb5.c: add homedir support
-
-Sun Sep 6 20:16:27 1998 Assar Westerlund <assar@sics.se>
-
- * add new functionality for specifying the homedir to krb_afslog
- et al
-
-Thu Jul 16 01:27:19 1998 Assar Westerlund <assar@sics.se>
-
- * afssys.c: reorganize order of definitions.
- (try_one, try_two): conditionalize
-
-Thu Jul 9 18:31:52 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * common.c (realm_of_cell): make the dns fallback work
-
-Wed Jul 8 01:39:44 1998 Assar Westerlund <assar@sics.se>
-
- * afssys.c (map_syscall_name_to_number): new function for finding
- the number of a syscall given the name on solaris
- (k_hasafs): try using map_syscall_name_to_number
-
-Tue Jun 30 17:19:00 1998 Assar Westerlund <assar@sics.se>
-
- * afssys.c: rewrite and add support for environment variable
- AFS_SYSCALL
-
- * Makefile.in (distclean): don't remove roken_rename.h
-
-Fri May 29 19:03:20 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (roken_rename.h): remove dependency
-
-Mon May 25 05:25:54 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (clean): try to remove shared library debris
-
-Sun Apr 19 09:58:40 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in: add symlink magic for linux
-
-Sat Apr 4 15:08:48 1998 Assar Westerlund <assar@sics.se>
-
- * kafs.h: add arla paths
-
- * common.c (_kafs_afslog_all_local_cells): Try _PATH_ARLA_*
- (_realm_of_cell): Try _PATH_ARLA_CELLSERVDB
-
-Thu Feb 19 14:50:22 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * common.c: Don't store expired tokens (this broke when using
- pag-less rsh-sessions, and `non-standard' ticket files).
-
-Thu Feb 12 11:20:15 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * Makefile.in: Install/uninstall one library at a time.
-
-Thu Feb 12 05:38:58 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (install): one library at a time.
-
-Mon Feb 9 23:40:32 1998 Assar Westerlund <assar@sics.se>
-
- * common.c (find_cells): ignore empty lines
-
-Tue Jan 6 04:25:58 1998 Assar Westerlund <assar@sics.se>
-
- * afssysdefs.h (AFS_SYSCALL): add FreeBSD
-
-Fri Jan 2 17:08:24 1998 Assar Westerlund <assar@sics.se>
-
- * kafs.h: new VICEIOCTL's. From <rb@stacken.kth.se>
-
- * afssysdefs.h: Add OpenBSD
diff --git a/crypto/kerberosIV/lib/kafs/Makefile.am b/crypto/kerberosIV/lib/kafs/Makefile.am
deleted file mode 100644
index 2333221..0000000
--- a/crypto/kerberosIV/lib/kafs/Makefile.am
+++ /dev/null
@@ -1,70 +0,0 @@
-# $Id: Makefile.am,v 1.17 1999/10/19 23:54:05 assar Exp $
-
-include $(top_srcdir)/Makefile.am.common
-
-INCLUDES += $(INCLUDE_krb4) $(AFS_EXTRA_DEFS)
-
-if KRB4
-AFSLIBS = libkafs.la
-
-if AIX
-AFSL_EXP = $(srcdir)/afsl.exp
-
-if AIX4
-AFS_EXTRA_LD = -bnoentry
-else
-AFS_EXTRA_LD = -e _nostart
-endif
-
-if AIX_DYNAMIC_AFS
-if HAVE_DLOPEN
-AIX_SRC =
-else
-AIX_SRC = dlfcn.c
-endif
-AFS_EXTRA_LIBS = afslib.so
-AFS_EXTRA_DEFS =
-else
-AIX_SRC = afslib.c
-AFS_EXTRA_LIBS =
-AFS_EXTRA_DEFS = -DSTATIC_AFS
-endif
-
-else
-AFSL_EXP =
-AIX_SRC =
-endif # AIX
-
-else
-AFSLIBS =
-endif # KRB4
-
-
-lib_LTLIBRARIES = $(AFSLIBS)
-libkafs_la_LDFLAGS = -version-info 1:1:1
-foodir = $(libdir)
-foo_DATA = $(AFS_EXTRA_LIBS)
-# EXTRA_DATA = afslib.so
-
-CLEANFILES= $(AFS_EXTRA_LIBS)
-
-include_HEADERS = kafs.h
-
-if KRB5
-afskrb5_c = afskrb5.c
-endif
-
-libkafs_la_SOURCES = afssys.c afskrb.c $(afskrb5_c) common.c $(AIX_SRC) kafs_locl.h afssysdefs.h
-#afslib_so_SOURCES = afslib.c
-
-EXTRA_libkafs_la_SOURCES = afskrb5.c dlfcn.c afslib.c dlfcn.h
-
-EXTRA_DIST = README.dlfcn afsl.exp afslib.exp
-
-
-# AIX: this almost works with gcc, but somehow it fails to use the
-# correct ld, use ld instead
-afslib.so: afslib.o
- ld -o $@ -bM:SRE -bI:$(srcdir)/afsl.exp -bE:$(srcdir)/afslib.exp $(AFS_EXTRA_LD) afslib.o -lc
-
-$(OBJECTS): ../../include/config.h
diff --git a/crypto/kerberosIV/lib/kafs/Makefile.in b/crypto/kerberosIV/lib/kafs/Makefile.in
deleted file mode 100644
index 1a60bf7..0000000
--- a/crypto/kerberosIV/lib/kafs/Makefile.in
+++ /dev/null
@@ -1,121 +0,0 @@
-#
-# $Id: Makefile.in,v 1.50.2.2 2000/12/07 16:44:12 assar Exp $
-#
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-CC = @CC@
-LINK = @LINK@
-AR = ar
-RANLIB = @RANLIB@
-LN_S = @LN_S@
-DEFS = @DEFS@ -DROKEN_RENAME -DLIBDIR='"$(libdir)"' @AFS_EXTRA_DEFS@
-CFLAGS = @CFLAGS@ $(WFLAGS)
-WFLAGS = @WFLAGS@
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = @top_srcdir@/mkinstalldirs
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-libdir = @libdir@
-
-PICFLAGS = @PICFLAGS@
-
-LIB_DEPS = @lib_deps_yes@ -lc
-build_symlink_command = @build_symlink_command@
-install_symlink_command = @install_symlink_command@
-
-LIBNAME = $(LIBPREFIX)kafs
-LIBEXT = @LIBEXT@
-SHLIBEXT = @SHLIBEXT@
-LIBPREFIX = @LIBPREFIX@
-LDSHARED = @LDSHARED@
-AFS_EXTRA_OBJS = @AFS_EXTRA_OBJS@
-AFS_EXTRA_LIBS = @AFS_EXTRA_LIBS@
-LIB = $(LIBNAME).$(LIBEXT) $(AFS_EXTRA_LIBS)
-
-SOURCES = afssys.c afskrb.c common.c afslib.c
-
-EXTRA_SOURCE = issuid.c strlcpy.c strlcat.c
-
-EXTRA_OBJECT = issuid.o strlcpy.o strlcat.o
-
-OBJECTS = afssys.o afskrb.o common.o $(EXTRA_OBJECT) $(AFS_EXTRA_OBJS)
-
-all: $(LIB)
-
-Wall:
- make CFLAGS="-g -Wall -Wno-comment -Wmissing-prototypes -Wmissing-declarations -D__USE_FIXED_PROTOTYPES__"
-
-.c.o:
- $(CC) -c $(DEFS) -I../../include -I$(srcdir) -I. $(CFLAGS) $(CPPFLAGS) $(PICFLAGS) $<
-
-install: all
- $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
- @for i in $(LIB); do \
- echo "$(INSTALL) $$i $(DESTDIR)$(libdir)/$$i" ;\
- $(INSTALL) $$i $(DESTDIR)$(libdir)/$$i ; done
- @install_symlink_command@
-
-uninstall:
- @for i in $(LIB); do \
- echo "rm -f $(DESTDIR)$(libdir)/$$i" ;\
- rm -f $(DESTDIR)$(libdir)/$$i ; done
-
-TAGS: $(SOURCES)
- etags $(SOURCES)
-
-check:
-
-clean:
- rm -f $(LIB) *.o *.a *.so *.so.* so_locations $(EXTRA_SOURCE)
-
-mostlyclean: clean
-
-distclean: clean
- rm -f Makefile *.tab.c *~ roken_rename.h
-
-realclean: distclean
- rm -f TAGS
-
-$(LIBNAME)_pic.a: $(OBJECTS)
- rm -f $@
- $(AR) cr $@ $(OBJECTS)
- -$(RANLIB) $@
-
-$(LIBNAME).a: $(OBJECTS)
- rm -f $@
- $(AR) cr $@ $(OBJECTS)
- -$(RANLIB) $@
-
-$(LIBNAME).$(SHLIBEXT): $(OBJECTS) $(LIBNAME)_pic.a
- rm -f $@
- $(LDSHARED) -o $@ $(OBJECTS) $(LIB_DEPS)
- @build_symlink_command@
-
-# AIX: this almost works with gcc, but somehow it fails to use the
-# correct ld, use ld instead
-afslib.so: afslib.o
- ld -o $@ -bM:SRE -bI:$(srcdir)/afsl.exp -bE:$(srcdir)/afslib.exp @AFS_EXTRA_LD@ afslib.o -lc
-
-$(OBJECTS): ../../include/config.h roken_rename.h
-
-roken_rename.h:
- $(LN_S) $(srcdir)/../krb/roken_rename.h .
-
-.PHONY: all Wall install uninstall check clean mostlyclean distclean realclean
-
-issuid.c:
- $(LN_S) $(srcdir)/../roken/issuid.c .
-
-strlcat.c:
- $(LN_S) $(srcdir)/../roken/strlcat.c .
-
-strlcpy.c:
- $(LN_S) $(srcdir)/../roken/strlcpy.c .
-
diff --git a/crypto/kerberosIV/lib/kafs/README.dlfcn b/crypto/kerberosIV/lib/kafs/README.dlfcn
deleted file mode 100644
index cee1b75..0000000
--- a/crypto/kerberosIV/lib/kafs/README.dlfcn
+++ /dev/null
@@ -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: jum@helios.de
-
-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 <jwe@bevo.che.wisc.edu> 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 (kirk@rsinc.com) 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
-
diff --git a/crypto/kerberosIV/lib/kafs/afskrb.c b/crypto/kerberosIV/lib/kafs/afskrb.c
deleted file mode 100644
index ccfecb7..0000000
--- a/crypto/kerberosIV/lib/kafs/afskrb.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 1995 - 2000 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 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 "kafs_locl.h"
-
-RCSID("$Id: afskrb.c,v 1.13.2.1 2000/06/23 03:26:53 assar Exp $");
-
-struct krb_kafs_data {
- const char *realm;
-};
-
-static int
-get_cred(kafs_data *data, const char *name, const char *inst,
- const char *realm, CREDENTIALS *c)
-{
- KTEXT_ST tkt;
- int ret = krb_get_cred((char*)name, (char*)inst, (char*)realm, c);
-
- if (ret) {
- ret = krb_mk_req(&tkt, (char*)name, (char*)inst, (char*)realm, 0);
- if (ret == KSUCCESS)
- ret = krb_get_cred((char*)name, (char*)inst, (char*)realm, c);
- }
- return ret;
-}
-
-static int
-afslog_uid_int(kafs_data *data,
- const char *cell,
- const char *realm_hint,
- uid_t uid,
- const char *homedir)
-{
- int ret;
- CREDENTIALS c;
- char realm[REALM_SZ];
-
- if (cell == 0 || cell[0] == 0)
- return _kafs_afslog_all_local_cells (data, uid, homedir);
-
- /* Extract realm from ticket file. */
- ret = krb_get_tf_fullname(tkt_string(), NULL, NULL, realm);
- if (ret != KSUCCESS)
- return ret;
-
- ret = _kafs_get_cred(data, cell, realm_hint, realm, &c);
-
- if (ret == 0)
- ret = kafs_settoken(cell, uid, &c);
- return ret;
-}
-
-static char *
-get_realm(kafs_data *data, const char *host)
-{
- char *r = krb_realmofhost(host);
- if(r != NULL)
- return strdup(r);
- else
- return NULL;
-}
-
-int
-krb_afslog_uid_home(const char *cell, const char *realm_hint, uid_t uid,
- const char *homedir)
-{
- kafs_data kd;
-
- kd.afslog_uid = afslog_uid_int;
- kd.get_cred = get_cred;
- kd.get_realm = get_realm;
- kd.data = 0;
- return afslog_uid_int(&kd, cell, realm_hint, uid, homedir);
-}
-
-int
-krb_afslog_uid(const char *cell, const char *realm_hint, uid_t uid)
-{
- return krb_afslog_uid_home(cell, realm_hint, uid, NULL);
-}
-
-int
-krb_afslog(const char *cell, const char *realm_hint)
-{
- return krb_afslog_uid(cell, realm_hint, getuid());
-}
-
-int
-krb_afslog_home(const char *cell, const char *realm_hint, const char *homedir)
-{
- return krb_afslog_uid_home(cell, realm_hint, getuid(), homedir);
-}
-
-/*
- *
- */
-
-int
-krb_realm_of_cell(const char *cell, char **realm)
-{
- kafs_data kd;
-
- kd.get_realm = get_realm;
- return _kafs_realm_of_cell(&kd, cell, realm);
-}
diff --git a/crypto/kerberosIV/lib/kafs/afskrb5.c b/crypto/kerberosIV/lib/kafs/afskrb5.c
deleted file mode 100644
index 4c35ea7..0000000
--- a/crypto/kerberosIV/lib/kafs/afskrb5.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 1997, 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. 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 "kafs_locl.h"
-
-RCSID("$Id: afskrb5.c,v 1.13 1999/12/02 16:58:39 joda Exp $");
-
-struct krb5_kafs_data {
- krb5_context context;
- krb5_ccache id;
- krb5_const_realm realm;
-};
-
-static int
-get_cred(kafs_data *data, const char *name, const char *inst,
- const char *realm, CREDENTIALS *c)
-{
- krb5_error_code ret;
- krb5_creds in_creds, *out_creds;
- struct krb5_kafs_data *d = data->data;
-
- memset(&in_creds, 0, sizeof(in_creds));
- ret = krb5_425_conv_principal(d->context, name, inst, realm,
- &in_creds.server);
- if(ret)
- return ret;
- ret = krb5_cc_get_principal(d->context, d->id, &in_creds.client);
- if(ret){
- krb5_free_principal(d->context, in_creds.server);
- return ret;
- }
- in_creds.session.keytype = KEYTYPE_DES;
- ret = krb5_get_credentials(d->context, 0, d->id, &in_creds, &out_creds);
- krb5_free_principal(d->context, in_creds.server);
- krb5_free_principal(d->context, in_creds.client);
- if(ret)
- return ret;
- ret = krb524_convert_creds_kdc(d->context, d->id, out_creds, c);
- krb5_free_creds(d->context, out_creds);
- return ret;
-}
-
-static krb5_error_code
-afslog_uid_int(kafs_data *data, const char *cell, const char *rh, uid_t uid,
- const char *homedir)
-{
- krb5_error_code ret;
- CREDENTIALS c;
- krb5_principal princ;
- krb5_realm *trealm; /* ticket realm */
- struct krb5_kafs_data *d = data->data;
-
- if (cell == 0 || cell[0] == 0)
- return _kafs_afslog_all_local_cells (data, uid, homedir);
-
- ret = krb5_cc_get_principal (d->context, d->id, &princ);
- if (ret)
- return ret;
-
- trealm = krb5_princ_realm (d->context, princ);
-
- if (d->realm != NULL && strcmp (d->realm, *trealm) == 0) {
- trealm = NULL;
- krb5_free_principal (d->context, princ);
- }
-
- ret = _kafs_get_cred(data, cell, d->realm, *trealm, &c);
- if(trealm)
- krb5_free_principal (d->context, princ);
-
- if(ret == 0)
- ret = kafs_settoken(cell, uid, &c);
- return ret;
-}
-
-static char *
-get_realm(kafs_data *data, const char *host)
-{
- struct krb5_kafs_data *d = data->data;
- krb5_realm *realms;
- char *r;
- if(krb5_get_host_realm(d->context, host, &realms))
- return NULL;
- r = strdup(realms[0]);
- krb5_free_host_realm(d->context, realms);
- return r;
-}
-
-krb5_error_code
-krb5_afslog_uid_home(krb5_context context,
- krb5_ccache id,
- const char *cell,
- krb5_const_realm realm,
- uid_t uid,
- const char *homedir)
-{
- kafs_data kd;
- struct krb5_kafs_data d;
- kd.afslog_uid = afslog_uid_int;
- kd.get_cred = get_cred;
- kd.get_realm = get_realm;
- kd.data = &d;
- d.context = context;
- d.id = id;
- d.realm = realm;
- return afslog_uid_int(&kd, cell, 0, uid, homedir);
-}
-
-krb5_error_code
-krb5_afslog_uid(krb5_context context,
- krb5_ccache id,
- const char *cell,
- krb5_const_realm realm,
- uid_t uid)
-{
- return krb5_afslog_uid_home (context, id, cell, realm, uid, NULL);
-}
-
-krb5_error_code
-krb5_afslog(krb5_context context,
- krb5_ccache id,
- const char *cell,
- krb5_const_realm realm)
-{
- return krb5_afslog_uid (context, id, cell, realm, getuid());
-}
-
-krb5_error_code
-krb5_afslog_home(krb5_context context,
- krb5_ccache id,
- const char *cell,
- krb5_const_realm realm,
- const char *homedir)
-{
- return krb5_afslog_uid_home (context, id, cell, realm, getuid(), homedir);
-}
-
-/*
- *
- */
-
-krb5_error_code
-krb5_realm_of_cell(const char *cell, char **realm)
-{
- kafs_data kd;
-
- kd.get_realm = get_realm;
- return _kafs_realm_of_cell(&kd, cell, realm);
-}
diff --git a/crypto/kerberosIV/lib/kafs/afsl.exp b/crypto/kerberosIV/lib/kafs/afsl.exp
deleted file mode 100644
index 4d2b00e..0000000
--- a/crypto/kerberosIV/lib/kafs/afsl.exp
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/unix
-
-* This mumbo jumbo creates entry points to syscalls in _AIX
-
-lpioctl syscall
-lsetpag syscall
diff --git a/crypto/kerberosIV/lib/kafs/afslib.c b/crypto/kerberosIV/lib/kafs/afslib.c
deleted file mode 100644
index ae3b5a5..0000000
--- a/crypto/kerberosIV/lib/kafs/afslib.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 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. 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 file is only used with AIX
- */
-
-#include "kafs_locl.h"
-
-RCSID("$Id: afslib.c,v 1.6 1999/12/02 16:58:40 joda Exp $");
-
-int
-aix_pioctl(char *a_path,
- int o_opcode,
- struct ViceIoctl *a_paramsP,
- int a_followSymlinks)
-{
- return lpioctl(a_path, o_opcode, a_paramsP, a_followSymlinks);
-}
-
-int
-aix_setpag(void)
-{
- return lsetpag();
-}
diff --git a/crypto/kerberosIV/lib/kafs/afslib.exp b/crypto/kerberosIV/lib/kafs/afslib.exp
deleted file mode 100644
index f288717..0000000
--- a/crypto/kerberosIV/lib/kafs/afslib.exp
+++ /dev/null
@@ -1,3 +0,0 @@
-#!
-aix_pioctl
-aix_setpag
diff --git a/crypto/kerberosIV/lib/kafs/afssys.c b/crypto/kerberosIV/lib/kafs/afssys.c
deleted file mode 100644
index a45f445..0000000
--- a/crypto/kerberosIV/lib/kafs/afssys.c
+++ /dev/null
@@ -1,398 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 1997, 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. 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 "kafs_locl.h"
-
-RCSID("$Id: afssys.c,v 1.65.2.1 2000/06/23 03:27:23 assar Exp $");
-
-int _kafs_debug; /* this should be done in a better way */
-
-#define NO_ENTRY_POINT 0
-#define SINGLE_ENTRY_POINT 1
-#define MULTIPLE_ENTRY_POINT 2
-#define SINGLE_ENTRY_POINT2 3
-#define SINGLE_ENTRY_POINT3 4
-#define AIX_ENTRY_POINTS 5
-#define UNKNOWN_ENTRY_POINT 6
-static int afs_entry_point = UNKNOWN_ENTRY_POINT;
-static int afs_syscalls[2];
-
-/* Magic to get AIX syscalls to work */
-#ifdef _AIX
-
-static int (*Pioctl)(char*, int, struct ViceIoctl*, int);
-static int (*Setpag)(void);
-
-#include "dlfcn.h"
-
-/*
- *
- */
-
-static int
-try_aix(void)
-{
-#ifdef STATIC_AFS_SYSCALLS
- Pioctl = aix_pioctl;
- Setpag = aix_setpag;
-#else
- void *ptr;
- char path[MaxPathLen], *p;
- /*
- * If we are root or running setuid don't trust AFSLIBPATH!
- */
- if (getuid() != 0 && !issuid() && (p = getenv("AFSLIBPATH")) != NULL)
- strlcpy(path, p, sizeof(path));
- else
- snprintf(path, sizeof(path), "%s/afslib.so", LIBDIR);
-
- ptr = dlopen(path, RTLD_NOW);
- if(ptr == NULL) {
- if(_kafs_debug) {
- if(errno == ENOEXEC && (p = dlerror()) != NULL)
- fprintf(stderr, "dlopen(%s): %s\n", path, p);
- else if (errno != ENOENT)
- fprintf(stderr, "dlopen(%s): %s\n", path, strerror(errno));
- }
- return 1;
- }
- Setpag = (int (*)(void))dlsym(ptr, "aix_setpag");
- Pioctl = (int (*)(char*, int,
- struct ViceIoctl*, int))dlsym(ptr, "aix_pioctl");
-#endif
- afs_entry_point = AIX_ENTRY_POINTS;
- return 0;
-}
-#endif /* _AIX */
-
-/*
- * This probably only works under Solaris and could get confused if
- * there's a /etc/name_to_sysnum file.
- */
-
-#define _PATH_ETC_NAME_TO_SYSNUM "/etc/name_to_sysnum"
-
-static int
-map_syscall_name_to_number (const char *str, int *res)
-{
- FILE *f;
- char buf[256];
- size_t str_len = strlen (str);
-
- f = fopen (_PATH_ETC_NAME_TO_SYSNUM, "r");
- if (f == NULL)
- return -1;
- while (fgets (buf, sizeof(buf), f) != NULL) {
- if (buf[0] == '#')
- continue;
-
- if (strncmp (str, buf, str_len) == 0) {
- char *begptr = buf + str_len;
- char *endptr;
- long val = strtol (begptr, &endptr, 0);
-
- if (val != 0 && endptr != begptr) {
- fclose (f);
- *res = val;
- return 0;
- }
- }
- }
- fclose (f);
- return -1;
-}
-
-int
-k_pioctl(char *a_path,
- int o_opcode,
- struct ViceIoctl *a_paramsP,
- int a_followSymlinks)
-{
-#ifndef NO_AFS
- switch(afs_entry_point){
-#if defined(AFS_SYSCALL) || defined(AFS_SYSCALL2) || defined(AFS_SYSCALL3)
- case SINGLE_ENTRY_POINT:
- case SINGLE_ENTRY_POINT2:
- case SINGLE_ENTRY_POINT3:
- return syscall(afs_syscalls[0], AFSCALL_PIOCTL,
- a_path, o_opcode, a_paramsP, a_followSymlinks);
-#endif
-#if defined(AFS_PIOCTL)
- case MULTIPLE_ENTRY_POINT:
- return syscall(afs_syscalls[0],
- a_path, o_opcode, a_paramsP, a_followSymlinks);
-#endif
-#ifdef _AIX
- case AIX_ENTRY_POINTS:
- return Pioctl(a_path, o_opcode, a_paramsP, a_followSymlinks);
-#endif
- }
-
- errno = ENOSYS;
-#ifdef SIGSYS
- kill(getpid(), SIGSYS); /* You loose! */
-#endif
-#endif /* NO_AFS */
- return -1;
-}
-
-int
-k_afs_cell_of_file(const char *path, char *cell, int len)
-{
- struct ViceIoctl parms;
- parms.in = NULL;
- parms.in_size = 0;
- parms.out = cell;
- parms.out_size = len;
- return k_pioctl((char*)path, VIOC_FILE_CELL_NAME, &parms, 1);
-}
-
-int
-k_unlog(void)
-{
- struct ViceIoctl parms;
- memset(&parms, 0, sizeof(parms));
- return k_pioctl(0, VIOCUNLOG, &parms, 0);
-}
-
-int
-k_setpag(void)
-{
-#ifndef NO_AFS
- switch(afs_entry_point){
-#if defined(AFS_SYSCALL) || defined(AFS_SYSCALL2) || defined(AFS_SYSCALL3)
- case SINGLE_ENTRY_POINT:
- case SINGLE_ENTRY_POINT2:
- case SINGLE_ENTRY_POINT3:
- return syscall(afs_syscalls[0], AFSCALL_SETPAG);
-#endif
-#if defined(AFS_PIOCTL)
- case MULTIPLE_ENTRY_POINT:
- return syscall(afs_syscalls[1]);
-#endif
-#ifdef _AIX
- case AIX_ENTRY_POINTS:
- return Setpag();
-#endif
- }
-
- errno = ENOSYS;
-#ifdef SIGSYS
- kill(getpid(), SIGSYS); /* You loose! */
-#endif
-#endif /* NO_AFS */
- return -1;
-}
-
-static jmp_buf catch_SIGSYS;
-
-#ifdef SIGSYS
-
-static RETSIGTYPE
-SIGSYS_handler(int sig)
-{
- errno = 0;
- signal(SIGSYS, SIGSYS_handler); /* Need to reinstall handler on SYSV */
- longjmp(catch_SIGSYS, 1);
-}
-
-#endif
-
-/*
- * Try to see if `syscall' is a pioctl. Return 0 iff succesful.
- */
-
-#if defined(AFS_SYSCALL) || defined(AFS_SYSCALL2) || defined(AFS_SYSCALL3)
-static int
-try_one (int syscall_num)
-{
- struct ViceIoctl parms;
- memset(&parms, 0, sizeof(parms));
-
- if (setjmp(catch_SIGSYS) == 0) {
- syscall(syscall_num, AFSCALL_PIOCTL,
- 0, VIOCSETTOK, &parms, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- if (errno == EINVAL) {
- afs_entry_point = SINGLE_ENTRY_POINT;
- afs_syscalls[0] = syscall_num;
- return 0;
- }
- }
- return 1;
-}
-#endif
-
-/*
- * Try to see if `syscall_pioctl' is a pioctl syscall. Return 0 iff
- * succesful.
- *
- */
-
-#ifdef AFS_PIOCTL
-static int
-try_two (int syscall_pioctl, int syscall_setpag)
-{
- struct ViceIoctl parms;
- memset(&parms, 0, sizeof(parms));
-
- if (setjmp(catch_SIGSYS) == 0) {
- syscall(syscall_pioctl,
- 0, VIOCSETTOK, &parms, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- if (errno == EINVAL) {
- afs_entry_point = MULTIPLE_ENTRY_POINT;
- afs_syscalls[0] = syscall_pioctl;
- afs_syscalls[1] = syscall_setpag;
- return 0;
- }
- }
- return 1;
-}
-#endif
-
-int
-k_hasafs(void)
-{
-#if !defined(NO_AFS) && defined(SIGSYS)
- RETSIGTYPE (*saved_func)();
-#endif
- int saved_errno;
- char *env = getenv ("AFS_SYSCALL");
-
- /*
- * Already checked presence of AFS syscalls?
- */
- if (afs_entry_point != UNKNOWN_ENTRY_POINT)
- return afs_entry_point != NO_ENTRY_POINT;
-
- /*
- * Probe kernel for AFS specific syscalls,
- * they (currently) come in two flavors.
- * If the syscall is absent we recive a SIGSYS.
- */
- afs_entry_point = NO_ENTRY_POINT;
-
- saved_errno = errno;
-#ifndef NO_AFS
-#ifdef SIGSYS
- saved_func = signal(SIGSYS, SIGSYS_handler);
-#endif
-
-#if defined(AFS_SYSCALL) || defined(AFS_SYSCALL2) || defined(AFS_SYSCALL3)
- {
- int tmp;
-
- if (env != NULL) {
- if (sscanf (env, "%d", &tmp) == 1) {
- if (try_one (tmp) == 0)
- goto done;
- } else {
- char *end = NULL;
- char *p;
- char *s = strdup (env);
-
- if (s != NULL) {
- for (p = strtok_r (s, ",", &end);
- p != NULL;
- p = strtok_r (NULL, ",", &end)) {
- if (map_syscall_name_to_number (p, &tmp) == 0)
- if (try_one (tmp) == 0) {
- free (s);
- goto done;
- }
- }
- free (s);
- }
- }
- }
- }
-#endif /* AFS_SYSCALL || AFS_SYSCALL2 || AFS_SYSCALL3 */
-
-#ifdef AFS_SYSCALL
- if (try_one (AFS_SYSCALL) == 0)
- goto done;
-#endif /* AFS_SYSCALL */
-
-#ifdef AFS_PIOCTL
- {
- int tmp[2];
-
- if (env != NULL && sscanf (env, "%d%d", &tmp[0], &tmp[1]) == 2)
- if (try_two (tmp[0], tmp[1]) == 2)
- goto done;
- }
-#endif /* AFS_PIOCTL */
-
-#ifdef AFS_PIOCTL
- if (try_two (AFS_PIOCTL, AFS_SETPAG) == 0)
- goto done;
-#endif /* AFS_PIOCTL */
-
-#ifdef AFS_SYSCALL2
- if (try_one (AFS_SYSCALL2) == 0)
- goto done;
-#endif /* AFS_SYSCALL2 */
-
-#ifdef AFS_SYSCALL3
- if (try_one (AFS_SYSCALL3) == 0)
- goto done;
-#endif /* AFS_SYSCALL3 */
-
-#ifdef _AIX
-#if 0
- if (env != NULL) {
- char *pos = NULL;
- char *pioctl_name;
- char *setpag_name;
-
- pioctl_name = strtok_r (env, ", \t", &pos);
- if (pioctl_name != NULL) {
- setpag_name = strtok_r (NULL, ", \t", &pos);
- if (setpag_name != NULL)
- if (try_aix (pioctl_name, setpag_name) == 0)
- goto done;
- }
- }
-#endif
-
- if(try_aix() == 0)
- goto done;
-#endif
-
-done:
-#ifdef SIGSYS
- signal(SIGSYS, saved_func);
-#endif
-#endif /* NO_AFS */
- errno = saved_errno;
- return afs_entry_point != NO_ENTRY_POINT;
-}
diff --git a/crypto/kerberosIV/lib/kafs/afssysdefs.h b/crypto/kerberosIV/lib/kafs/afssysdefs.h
deleted file mode 100644
index 685e375..0000000
--- a/crypto/kerberosIV/lib/kafs/afssysdefs.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1995 - 2000 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 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: afssysdefs.h,v 1.21.2.2 2000/03/26 20:10:11 assar Exp $ */
-
-/*
- * This section is for machines using single entry point AFS syscalls!
- * and/or
- * This section is for machines using multiple entry point AFS syscalls!
- *
- * SunOS 4 is an example of single entry point and sgi of multiple
- * entry point syscalls.
- */
-
-#if SunOS == 40
-#define AFS_SYSCALL 31
-#endif
-
-#if SunOS >= 50 && SunOS < 57
-#define AFS_SYSCALL 105
-#endif
-
-#if SunOS >= 57
-#define AFS_SYSCALL 73
-#endif
-
-#if defined(__hpux)
-#define AFS_SYSCALL 50
-#define AFS_SYSCALL2 49
-#define AFS_SYSCALL3 48
-#endif
-
-#if defined(_AIX)
-/* _AIX is too weird */
-#endif
-
-#if defined(__sgi)
-#define AFS_PIOCTL (64+1000)
-#define AFS_SETPAG (65+1000)
-#endif
-
-#if defined(__osf__)
-#define AFS_SYSCALL 232
-#define AFS_SYSCALL2 258
-#endif
-
-#if defined(__ultrix)
-#define AFS_SYSCALL 31
-#endif
-
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
-#define AFS_SYSCALL 210
-#endif
-
-#ifdef __APPLE__ /* MacOS X */
-#define AFS_SYSCALL 230
-#endif
-
-#ifdef SYS_afs_syscall
-#define AFS_SYSCALL3 SYS_afs_syscall
-#endif
diff --git a/crypto/kerberosIV/lib/kafs/common.c b/crypto/kerberosIV/lib/kafs/common.c
deleted file mode 100644
index 207b9b6..0000000
--- a/crypto/kerberosIV/lib/kafs/common.c
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * Copyright (c) 1997, 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. 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 "kafs_locl.h"
-
-RCSID("$Id: common.c,v 1.19 1999/12/02 16:58:40 joda Exp $");
-
-#define AUTH_SUPERUSER "afs"
-
-/*
- * Here only ASCII characters are relevant.
- */
-
-#define IsAsciiLower(c) ('a' <= (c) && (c) <= 'z')
-
-#define ToAsciiUpper(c) ((c) - 'a' + 'A')
-
-static void
-foldup(char *a, const char *b)
-{
- for (; *b; a++, b++)
- if (IsAsciiLower(*b))
- *a = ToAsciiUpper(*b);
- else
- *a = *b;
- *a = '\0';
-}
-
-int
-kafs_settoken(const char *cell, uid_t uid, CREDENTIALS *c)
-{
- struct ViceIoctl parms;
- struct ClearToken ct;
- int32_t sizeof_x;
- char buf[2048], *t;
- int ret;
-
- /*
- * Build a struct ClearToken
- */
- ct.AuthHandle = c->kvno;
- memcpy (ct.HandShakeKey, c->session, sizeof(c->session));
- ct.ViceId = uid;
- ct.BeginTimestamp = c->issue_date;
- ct.EndTimestamp = krb_life_to_time(c->issue_date, c->lifetime);
- if(ct.EndTimestamp < time(NULL))
- return 0; /* don't store tokens that has expired (and possibly
- overwriting valid tokens)*/
-
-#define ODD(x) ((x) & 1)
- /* According to Transarc conventions ViceId is valid iff
- * (EndTimestamp - BeginTimestamp) is odd. By decrementing EndTime
- * the transformations:
- *
- * (issue_date, life) -> (StartTime, EndTime) -> (issue_date, life)
- * preserves the original values.
- */
- if (uid != 0) /* valid ViceId */
- {
- if (!ODD(ct.EndTimestamp - ct.BeginTimestamp))
- ct.EndTimestamp--;
- }
- else /* not valid ViceId */
- {
- if (ODD(ct.EndTimestamp - ct.BeginTimestamp))
- ct.EndTimestamp--;
- }
-
- t = buf;
- /*
- * length of secret token followed by secret token
- */
- sizeof_x = c->ticket_st.length;
- memcpy(t, &sizeof_x, sizeof(sizeof_x));
- t += sizeof(sizeof_x);
- memcpy(t, c->ticket_st.dat, sizeof_x);
- t += sizeof_x;
- /*
- * length of clear token followed by clear token
- */
- sizeof_x = sizeof(ct);
- memcpy(t, &sizeof_x, sizeof(sizeof_x));
- t += sizeof(sizeof_x);
- memcpy(t, &ct, sizeof_x);
- t += sizeof_x;
-
- /*
- * do *not* mark as primary cell
- */
- sizeof_x = 0;
- memcpy(t, &sizeof_x, sizeof(sizeof_x));
- t += sizeof(sizeof_x);
- /*
- * follow with cell name
- */
- sizeof_x = strlen(cell) + 1;
- memcpy(t, cell, sizeof_x);
- t += sizeof_x;
-
- /*
- * Build argument block
- */
- parms.in = buf;
- parms.in_size = t - buf;
- parms.out = 0;
- parms.out_size = 0;
- ret = k_pioctl(0, VIOCSETTOK, &parms, 0);
- return ret;
-}
-
-/* Try to get a db-server for an AFS cell from a AFSDB record */
-
-static int
-dns_find_cell(const char *cell, char *dbserver, size_t len)
-{
- struct dns_reply *r;
- int ok = -1;
- r = dns_lookup(cell, "afsdb");
- if(r){
- struct resource_record *rr = r->head;
- while(rr){
- if(rr->type == T_AFSDB && rr->u.afsdb->preference == 1){
- strlcpy(dbserver,
- rr->u.afsdb->domain,
- len);
- ok = 0;
- break;
- }
- rr = rr->next;
- }
- dns_free_data(r);
- }
- return ok;
-}
-
-
-/*
- * Try to find the cells we should try to klog to in "file".
- */
-static void
-find_cells(char *file, char ***cells, int *index)
-{
- FILE *f;
- char cell[64];
- int i;
- int ind = *index;
-
- f = fopen(file, "r");
- if (f == NULL)
- return;
- while (fgets(cell, sizeof(cell), f)) {
- char *t;
- t = cell + strlen(cell);
- for (; t >= cell; t--)
- if (*t == '\n' || *t == '\t' || *t == ' ')
- *t = 0;
- if (cell[0] == '\0' || cell[0] == '#')
- continue;
- for(i = 0; i < ind; i++)
- if(strcmp((*cells)[i], cell) == 0)
- break;
- if(i == ind){
- char **tmp;
-
- tmp = realloc(*cells, (ind + 1) * sizeof(**cells));
- if (tmp == NULL)
- break;
- *cells = tmp;
- (*cells)[ind] = strdup(cell);
- if ((*cells)[ind] == NULL)
- break;
- ++ind;
- }
- }
- fclose(f);
- *index = ind;
-}
-
-/*
- * Get tokens for all cells[]
- */
-static int
-afslog_cells(kafs_data *data, char **cells, int max, uid_t uid,
- const char *homedir)
-{
- int ret = 0;
- int i;
- for (i = 0; i < max; i++) {
- int er = (*data->afslog_uid)(data, cells[i], 0, uid, homedir);
- if (er)
- ret = er;
- }
- return ret;
-}
-
-int
-_kafs_afslog_all_local_cells(kafs_data *data, uid_t uid, const char *homedir)
-{
- int ret;
- char **cells = NULL;
- int index = 0;
-
- if (homedir == NULL)
- homedir = getenv("HOME");
- if (homedir != NULL) {
- char home[MaxPathLen];
- snprintf(home, sizeof(home), "%s/.TheseCells", homedir);
- find_cells(home, &cells, &index);
- }
- find_cells(_PATH_THESECELLS, &cells, &index);
- find_cells(_PATH_THISCELL, &cells, &index);
- find_cells(_PATH_ARLA_THESECELLS, &cells, &index);
- find_cells(_PATH_ARLA_THISCELL, &cells, &index);
-
- ret = afslog_cells(data, cells, index, uid, homedir);
- while(index > 0)
- free(cells[--index]);
- free(cells);
- return ret;
-}
-
-
-/* Find the realm associated with cell. Do this by opening
- /usr/vice/etc/CellServDB and getting the realm-of-host for the
- first VL-server for the cell.
-
- This does not work when the VL-server is living in one realm, but
- the cell it is serving is living in another realm.
-
- Return 0 on success, -1 otherwise.
- */
-
-int
-_kafs_realm_of_cell(kafs_data *data, const char *cell, char **realm)
-{
- FILE *F;
- char buf[1024];
- char *p;
- int ret = -1;
-
- if ((F = fopen(_PATH_CELLSERVDB, "r"))
- || (F = fopen(_PATH_ARLA_CELLSERVDB, "r"))) {
- while (fgets(buf, sizeof(buf), F)) {
- if (buf[0] != '>')
- continue; /* Not a cell name line, try next line */
- if (strncmp(buf + 1, cell, strlen(cell)) == 0) {
- /*
- * We found the cell name we're looking for.
- * Read next line on the form ip-address '#' hostname
- */
- if (fgets(buf, sizeof(buf), F) == NULL)
- break; /* Read failed, give up */
- p = strchr(buf, '#');
- if (p == NULL)
- break; /* No '#', give up */
- p++;
- if (buf[strlen(buf) - 1] == '\n')
- buf[strlen(buf) - 1] = '\0';
- *realm = (*data->get_realm)(data, p);
- if (*realm && **realm != '\0')
- ret = 0;
- break; /* Won't try any more */
- }
- }
- fclose(F);
- }
- if (*realm == NULL && dns_find_cell(cell, buf, sizeof(buf)) == 0) {
- *realm = strdup(krb_realmofhost(buf));
- if(*realm != NULL)
- ret = 0;
- }
- return ret;
-}
-
-int
-_kafs_get_cred(kafs_data *data,
- const char *cell,
- const char *realm_hint,
- const char *realm,
- CREDENTIALS *c)
-{
- int ret = -1;
- char *vl_realm;
- char CELL[64];
-
- /* We're about to find the the realm that holds the key for afs in
- * the specified cell. The problem is that null-instance
- * afs-principals are common and that hitting the wrong realm might
- * yield the wrong afs key. The following assumptions were made.
- *
- * Any realm passed to us is preferred.
- *
- * If there is a realm with the same name as the cell, it is most
- * likely the correct realm to talk to.
- *
- * In most (maybe even all) cases the database servers of the cell
- * will live in the realm we are looking for.
- *
- * Try the local realm, but if the previous cases fail, this is
- * really a long shot.
- *
- */
-
- /* comments on the ordering of these tests */
-
- /* If the user passes a realm, she probably knows something we don't
- * know and we should try afs@realm_hint (otherwise we're talking with a
- * blondino and she might as well have it.)
- */
-
- if (realm_hint) {
- ret = (*data->get_cred)(data, AUTH_SUPERUSER, cell, realm_hint, c);
- if (ret == 0) return 0;
- ret = (*data->get_cred)(data, AUTH_SUPERUSER, "", realm_hint, c);
- if (ret == 0) return 0;
- }
-
- foldup(CELL, cell);
-
- /*
- * If cell == realm we don't need no cross-cell authentication.
- * Try afs@REALM.
- */
- if (strcmp(CELL, realm) == 0) {
- ret = (*data->get_cred)(data, AUTH_SUPERUSER, "", realm, c);
- if (ret == 0) return 0;
- /* Try afs.cell@REALM below. */
- }
-
- /*
- * If the AFS servers have a file /usr/afs/etc/krb.conf containing
- * REALM we still don't have to resort to cross-cell authentication.
- * Try afs.cell@REALM.
- */
- ret = (*data->get_cred)(data, AUTH_SUPERUSER, cell, realm, c);
- if (ret == 0) return 0;
-
- /*
- * We failed to get ``first class tickets'' for afs,
- * fall back to cross-cell authentication.
- * Try afs@CELL.
- * Try afs.cell@CELL.
- */
- ret = (*data->get_cred)(data, AUTH_SUPERUSER, "", CELL, c);
- if (ret == 0) return 0;
- ret = (*data->get_cred)(data, AUTH_SUPERUSER, cell, CELL, c);
- if (ret == 0) return 0;
-
- /*
- * Perhaps the cell doesn't correspond to any realm?
- * Use realm of first volume location DB server.
- * Try afs.cell@VL_REALM.
- * Try afs@VL_REALM???
- */
- if (_kafs_realm_of_cell(data, cell, &vl_realm) == 0
- && strcmp(vl_realm, realm) != 0
- && strcmp(vl_realm, CELL) != 0) {
- ret = (*data->get_cred)(data, AUTH_SUPERUSER, cell, vl_realm, c);
- if (ret)
- ret = (*data->get_cred)(data, AUTH_SUPERUSER, "", vl_realm, c);
- free(vl_realm);
- if (ret == 0) return 0;
- }
-
- return ret;
-}
diff --git a/crypto/kerberosIV/lib/kafs/dlfcn.c b/crypto/kerberosIV/lib/kafs/dlfcn.c
deleted file mode 100644
index 728cf5c..0000000
--- a/crypto/kerberosIV/lib/kafs/dlfcn.c
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- * @(#)dlfcn.c 1.11 revision of 96/04/10 20:12:51
- * This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
- * 30159 Hannover, Germany
- */
-
-/*
- * Changes marked with `--jwe' were made on April 7 1996 by John W. Eaton
- * <jwe@bevo.che.wisc.edu> to support g++ and/or use with Octave.
- */
-
-/*
- * This makes my life easier with Octave. --jwe
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/ldr.h>
-#include <a.out.h>
-#include <ldfcn.h>
-#include "dlfcn.h"
-
-/*
- * We simulate dlopen() et al. through a call to load. Because AIX has
- * no call to find an exported symbol we read the loader section of the
- * loaded module and build a list of exported symbols and their virtual
- * address.
- */
-
-typedef struct {
- char *name; /* the symbols's name */
- void *addr; /* its relocated virtual address */
-} Export, *ExportPtr;
-
-/*
- * xlC uses the following structure to list its constructors and
- * destructors. This is gleaned from the output of munch.
- */
-typedef struct {
- void (*init)(void); /* call static constructors */
- void (*term)(void); /* call static destructors */
-} Cdtor, *CdtorPtr;
-
-typedef void (*GccCDtorPtr)(void);
-
-/*
- * The void * handle returned from dlopen is actually a ModulePtr.
- */
-typedef struct Module {
- struct Module *next;
- char *name; /* module name for refcounting */
- int refCnt; /* the number of references */
- void *entry; /* entry point from load */
- struct dl_info *info; /* optional init/terminate functions */
- CdtorPtr cdtors; /* optional C++ constructors */
- GccCDtorPtr gcc_ctor; /* g++ constructors --jwe */
- GccCDtorPtr gcc_dtor; /* g++ destructors --jwe */
- int nExports; /* the number of exports found */
- ExportPtr exports; /* the array of exports */
-} Module, *ModulePtr;
-
-/*
- * We keep a list of all loaded modules to be able to call the fini
- * handlers and destructors at atexit() time.
- */
-static ModulePtr modList;
-
-/*
- * The last error from one of the dl* routines is kept in static
- * variables here. Each error is returned only once to the caller.
- */
-static char errbuf[BUFSIZ];
-static int errvalid;
-
-/*
- * The `fixed' gcc header files on AIX 3.2.5 provide a prototype for
- * strdup(). --jwe
- */
-#ifndef HAVE_STRDUP
-extern char *strdup(const char *);
-#endif
-static void caterr(char *);
-static int readExports(ModulePtr);
-static void terminate(void);
-static void *findMain(void);
-
-void *dlopen(const char *path, int mode)
-{
- ModulePtr mp;
- static void *mainModule;
-
- /*
- * Upon the first call register a terminate handler that will
- * close all libraries. Also get a reference to the main module
- * for use with loadbind.
- */
- if (!mainModule) {
- if ((mainModule = findMain()) == NULL)
- return NULL;
- atexit(terminate);
- }
- /*
- * Scan the list of modules if we have the module already loaded.
- */
- for (mp = modList; mp; mp = mp->next)
- if (strcmp(mp->name, path) == 0) {
- mp->refCnt++;
- return mp;
- }
- if ((mp = (ModulePtr)calloc(1, sizeof(*mp))) == NULL) {
- errvalid++;
- snprintf (errbuf, sizeof(errbuf), "calloc: %s", strerror(errno));
- return NULL;
- }
- if ((mp->name = strdup(path)) == NULL) {
- errvalid++;
- snprintf (errbuf, sizeof(errbuf), "strdup: %s", strerror(errno));
- free(mp);
- return NULL;
- }
- /*
- * load should be declared load(const char *...). Thus we
- * cast the path to a normal char *. Ugly.
- */
- if ((mp->entry = (void *)load((char *)path, L_NOAUTODEFER, NULL)) == NULL) {
- free(mp->name);
- free(mp);
- errvalid++;
- snprintf (errbuf, sizeof(errbuf),
- "dlopen: %s: ", path);
- /*
- * If AIX says the file is not executable, the error
- * can be further described by querying the loader about
- * the last error.
- */
- if (errno == ENOEXEC) {
- char *tmp[BUFSIZ/sizeof(char *)];
- if (loadquery(L_GETMESSAGES, tmp, sizeof(tmp)) == -1)
- strlcpy(errbuf,
- strerror(errno),
- sizeof(errbuf));
- else {
- char **p;
- for (p = tmp; *p; p++)
- caterr(*p);
- }
- } else
- strlcat(errbuf,
- strerror(errno),
- sizeof(errbuf));
- return NULL;
- }
- mp->refCnt = 1;
- mp->next = modList;
- modList = mp;
- if (loadbind(0, mainModule, mp->entry) == -1) {
- dlclose(mp);
- errvalid++;
- snprintf (errbuf, sizeof(errbuf),
- "loadbind: %s", strerror(errno));
- return NULL;
- }
- /*
- * If the user wants global binding, loadbind against all other
- * loaded modules.
- */
- if (mode & RTLD_GLOBAL) {
- ModulePtr mp1;
- for (mp1 = mp->next; mp1; mp1 = mp1->next)
- if (loadbind(0, mp1->entry, mp->entry) == -1) {
- dlclose(mp);
- errvalid++;
- snprintf (errbuf, sizeof(errbuf),
- "loadbind: %s",
- strerror(errno));
- return NULL;
- }
- }
- if (readExports(mp) == -1) {
- dlclose(mp);
- return NULL;
- }
- /*
- * If there is a dl_info structure, call the init function.
- */
- if (mp->info = (struct dl_info *)dlsym(mp, "dl_info")) {
- if (mp->info->init)
- (*mp->info->init)();
- } else
- errvalid = 0;
- /*
- * If the shared object was compiled using xlC we will need
- * to call static constructors (and later on dlclose destructors).
- */
- if (mp->cdtors = (CdtorPtr)dlsym(mp, "__cdtors")) {
- CdtorPtr cp = mp->cdtors;
- while (cp->init || cp->term) {
- if (cp->init && cp->init != (void (*)(void))0xffffffff)
- (*cp->init)();
- cp++;
- }
- /*
- * If the shared object was compiled using g++, we will need
- * to call global constructors using the _GLOBAL__DI function,
- * and later, global destructors using the _GLOBAL_DD
- * funciton. --jwe
- */
- } else if (mp->gcc_ctor = (GccCDtorPtr)dlsym(mp, "_GLOBAL__DI")) {
- (*mp->gcc_ctor)();
- mp->gcc_dtor = (GccCDtorPtr)dlsym(mp, "_GLOBAL__DD");
- } else
- errvalid = 0;
- return mp;
-}
-
-/*
- * Attempt to decipher an AIX loader error message and append it
- * to our static error message buffer.
- */
-static void caterr(char *s)
-{
- char *p = s;
-
- while (*p >= '0' && *p <= '9')
- p++;
- switch(atoi(s)) {
- case L_ERROR_TOOMANY:
- strlcat(errbuf, "to many errors", sizeof(errbuf));
- break;
- case L_ERROR_NOLIB:
- strlcat(errbuf, "can't load library", sizeof(errbuf));
- strlcat(errbuf, p, sizeof(errbuf));
- break;
- case L_ERROR_UNDEF:
- strlcat(errbuf, "can't find symbol", sizeof(errbuf));
- strlcat(errbuf, p, sizeof(errbuf));
- break;
- case L_ERROR_RLDBAD:
- strlcat(errbuf, "bad RLD", sizeof(errbuf));
- strlcat(errbuf, p, sizeof(errbuf));
- break;
- case L_ERROR_FORMAT:
- strlcat(errbuf, "bad exec format in", sizeof(errbuf));
- strlcat(errbuf, p, sizeof(errbuf));
- break;
- case L_ERROR_ERRNO:
- strlcat(errbuf, strerror(atoi(++p)), sizeof(errbuf));
- break;
- default:
- strlcat(errbuf, s, sizeof(errbuf));
- break;
- }
-}
-
-void *dlsym(void *handle, const char *symbol)
-{
- ModulePtr mp = (ModulePtr)handle;
- ExportPtr ep;
- int i;
-
- /*
- * Could speed up the search, but I assume that one assigns
- * the result to function pointers anyways.
- */
- for (ep = mp->exports, i = mp->nExports; i; i--, ep++)
- if (strcmp(ep->name, symbol) == 0)
- return ep->addr;
- errvalid++;
- snprintf (errbuf, sizeof(errbuf),
- "dlsym: undefined symbol %s", symbol);
- return NULL;
-}
-
-char *dlerror(void)
-{
- if (errvalid) {
- errvalid = 0;
- return errbuf;
- }
- return NULL;
-}
-
-int dlclose(void *handle)
-{
- ModulePtr mp = (ModulePtr)handle;
- int result;
- ModulePtr mp1;
-
- if (--mp->refCnt > 0)
- return 0;
- if (mp->info && mp->info->fini)
- (*mp->info->fini)();
- if (mp->cdtors) {
- CdtorPtr cp = mp->cdtors;
- while (cp->init || cp->term) {
- if (cp->term && cp->init != (void (*)(void))0xffffffff)
- (*cp->term)();
- cp++;
- }
- /*
- * If the function to handle global destructors for g++
- * exists, call it. --jwe
- */
- } else if (mp->gcc_dtor) {
- (*mp->gcc_dtor)();
- }
- result = unload(mp->entry);
- if (result == -1) {
- errvalid++;
- snprintf (errbuf, sizeof(errbuf),
- "%s", strerror(errno));
- }
- if (mp->exports) {
- ExportPtr ep;
- int i;
- for (ep = mp->exports, i = mp->nExports; i; i--, ep++)
- if (ep->name)
- free(ep->name);
- free(mp->exports);
- }
- if (mp == modList)
- modList = mp->next;
- else {
- for (mp1 = modList; mp1; mp1 = mp1->next)
- if (mp1->next == mp) {
- mp1->next = mp->next;
- break;
- }
- }
- free(mp->name);
- free(mp);
- return result;
-}
-
-static void terminate(void)
-{
- while (modList)
- dlclose(modList);
-}
-
-/*
- * Build the export table from the XCOFF .loader section.
- */
-static int readExports(ModulePtr mp)
-{
- LDFILE *ldp = NULL;
- SCNHDR sh, shdata;
- LDHDR *lhp;
- char *ldbuf;
- LDSYM *ls;
- int i;
- ExportPtr ep;
-
- if ((ldp = ldopen(mp->name, ldp)) == NULL) {
- struct ld_info *lp;
- char *buf;
- int size = 4*1024;
- if (errno != ENOENT) {
- errvalid++;
- snprintf(errbuf, sizeof(errbuf),
- "readExports: %s",
- strerror(errno));
- return -1;
- }
- /*
- * The module might be loaded due to the LIBPATH
- * environment variable. Search for the loaded
- * module using L_GETINFO.
- */
- if ((buf = malloc(size)) == NULL) {
- errvalid++;
- snprintf(errbuf, sizeof(errbuf),
- "readExports: %s",
- strerror(errno));
- return -1;
- }
- while ((i = loadquery(L_GETINFO, buf, size)) == -1 && errno == ENOMEM) {
- free(buf);
- size += 4*1024;
- if ((buf = malloc(size)) == NULL) {
- errvalid++;
- snprintf(errbuf, sizeof(errbuf),
- "readExports: %s",
- strerror(errno));
- return -1;
- }
- }
- if (i == -1) {
- errvalid++;
- snprintf(errbuf, sizeof(errbuf),
- "readExports: %s",
- strerror(errno));
- free(buf);
- return -1;
- }
- /*
- * Traverse the list of loaded modules. The entry point
- * returned by load() does actually point to the data
- * segment origin.
- */
- lp = (struct ld_info *)buf;
- while (lp) {
- if (lp->ldinfo_dataorg == mp->entry) {
- ldp = ldopen(lp->ldinfo_filename, ldp);
- break;
- }
- if (lp->ldinfo_next == 0)
- lp = NULL;
- else
- lp = (struct ld_info *)((char *)lp + lp->ldinfo_next);
- }
- free(buf);
- if (!ldp) {
- errvalid++;
- snprintf (errbuf, sizeof(errbuf),
- "readExports: %s", strerror(errno));
- return -1;
- }
- }
- if (TYPE(ldp) != U802TOCMAGIC) {
- errvalid++;
- snprintf(errbuf, sizeof(errbuf), "readExports: bad magic");
- while(ldclose(ldp) == FAILURE)
- ;
- return -1;
- }
- /*
- * Get the padding for the data section. This is needed for
- * AIX 4.1 compilers. This is used when building the final
- * function pointer to the exported symbol.
- */
- if (ldnshread(ldp, _DATA, &shdata) != SUCCESS) {
- errvalid++;
- snprintf(errbuf, sizeof(errbuf),
- "readExports: cannot read data section header");
- while(ldclose(ldp) == FAILURE)
- ;
- return -1;
- }
- if (ldnshread(ldp, _LOADER, &sh) != SUCCESS) {
- errvalid++;
- snprintf(errbuf, sizeof(errbuf),
- "readExports: cannot read loader section header");
- while(ldclose(ldp) == FAILURE)
- ;
- return -1;
- }
- /*
- * We read the complete loader section in one chunk, this makes
- * finding long symbol names residing in the string table easier.
- */
- if ((ldbuf = (char *)malloc(sh.s_size)) == NULL) {
- errvalid++;
- snprintf (errbuf, sizeof(errbuf),
- "readExports: %s", strerror(errno));
- while(ldclose(ldp) == FAILURE)
- ;
- return -1;
- }
- if (FSEEK(ldp, sh.s_scnptr, BEGINNING) != OKFSEEK) {
- errvalid++;
- snprintf(errbuf, sizeof(errbuf),
- "readExports: cannot seek to loader section");
- free(ldbuf);
- while(ldclose(ldp) == FAILURE)
- ;
- return -1;
- }
- if (FREAD(ldbuf, sh.s_size, 1, ldp) != 1) {
- errvalid++;
- snprintf(errbuf, sizeof(errbuf),
- "readExports: cannot read loader section");
- free(ldbuf);
- while(ldclose(ldp) == FAILURE)
- ;
- return -1;
- }
- lhp = (LDHDR *)ldbuf;
- ls = (LDSYM *)(ldbuf+LDHDRSZ);
- /*
- * Count the number of exports to include in our export table.
- */
- for (i = lhp->l_nsyms; i; i--, ls++) {
- if (!LDR_EXPORT(*ls))
- continue;
- mp->nExports++;
- }
- if ((mp->exports = (ExportPtr)calloc(mp->nExports, sizeof(*mp->exports))) == NULL) {
- errvalid++;
- snprintf (errbuf, sizeof(errbuf),
- "readExports: %s", strerror(errno));
- free(ldbuf);
- while(ldclose(ldp) == FAILURE)
- ;
- return -1;
- }
- /*
- * Fill in the export table. All entries are relative to
- * the entry point we got from load.
- */
- ep = mp->exports;
- ls = (LDSYM *)(ldbuf+LDHDRSZ);
- for (i = lhp->l_nsyms; i; i--, ls++) {
- char *symname;
- char tmpsym[SYMNMLEN+1];
- if (!LDR_EXPORT(*ls))
- continue;
- if (ls->l_zeroes == 0)
- symname = ls->l_offset+lhp->l_stoff+ldbuf;
- else {
- /*
- * The l_name member is not zero terminated, we
- * must copy the first SYMNMLEN chars and make
- * sure we have a zero byte at the end.
- */
- strlcpy (tmpsym, ls->l_name,
- SYMNMLEN + 1);
- symname = tmpsym;
- }
- ep->name = strdup(symname);
- ep->addr = (void *)((unsigned long)mp->entry +
- ls->l_value - shdata.s_vaddr);
- ep++;
- }
- free(ldbuf);
- while(ldclose(ldp) == FAILURE)
- ;
- return 0;
-}
-
-/*
- * Find the main modules entry point. This is used as export pointer
- * for loadbind() to be able to resolve references to the main part.
- */
-static void * findMain(void)
-{
- struct ld_info *lp;
- char *buf;
- int size = 4*1024;
- int i;
- void *ret;
-
- if ((buf = malloc(size)) == NULL) {
- errvalid++;
- snprintf (errbuf, sizeof(errbuf),
- "findMail: %s", strerror(errno));
- return NULL;
- }
- while ((i = loadquery(L_GETINFO, buf, size)) == -1 && errno == ENOMEM) {
- free(buf);
- size += 4*1024;
- if ((buf = malloc(size)) == NULL) {
- errvalid++;
- snprintf (errbuf, sizeof(errbuf),
- "findMail: %s", strerror(errno));
- return NULL;
- }
- }
- if (i == -1) {
- errvalid++;
- snprintf (errbuf, sizeof(errbuf),
- "findMail: %s", strerror(errno));
- free(buf);
- return NULL;
- }
- /*
- * The first entry is the main module. The entry point
- * returned by load() does actually point to the data
- * segment origin.
- */
- lp = (struct ld_info *)buf;
- ret = lp->ldinfo_dataorg;
- free(buf);
- return ret;
-}
diff --git a/crypto/kerberosIV/lib/kafs/dlfcn.h b/crypto/kerberosIV/lib/kafs/dlfcn.h
deleted file mode 100644
index 5671e9c..0000000
--- a/crypto/kerberosIV/lib/kafs/dlfcn.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52
- * This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
- * 30159 Hannover, Germany
- */
-
-#ifndef __dlfcn_h__
-#define __dlfcn_h__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Mode flags for the dlopen routine.
- */
-#define RTLD_LAZY 1 /* lazy function call binding */
-#define RTLD_NOW 2 /* immediate function call binding */
-#define RTLD_GLOBAL 0x100 /* allow symbols to be global */
-
-/*
- * To be able to intialize, a library may provide a dl_info structure
- * that contains functions to be called to initialize and terminate.
- */
-struct dl_info {
- void (*init)(void);
- void (*fini)(void);
-};
-
-#if __STDC__ || defined(_IBMR2)
-void *dlopen(const char *path, int mode);
-void *dlsym(void *handle, const char *symbol);
-char *dlerror(void);
-int dlclose(void *handle);
-#else
-void *dlopen();
-void *dlsym();
-char *dlerror();
-int dlclose();
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __dlfcn_h__ */
diff --git a/crypto/kerberosIV/lib/kafs/kafs.h b/crypto/kerberosIV/lib/kafs/kafs.h
deleted file mode 100644
index cb4b000..0000000
--- a/crypto/kerberosIV/lib/kafs/kafs.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 1997, 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. 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: kafs.h,v 1.32 1999/12/02 16:58:40 joda Exp $ */
-/* $FreeBSD$ */
-
-#ifndef __KAFS_H
-#define __KAFS_H
-
-/* XXX must include krb5.h or krb.h */
-
-/* sys/ioctl.h must be included manually before kafs.h */
-
-/*
- */
-#define AFSCALL_PIOCTL 20
-#define AFSCALL_SETPAG 21
-
-#ifndef _VICEIOCTL
-#define _VICEIOCTL(id) ((unsigned int ) _IOW('V', id, struct ViceIoctl))
-#endif /* _VICEIOCTL */
-
-#define VIOCSETAL _VICEIOCTL(1)
-#define VIOCGETAL _VICEIOCTL(2)
-#define VIOCSETTOK _VICEIOCTL(3)
-#define VIOCGETVOLSTAT _VICEIOCTL(4)
-#define VIOCSETVOLSTAT _VICEIOCTL(5)
-#define VIOCFLUSH _VICEIOCTL(6)
-#define VIOCGETTOK _VICEIOCTL(8)
-#define VIOCUNLOG _VICEIOCTL(9)
-#define VIOCCKSERV _VICEIOCTL(10)
-#define VIOCCKBACK _VICEIOCTL(11)
-#define VIOCCKCONN _VICEIOCTL(12)
-#define VIOCWHEREIS _VICEIOCTL(14)
-#define VIOCACCESS _VICEIOCTL(20)
-#define VIOCUNPAG _VICEIOCTL(21)
-#define VIOCGETFID _VICEIOCTL(22)
-#define VIOCSETCACHESIZE _VICEIOCTL(24)
-#define VIOCFLUSHCB _VICEIOCTL(25)
-#define VIOCNEWCELL _VICEIOCTL(26)
-#define VIOCGETCELL _VICEIOCTL(27)
-#define VIOC_AFS_DELETE_MT_PT _VICEIOCTL(28)
-#define VIOC_AFS_STAT_MT_PT _VICEIOCTL(29)
-#define VIOC_FILE_CELL_NAME _VICEIOCTL(30)
-#define VIOC_GET_WS_CELL _VICEIOCTL(31)
-#define VIOC_AFS_MARINER_HOST _VICEIOCTL(32)
-#define VIOC_GET_PRIMARY_CELL _VICEIOCTL(33)
-#define VIOC_VENUSLOG _VICEIOCTL(34)
-#define VIOC_GETCELLSTATUS _VICEIOCTL(35)
-#define VIOC_SETCELLSTATUS _VICEIOCTL(36)
-#define VIOC_FLUSHVOLUME _VICEIOCTL(37)
-#define VIOC_AFS_SYSNAME _VICEIOCTL(38)
-#define VIOC_EXPORTAFS _VICEIOCTL(39)
-#define VIOCGETCACHEPARAMS _VICEIOCTL(40)
-#define VIOC_GCPAGS _VICEIOCTL(48)
-
-struct ViceIoctl {
- caddr_t in, out;
- short in_size;
- short out_size;
-};
-
-struct ClearToken {
- int32_t AuthHandle;
- char HandShakeKey[8];
- int32_t ViceId;
- int32_t BeginTimestamp;
- int32_t EndTimestamp;
-};
-
-#ifdef __STDC__
-#ifndef __P
-#define __P(x) x
-#endif
-#else
-#ifndef __P
-#define __P(x) ()
-#endif
-#endif
-
-/* Use k_hasafs() to probe if the machine supports AFS syscalls.
- The other functions will generate a SIGSYS if AFS is not supported */
-
-int k_hasafs __P((void));
-
-int krb_afslog __P((const char *cell, const char *realm));
-int krb_afslog_uid __P((const char *cell, const char *realm, uid_t uid));
-int krb_afslog_home __P((const char *cell, const char *realm,
- const char *homedir));
-int krb_afslog_uid_home __P((const char *cell, const char *realm, uid_t uid,
- const char *homedir));
-
-int krb_realm_of_cell __P((const char *cell, char **realm));
-
-/* compat */
-#define k_afsklog krb_afslog
-#define k_afsklog_uid krb_afslog_uid
-
-int k_pioctl __P((char *a_path,
- int o_opcode,
- struct ViceIoctl *a_paramsP,
- int a_followSymlinks));
-int k_unlog __P((void));
-int k_setpag __P((void));
-int k_afs_cell_of_file __P((const char *path, char *cell, int len));
-
-
-
-/* XXX */
-#ifdef KFAILURE
-#define KRB_H_INCLUDED
-#endif
-
-#ifdef KRB5_RECVAUTH_IGNORE_VERSION
-#define KRB5_H_INCLUDED
-#endif
-
-#ifdef KRB_H_INCLUDED
-int kafs_settoken __P((const char*, uid_t, CREDENTIALS*));
-#endif
-
-#ifdef KRB5_H_INCLUDED
-krb5_error_code krb5_afslog_uid __P((krb5_context context,
- krb5_ccache id,
- const char *cell,
- krb5_const_realm realm,
- uid_t uid));
-krb5_error_code krb5_afslog __P((krb5_context context,
- krb5_ccache id,
- const char *cell,
- krb5_const_realm realm));
-krb5_error_code krb5_afslog_uid_home __P((krb5_context context,
- krb5_ccache id,
- const char *cell,
- krb5_const_realm realm,
- uid_t uid,
- const char *homedir));
-
-krb5_error_code krb5_afslog_home __P((krb5_context context,
- krb5_ccache id,
- const char *cell,
- krb5_const_realm realm,
- const char *homedir));
-
-krb5_error_code krb5_realm_of_cell __P((const char *cell, char **realm));
-
-#endif
-
-
-#define _PATH_VICE "/usr/vice/etc/"
-#define _PATH_THISCELL _PATH_VICE "ThisCell"
-#define _PATH_CELLSERVDB _PATH_VICE "CellServDB"
-#define _PATH_THESECELLS _PATH_VICE "TheseCells"
-
-#define _PATH_ARLA_VICE "/usr/arla/etc/"
-#define _PATH_ARLA_THISCELL _PATH_ARLA_VICE "ThisCell"
-#define _PATH_ARLA_CELLSERVDB _PATH_ARLA_VICE "CellServDB"
-#define _PATH_ARLA_THESECELLS _PATH_ARLA_VICE "TheseCells"
-
-extern int _kafs_debug;
-
-#endif /* __KAFS_H */
diff --git a/crypto/kerberosIV/lib/kafs/kafs_locl.h b/crypto/kerberosIV/lib/kafs/kafs_locl.h
deleted file mode 100644
index ac1c2f6..0000000
--- a/crypto/kerberosIV/lib/kafs/kafs_locl.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 1997, 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. 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: kafs_locl.h,v 1.15 1999/12/02 16:58:40 joda Exp $ */
-
-#ifndef __KAFS_LOCL_H__
-#define __KAFS_LOCL_H__
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <errno.h>
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#if defined(HAVE_SYS_IOCTL_H) && SunOS != 40
-#include <sys/ioctl.h>
-#endif
-#ifdef HAVE_SYS_FILIO_H
-#include <sys/filio.h>
-#endif
-
-#ifdef HAVE_SYS_SYSCALL_H
-#include <sys/syscall.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
-#ifdef HAVE_NETINET6_IN6_H
-#include <netinet6/in6.h>
-#endif
-
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
-#ifdef HAVE_RESOLV_H
-#include <resolv.h>
-#endif
-#include <roken.h>
-
-#ifdef KRB5
-#include <krb5.h>
-#endif
-#ifdef KRB4
-#include <krb.h>
-#endif
-#include <kafs.h>
-
-#include <resolve.h>
-
-#include "afssysdefs.h"
-
-struct kafs_data;
-typedef int (*afslog_uid_func_t)(struct kafs_data *,
- const char *cell,
- const char *realm_hint,
- uid_t,
- const char *homedir);
-
-typedef int (*get_cred_func_t)(struct kafs_data*, const char*, const char*,
- const char*, CREDENTIALS*);
-
-typedef char* (*get_realm_func_t)(struct kafs_data*, const char*);
-
-typedef struct kafs_data {
- afslog_uid_func_t afslog_uid;
- get_cred_func_t get_cred;
- get_realm_func_t get_realm;
- void *data;
-} kafs_data;
-
-int _kafs_afslog_all_local_cells(kafs_data*, uid_t, const char*);
-
-int _kafs_get_cred(kafs_data*, const char*, const char*, const char *,
- CREDENTIALS*);
-
-int
-_kafs_realm_of_cell(kafs_data *data, const char *cell, char **realm);
-
-#ifdef _AIX
-int aix_pioctl(char*, int, struct ViceIoctl*, int);
-int aix_setpag(void);
-#endif
-
-#endif /* __KAFS_LOCL_H__ */
OpenPOWER on IntegriCloud