aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>2000-06-25 00:20:49 +0000
committercvs2svn <cvs2svn@FreeBSD.org>2000-06-25 00:20:49 +0000
commitb4d1edeb37a573694fb661e8da9631ce60473a8d (patch)
treed60a940b78ccfa7028d8cb64ada3fc11fa35cfbb
parent2c6b0cc3165d3f4bd4fd1e511e7af57822522009 (diff)
downloadsrc-release/3.5.0.tar.gz
src-release/3.5.0.zip
This commit was manufactured by cvs2svn to create tagrelease/3.5.0
'RELENG_3_5_0_RELEASE'.
-rw-r--r--contrib/com_err/ChangeLog106
-rw-r--r--contrib/com_err/Makefile.am24
-rw-r--r--contrib/com_err/Makefile.in710
-rw-r--r--contrib/com_err/com_err.396
-rw-r--r--contrib/com_err/com_err.c155
-rw-r--r--contrib/com_err/com_err.h68
-rw-r--r--contrib/com_err/com_right.h63
-rw-r--r--contrib/com_err/compile_et.178
-rw-r--r--contrib/com_err/compile_et.c234
-rw-r--r--contrib/com_err/compile_et.h83
-rw-r--r--contrib/com_err/error.c96
-rw-r--r--contrib/com_err/getarg.c376
-rw-r--r--contrib/com_err/getarg.h76
-rw-r--r--contrib/com_err/lex.l129
-rw-r--r--contrib/com_err/parse.y173
-rw-r--r--contrib/com_err/roken_rename.h44
-rw-r--r--crypto/kerberosIV/acinclude.m49
-rw-r--r--crypto/kerberosIV/appl/afsutil/Makefile.in89
-rw-r--r--crypto/kerberosIV/appl/afsutil/aklog.c234
-rw-r--r--crypto/kerberosIV/appl/afsutil/kstring2key.c138
-rw-r--r--crypto/kerberosIV/appl/afsutil/pagsh.c136
-rw-r--r--crypto/kerberosIV/appl/bsd/osfc2.c79
-rw-r--r--crypto/kerberosIV/appl/ftp/ChangeLog376
-rw-r--r--crypto/kerberosIV/appl/ftp/Makefile.am5
-rw-r--r--crypto/kerberosIV/appl/ftp/common/Makefile.am12
-rw-r--r--crypto/kerberosIV/appl/ftp/ftp/Makefile.am44
-rw-r--r--crypto/kerberosIV/appl/ftp/ftp/gssapi.c379
-rw-r--r--crypto/kerberosIV/appl/ftp/ftp/security.c785
-rw-r--r--crypto/kerberosIV/appl/ftp/ftp/security.h131
-rw-r--r--crypto/kerberosIV/appl/ftp/ftpd/Makefile.am54
-rw-r--r--crypto/kerberosIV/appl/ftp/ftpd/ftpd_locl.h170
-rw-r--r--crypto/kerberosIV/appl/ftp/ftpd/gss_userok.c69
-rw-r--r--crypto/kerberosIV/appl/ftp/ftpd/ls.c572
-rw-r--r--crypto/kerberosIV/appl/kauth/ChangeLog30
-rw-r--r--crypto/kerberosIV/appl/kauth/Makefile.am42
-rw-r--r--crypto/kerberosIV/appl/push/ChangeLog135
-rw-r--r--crypto/kerberosIV/appl/push/Makefile.am27
-rw-r--r--crypto/kerberosIV/appl/push/Makefile.in95
-rw-r--r--crypto/kerberosIV/appl/push/pfrom.in6
-rw-r--r--crypto/kerberosIV/appl/push/push.8138
-rw-r--r--crypto/kerberosIV/appl/push/push.c795
-rw-r--r--crypto/kerberosIV/appl/push/push.cat877
-rw-r--r--crypto/kerberosIV/appl/push/push_locl.h98
-rw-r--r--crypto/kerberosIV/appl/sample/Makefile.in83
-rw-r--r--crypto/kerberosIV/appl/sample/sample.h76
-rw-r--r--crypto/kerberosIV/appl/sample/sample_client.c168
-rw-r--r--crypto/kerberosIV/appl/sample/sample_server.c153
-rw-r--r--crypto/kerberosIV/appl/sample/simple.h14
-rw-r--r--crypto/kerberosIV/appl/sample/simple_client.c202
-rw-r--r--crypto/kerberosIV/appl/sample/simple_server.c140
-rw-r--r--crypto/kerberosIV/cf/ChangeLog216
-rw-r--r--crypto/kerberosIV/cf/Makefile.am.common255
-rw-r--r--crypto/kerberosIV/cf/auth-modules.m427
-rw-r--r--crypto/kerberosIV/cf/broken-glob.m422
-rw-r--r--crypto/kerberosIV/cf/broken-snprintf.m458
-rw-r--r--crypto/kerberosIV/cf/broken.m419
-rw-r--r--crypto/kerberosIV/cf/c-attribute.m431
-rw-r--r--crypto/kerberosIV/cf/c-function.m433
-rw-r--r--crypto/kerberosIV/cf/capabilities.m414
-rw-r--r--crypto/kerberosIV/cf/check-declaration.m425
-rw-r--r--crypto/kerberosIV/cf/check-getpwnam_r-posix.m424
-rw-r--r--crypto/kerberosIV/cf/check-man.m459
-rw-r--r--crypto/kerberosIV/cf/check-netinet-ip-and-tcp.m438
-rw-r--r--crypto/kerberosIV/cf/check-type-extra.m423
-rw-r--r--crypto/kerberosIV/cf/check-var.m420
-rw-r--r--crypto/kerberosIV/cf/check-x.m452
-rw-r--r--crypto/kerberosIV/cf/check-xau.m464
-rw-r--r--crypto/kerberosIV/cf/find-func-no-libs.m49
-rw-r--r--crypto/kerberosIV/cf/find-func-no-libs2.m463
-rw-r--r--crypto/kerberosIV/cf/find-func.m49
-rw-r--r--crypto/kerberosIV/cf/find-if-not-broken.m413
-rw-r--r--crypto/kerberosIV/cf/grok-type.m438
-rw-r--r--crypto/kerberosIV/cf/have-pragma-weak.m437
-rw-r--r--crypto/kerberosIV/cf/have-struct-field.m419
-rw-r--r--crypto/kerberosIV/cf/have-type.m431
-rw-r--r--crypto/kerberosIV/cf/have-types.m414
-rw-r--r--crypto/kerberosIV/cf/krb-find-db.m498
-rw-r--r--crypto/kerberosIV/cf/krb-func-getcwd-broken.m442
-rw-r--r--crypto/kerberosIV/cf/krb-func-getlogin.m422
-rw-r--r--crypto/kerberosIV/cf/krb-ipv6.m4130
-rw-r--r--crypto/kerberosIV/cf/krb-prog-ln-s.m428
-rw-r--r--crypto/kerberosIV/cf/krb-prog-ranlib.m48
-rw-r--r--crypto/kerberosIV/cf/krb-prog-yacc.m48
-rw-r--r--crypto/kerberosIV/cf/krb-struct-spwd.m422
-rw-r--r--crypto/kerberosIV/cf/krb-struct-winsize.m427
-rw-r--r--crypto/kerberosIV/cf/krb-sys-aix.m415
-rw-r--r--crypto/kerberosIV/cf/krb-sys-nextstep.m421
-rw-r--r--crypto/kerberosIV/cf/krb-version.m425
-rw-r--r--crypto/kerberosIV/cf/make-proto.pl199
-rw-r--r--crypto/kerberosIV/cf/mips-abi.m487
-rw-r--r--crypto/kerberosIV/cf/misc.m43
-rw-r--r--crypto/kerberosIV/cf/need-proto.m425
-rw-r--r--crypto/kerberosIV/cf/osfc2.m414
-rw-r--r--crypto/kerberosIV/cf/proto-compat.m422
-rw-r--r--crypto/kerberosIV/cf/shared-libs.m4187
-rw-r--r--crypto/kerberosIV/cf/test-package.m488
-rw-r--r--crypto/kerberosIV/cf/wflags.m421
-rw-r--r--crypto/kerberosIV/doc/dir17
-rw-r--r--crypto/kerberosIV/etc/inetd.conf.changes.in33
-rw-r--r--crypto/kerberosIV/include/bits.c208
-rw-r--r--crypto/kerberosIV/include/netdb.x7
-rw-r--r--crypto/kerberosIV/include/protos.H277
-rw-r--r--crypto/kerberosIV/include/sys/socket.x7
-rw-r--r--crypto/kerberosIV/include/win32/config.h1185
-rw-r--r--crypto/kerberosIV/include/win32/ktypes.h11
-rw-r--r--crypto/kerberosIV/include/win32/roken.h214
-rw-r--r--crypto/kerberosIV/include/win32/version.h2
-rw-r--r--crypto/kerberosIV/include/win32/winconf.sh37
-rw-r--r--crypto/kerberosIV/kadmin/random_password.c160
-rw-r--r--crypto/kerberosIV/lib/auth/ChangeLog65
-rw-r--r--crypto/kerberosIV/lib/auth/Makefile.am6
-rw-r--r--crypto/kerberosIV/lib/auth/Makefile.in55
-rw-r--r--crypto/kerberosIV/lib/auth/afskauthlib/Makefile.am38
-rw-r--r--crypto/kerberosIV/lib/auth/afskauthlib/Makefile.in87
-rw-r--r--crypto/kerberosIV/lib/auth/afskauthlib/README25
-rw-r--r--crypto/kerberosIV/lib/auth/afskauthlib/verify.c288
-rw-r--r--crypto/kerberosIV/lib/auth/pam/Makefile.am3
-rw-r--r--crypto/kerberosIV/lib/auth/pam/Makefile.in88
-rw-r--r--crypto/kerberosIV/lib/auth/pam/README25
-rw-r--r--crypto/kerberosIV/lib/auth/pam/pam.c243
-rw-r--r--crypto/kerberosIV/lib/auth/pam/pam.conf.add76
-rw-r--r--crypto/kerberosIV/lib/auth/sia/Makefile.am48
-rw-r--r--crypto/kerberosIV/lib/auth/sia/Makefile.in90
-rw-r--r--crypto/kerberosIV/lib/auth/sia/README87
-rw-r--r--crypto/kerberosIV/lib/auth/sia/krb4+c2_matrix.conf58
-rw-r--r--crypto/kerberosIV/lib/auth/sia/krb4_matrix.conf59
-rw-r--r--crypto/kerberosIV/lib/auth/sia/krb5+c2_matrix.conf27
-rw-r--r--crypto/kerberosIV/lib/auth/sia/krb5_matrix.conf27
-rw-r--r--crypto/kerberosIV/lib/auth/sia/posix_getpw.c78
-rw-r--r--crypto/kerberosIV/lib/auth/sia/security.patch11
-rw-r--r--crypto/kerberosIV/lib/auth/sia/sia.c672
-rw-r--r--crypto/kerberosIV/lib/auth/sia/sia_locl.h94
-rw-r--r--crypto/kerberosIV/lib/kadm/check_password.c55
-rw-r--r--crypto/kerberosIV/lib/kafs/ChangeLog165
-rw-r--r--crypto/kerberosIV/lib/kafs/Makefile.am70
-rw-r--r--crypto/kerberosIV/lib/kafs/README.dlfcn246
-rw-r--r--crypto/kerberosIV/lib/kafs/afskrb5.c179
-rw-r--r--crypto/kerberosIV/lib/kafs/common.c396
-rw-r--r--crypto/kerberosIV/lib/kclient/KClient.c440
-rw-r--r--crypto/kerberosIV/lib/kclient/KClient.def19
-rw-r--r--crypto/kerberosIV/lib/kclient/KClient.dsp127
-rw-r--r--crypto/kerberosIV/lib/kclient/KClient.h160
-rw-r--r--crypto/kerberosIV/lib/kclient/KClient.mak297
-rw-r--r--crypto/kerberosIV/lib/kclient/passwd_dialog.rc143
-rw-r--r--crypto/kerberosIV/lib/kclient/passwd_dlg.c109
-rw-r--r--crypto/kerberosIV/lib/kclient/passwd_dlg.h47
-rw-r--r--crypto/kerberosIV/lib/kclient/resource.h18
-rw-r--r--crypto/kerberosIV/lib/krb/defaults.c58
-rw-r--r--crypto/kerberosIV/lib/krb/extra.c202
-rw-r--r--crypto/kerberosIV/lib/krb/getfile.c91
-rw-r--r--crypto/kerberosIV/lib/krb/krb-archaeology.h131
-rw-r--r--crypto/kerberosIV/lib/krb/krb-protos.h789
-rw-r--r--crypto/kerberosIV/lib/krb/krb.dsp398
-rw-r--r--crypto/kerberosIV/lib/krb/krb.rc105
-rw-r--r--crypto/kerberosIV/lib/krb/krb_ip_realm.c104
-rw-r--r--crypto/kerberosIV/lib/krb/krb_log.h74
-rw-r--r--crypto/kerberosIV/lib/krb/krb_net_read.c42
-rw-r--r--crypto/kerberosIV/lib/krb/krb_net_write.c42
-rw-r--r--crypto/kerberosIV/lib/krb/resource.h15
-rw-r--r--crypto/kerberosIV/lib/krb/roken_rename.h98
-rw-r--r--crypto/kerberosIV/lib/krb/solaris_compat.c89
-rw-r--r--crypto/kerberosIV/lib/krb/time.c71
-rw-r--r--crypto/kerberosIV/lib/roken/ChangeLog614
-rw-r--r--crypto/kerberosIV/lib/roken/Makefile.am177
-rw-r--r--crypto/kerberosIV/lib/roken/base64.c146
-rw-r--r--crypto/kerberosIV/lib/roken/base64.h42
-rw-r--r--crypto/kerberosIV/lib/roken/concat.c112
-rw-r--r--crypto/kerberosIV/lib/roken/copyhostent.c102
-rw-r--r--crypto/kerberosIV/lib/roken/emalloc.c56
-rw-r--r--crypto/kerberosIV/lib/roken/eread.c57
-rw-r--r--crypto/kerberosIV/lib/roken/erealloc.c56
-rw-r--r--crypto/kerberosIV/lib/roken/estrdup.c56
-rw-r--r--crypto/kerberosIV/lib/roken/ewrite.c57
-rw-r--r--crypto/kerberosIV/lib/roken/flock.c87
-rw-r--r--crypto/kerberosIV/lib/roken/fnmatch.c173
-rw-r--r--crypto/kerberosIV/lib/roken/fnmatch.h49
-rw-r--r--crypto/kerberosIV/lib/roken/freehostent.c62
-rw-r--r--crypto/kerberosIV/lib/roken/get_default_username.c80
-rw-r--r--crypto/kerberosIV/lib/roken/getarg.3317
-rw-r--r--crypto/kerberosIV/lib/roken/getarg.c547
-rw-r--r--crypto/kerberosIV/lib/roken/getarg.h89
-rw-r--r--crypto/kerberosIV/lib/roken/getcap.c1118
-rw-r--r--crypto/kerberosIV/lib/roken/getegid.c48
-rw-r--r--crypto/kerberosIV/lib/roken/geteuid.c48
-rw-r--r--crypto/kerberosIV/lib/roken/getgid.c48
-rw-r--r--crypto/kerberosIV/lib/roken/gethostname.c72
-rw-r--r--crypto/kerberosIV/lib/roken/getipnodebyaddr.c74
-rw-r--r--crypto/kerberosIV/lib/roken/getipnodebyname.c86
-rw-r--r--crypto/kerberosIV/lib/roken/gettimeofday.c55
-rw-r--r--crypto/kerberosIV/lib/roken/getuid.c48
-rw-r--r--crypto/kerberosIV/lib/roken/glob.c835
-rw-r--r--crypto/kerberosIV/lib/roken/glob.h84
-rw-r--r--crypto/kerberosIV/lib/roken/inet_ntop.c153
-rw-r--r--crypto/kerberosIV/lib/roken/inet_pton.c66
-rw-r--r--crypto/kerberosIV/lib/roken/innetgr.c49
-rw-r--r--crypto/kerberosIV/lib/roken/iruserok.c294
-rw-r--r--crypto/kerberosIV/lib/roken/issuid.c53
-rw-r--r--crypto/kerberosIV/lib/roken/make-print-version.c68
-rw-r--r--crypto/kerberosIV/lib/roken/net_read.c74
-rw-r--r--crypto/kerberosIV/lib/roken/net_write.c72
-rw-r--r--crypto/kerberosIV/lib/roken/parse_bytes-test.c92
-rw-r--r--crypto/kerberosIV/lib/roken/parse_bytes.c78
-rw-r--r--crypto/kerberosIV/lib/roken/parse_bytes.h48
-rw-r--r--crypto/kerberosIV/lib/roken/parse_time.c78
-rw-r--r--crypto/kerberosIV/lib/roken/parse_time.h51
-rw-r--r--crypto/kerberosIV/lib/roken/parse_units.c324
-rw-r--r--crypto/kerberosIV/lib/roken/parse_units.h73
-rw-r--r--crypto/kerberosIV/lib/roken/print_version.c78
-rw-r--r--crypto/kerberosIV/lib/roken/readv.c67
-rw-r--r--crypto/kerberosIV/lib/roken/recvmsg.c69
-rw-r--r--crypto/kerberosIV/lib/roken/resolve.c353
-rw-r--r--crypto/kerberosIV/lib/roken/resolve.h103
-rw-r--r--crypto/kerberosIV/lib/roken/resource.h15
-rw-r--r--crypto/kerberosIV/lib/roken/roken-common.h255
-rw-r--r--crypto/kerberosIV/lib/roken/roken.awk35
-rw-r--r--crypto/kerberosIV/lib/roken/roken.dsp156
-rw-r--r--crypto/kerberosIV/lib/roken/roken.h.in505
-rw-r--r--crypto/kerberosIV/lib/roken/roken.rc105
-rw-r--r--crypto/kerberosIV/lib/roken/roken_gethostby.c280
-rw-r--r--crypto/kerberosIV/lib/roken/sendmsg.c65
-rw-r--r--crypto/kerberosIV/lib/roken/simple_exec.c171
-rw-r--r--crypto/kerberosIV/lib/roken/socket.c282
-rw-r--r--crypto/kerberosIV/lib/roken/strlcat.c50
-rw-r--r--crypto/kerberosIV/lib/roken/strlcpy.c60
-rw-r--r--crypto/kerberosIV/lib/roken/strncasecmp.c60
-rw-r--r--crypto/kerberosIV/lib/roken/strndup.c56
-rw-r--r--crypto/kerberosIV/lib/roken/strpftime-test.c287
-rw-r--r--crypto/kerberosIV/lib/roken/strptime.c444
-rw-r--r--crypto/kerberosIV/lib/roken/strsep.c61
-rw-r--r--crypto/kerberosIV/lib/roken/swab.c54
-rw-r--r--crypto/kerberosIV/lib/roken/vsyslog.c57
-rw-r--r--crypto/kerberosIV/lib/roken/writev.c64
-rw-r--r--crypto/kerberosIV/lib/sl/ChangeLog112
-rw-r--r--crypto/kerberosIV/lib/sl/Makefile.am44
-rw-r--r--crypto/kerberosIV/lib/sl/lex.l114
-rw-r--r--crypto/kerberosIV/lib/sl/make_cmds.c240
-rw-r--r--crypto/kerberosIV/lib/sl/make_cmds.h69
-rw-r--r--crypto/kerberosIV/lib/sl/parse.y194
-rw-r--r--crypto/kerberosIV/lib/sl/roken_rename.h61
-rw-r--r--crypto/kerberosIV/lib/sl/ss.c133
-rw-r--r--crypto/kerberosIV/lib/sl/ss.h55
-rw-r--r--crypto/kerberosIV/man/Makefile11
-rw-r--r--crypto/kerberosIV/man/afslog.172
-rw-r--r--crypto/kerberosIV/man/ftp.11193
-rw-r--r--crypto/kerberosIV/man/ftpd.8473
-rw-r--r--crypto/kerberosIV/man/ftpusers.538
-rw-r--r--crypto/kerberosIV/man/kpasswd.185
-rw-r--r--crypto/kerberosIV/man/krb.extra.551
-rw-r--r--crypto/kerberosIV/man/login.1160
-rw-r--r--crypto/kerberosIV/man/login.access.550
-rw-r--r--crypto/kerberosIV/man/pagsh.122
-rw-r--r--crypto/kerberosIV/man/rcp.1161
-rw-r--r--crypto/kerberosIV/man/rlogin.1190
-rw-r--r--crypto/kerberosIV/man/rlogind.8178
-rw-r--r--crypto/kerberosIV/man/rsh.1182
-rw-r--r--crypto/kerberosIV/man/rshd.8221
-rw-r--r--crypto/kerberosIV/man/su.1189
-rwxr-xr-xkerberosIV/include/roken.h188
-rw-r--r--release/texts/alpha/RELNOTES.TXT78
-rw-r--r--release/texts/i386/RELNOTES.TXT78
-rw-r--r--sys/conf/newvers.sh2
-rw-r--r--usr.sbin/ypserv/Makefile.yp12
262 files changed, 116 insertions, 34805 deletions
diff --git a/contrib/com_err/ChangeLog b/contrib/com_err/ChangeLog
deleted file mode 100644
index ea7a5f6d01ee..000000000000
--- a/contrib/com_err/ChangeLog
+++ /dev/null
@@ -1,106 +0,0 @@
-1999-07-03 Assar Westerlund <assar@sics.se>
-
- * parse.y (statement): use asprintf
-
-1999-06-13 Assar Westerlund <assar@sics.se>
-
- * Makefile.in: make it solaris make vpath-safe
-
-Thu Apr 1 11:13:53 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * compile_et.c: use getargs
-
-Sat Mar 20 00:16:30 1999 Assar Westerlund <assar@sics.se>
-
- * compile_et.c: static-ize
-
-Thu Mar 18 11:22:13 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: include Makefile.am.common
-
-Tue Mar 16 22:30:05 1999 Assar Westerlund <assar@sics.se>
-
- * parse.y: use YYACCEPT instead of return
-
-Sat Mar 13 22:22:56 1999 Assar Westerlund <assar@sics.se>
-
- * compile_et.c (generate_h): cast when calling is* to get rid of a
- warning
-
-Thu Mar 11 15:00:51 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * parse.y: prototype for error_message
-
-Sun Nov 22 10:39:02 1998 Assar Westerlund <assar@sics.se>
-
- * 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 <assar@sics.se>
-
- * lex.l: undef ECHO to work around AIX lex bug
-
-Sun Sep 27 02:23:59 1998 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * 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 <joda@hella.pdc.kth.se>
-
- * compile_et.c: <foo_err.h> -> "foo_err.h"
-
-Tue Jun 30 17:17:36 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in: add str{cpy,cat}_truncate
-
-Mon May 25 05:24:39 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (clean): try to remove shared library debris
-
-Sun Apr 19 09:50:17 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in: add symlink magic for linux
-
-Sun Apr 5 09:22:11 1998 Assar Westerlund <assar@sics.se>
-
- * 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 <assar@sics.se>
-
- * Makefile.in: link with snprintf (From Derrick J Brashear
- <shadow@dementia.org>)
-
-Fri Feb 27 05:01:42 1998 Assar Westerlund <assar@sics.se>
-
- * parse.y: initialize ec->next
-
-Thu Feb 26 02:22:25 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.am: @LEXLIB@
-
-Sat Feb 21 15:18:54 1998 assar westerlund <assar@sics.se>
-
- * Makefile.in: set YACC and LEX
-
-Tue Feb 17 22:20:27 1998 Bjoern Groenvall <bg@sics.se>
-
- * 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 <joda@emma.pdc.kth.se>
-
- * 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 <joda@emma.pdc.kth.se>
-
- * lex.l (getstring): Replace getc() with input().
-
- * Makefile.am: Fixes for new compile_et.
diff --git a/contrib/com_err/Makefile.am b/contrib/com_err/Makefile.am
deleted file mode 100644
index 2c7525b96d23..000000000000
--- a/contrib/com_err/Makefile.am
+++ /dev/null
@@ -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)
diff --git a/contrib/com_err/Makefile.in b/contrib/com_err/Makefile.in
deleted file mode 100644
index 6edf45238c08..000000000000
--- a/contrib/com_err/Makefile.in
+++ /dev/null
@@ -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:
diff --git a/contrib/com_err/com_err.3 b/contrib/com_err/com_err.3
deleted file mode 100644
index e6eeea13b852..000000000000
--- a/contrib/com_err/com_err.3
+++ /dev/null
@@ -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".
diff --git a/contrib/com_err/com_err.c b/contrib/com_err/com_err.c
deleted file mode 100644
index fc15e9a914c1..000000000000
--- a/contrib/com_err/com_err.c
+++ /dev/null
@@ -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);
-}
diff --git a/contrib/com_err/com_err.h b/contrib/com_err/com_err.h
deleted file mode 100644
index 19cf034d6840..000000000000
--- a/contrib/com_err/com_err.h
+++ /dev/null
@@ -1,68 +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.
- */
-
-/* $Id: com_err.h,v 1.3 1998/05/02 20:13:28 assar Exp $ */
-/* $FreeBSD$ */
-
-/* MIT compatible com_err library */
-
-#ifndef __COM_ERR_H__
-#define __COM_ERR_H__
-
-#include <sys/cdefs.h>
-
-#ifdef __STDC__
-#include <stdarg.h>
-#endif
-
-#include <com_right.h>
-
-typedef void (*errf) __P((const char *, long, const char *, va_list));
-
-const char * error_message __P((long));
-int init_error_table __P((const char**, long, int));
-
-void com_err_va __P((const char *, long, const char *, va_list));
-void com_err __P((const char *, long, const char *, ...));
-
-errf set_com_err_hook __P((errf));
-errf reset_com_err_hook __P((void));
-
-const char *error_table_name __P((int num));
-
-#endif /* __COM_ERR_H__ */
diff --git a/contrib/com_err/com_right.h b/contrib/com_err/com_right.h
deleted file mode 100644
index c329bced9785..000000000000
--- a/contrib/com_err/com_right.h
+++ /dev/null
@@ -1,63 +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.
- */
-
-/* $Id: com_right.h,v 1.8 1998/02/17 21:19:43 bg Exp $ */
-/* $FreeBSD$ */
-
-#ifndef __COM_RIGHT_H__
-#define __COM_RIGHT_H__
-
-#include <sys/cdefs.h>
-
-struct error_table {
- char const * const * msgs;
- long base;
- int n_msgs;
-};
-struct et_list {
- struct et_list *next;
- struct error_table *table;
-};
-extern struct et_list *_et_list;
-
-const char *com_right __P((struct et_list *list, long code));
-void initialize_error_table_r __P((struct et_list **, const char **, int,
- long));
-void free_error_table __P((struct et_list *));
-
-#endif /* __COM_RIGHT_H__ */
diff --git a/contrib/com_err/compile_et.1 b/contrib/com_err/compile_et.1
deleted file mode 100644
index 091038079535..000000000000
--- a/contrib/com_err/compile_et.1
+++ /dev/null
@@ -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
diff --git a/contrib/com_err/compile_et.c b/contrib/com_err/compile_et.c
deleted file mode 100644
index 345a39f0b140..000000000000
--- a/contrib/com_err/compile_et.c
+++ /dev/null
@@ -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();
-}
diff --git a/contrib/com_err/compile_et.h b/contrib/com_err/compile_et.h
deleted file mode 100644
index fc6b3e54c0d9..000000000000
--- a/contrib/com_err/compile_et.h
+++ /dev/null
@@ -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__ */
diff --git a/contrib/com_err/error.c b/contrib/com_err/error.c
deleted file mode 100644
index 68f4f71632a8..000000000000
--- a/contrib/com_err/error.c
+++ /dev/null
@@ -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);
- }
-}
diff --git a/contrib/com_err/getarg.c b/contrib/com_err/getarg.c
deleted file mode 100644
index 6972e6987c41..000000000000
--- a/contrib/com_err/getarg.c
+++ /dev/null
@@ -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
diff --git a/contrib/com_err/getarg.h b/contrib/com_err/getarg.h
deleted file mode 100644
index d0d9d4e6f57e..000000000000
--- a/contrib/com_err/getarg.h
+++ /dev/null
@@ -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__ */
diff --git a/contrib/com_err/lex.l b/contrib/com_err/lex.l
deleted file mode 100644
index 264ad6f8ab90..000000000000
--- a/contrib/com_err/lex.l
+++ /dev/null
@@ -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++;
-}
diff --git a/contrib/com_err/parse.y b/contrib/com_err/parse.y
deleted file mode 100644
index 32875d4271bb..000000000000
--- a/contrib/com_err/parse.y
+++ /dev/null
@@ -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);
-}
diff --git a/contrib/com_err/roken_rename.h b/contrib/com_err/roken_rename.h
deleted file mode 100644
index 76063ad4d6d0..000000000000
--- a/contrib/com_err/roken_rename.h
+++ /dev/null
@@ -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__ */
diff --git a/crypto/kerberosIV/acinclude.m4 b/crypto/kerberosIV/acinclude.m4
deleted file mode 100644
index 7e7de6fa2c1e..000000000000
--- a/crypto/kerberosIV/acinclude.m4
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/appl/afsutil/Makefile.in b/crypto/kerberosIV/appl/afsutil/Makefile.in
deleted file mode 100644
index 86adb88b5108..000000000000
--- a/crypto/kerberosIV/appl/afsutil/Makefile.in
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/appl/afsutil/aklog.c b/crypto/kerberosIV/appl/afsutil/aklog.c
deleted file mode 100644
index 22dbfe7b2f85..000000000000
--- a/crypto/kerberosIV/appl/afsutil/aklog.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (c) 1995 - 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <ctype.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#if defined(HAVE_SYS_IOCTL_H) && SunOS != 40
-#include <sys/ioctl.h>
-#endif
-#ifdef HAVE_SYS_IOCCOM_H
-#include <sys/ioccom.h>
-#endif
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-#include <err.h>
-#include <krb.h>
-#include <kafs.h>
-
-#include <roken.h>
-
-RCSID("$Id: aklog.c,v 1.24 1999/12/02 16:58:28 joda Exp $");
-
-static int debug = 0;
-
-static void
-DEBUG(const char *, ...)
-#ifdef __GNUC__
-__attribute__ ((format (printf, 1, 2)))
-#endif
-;
-
-static void
-DEBUG(const char *fmt, ...)
-{
- va_list ap;
- if (debug) {
- va_start(ap, fmt);
- vwarnx(fmt, ap);
- va_end(ap);
- }
-}
-
-static char *
-expand_cell_name(char *cell)
-{
- FILE *f;
- static char buf[128];
- char *p;
-
- f = fopen(_PATH_CELLSERVDB, "r");
- if(f == NULL)
- return cell;
- while(fgets(buf, sizeof(buf), f) != NULL) {
- if(buf[0] == '>') {
- for(p=buf; *p && !isspace(*p) && *p != '#'; p++)
- ;
- *p = '\0';
- if(strstr(buf, cell)){
- fclose(f);
- return buf + 1;
- }
- }
- buf[0] = 0;
- }
- fclose(f);
- return cell;
-}
-
-static int
-createuser (char *cell)
-{
- char cellbuf[64];
- char name[ANAME_SZ];
- char instance[INST_SZ];
- char realm[REALM_SZ];
- char cmd[1024];
-
- if (cell == NULL) {
- FILE *f;
- int len;
-
- f = fopen (_PATH_THISCELL, "r");
- if (f == NULL)
- err (1, "open(%s)", _PATH_THISCELL);
- if (fgets (cellbuf, sizeof(cellbuf), f) == NULL)
- err (1, "read cellname from %s", _PATH_THISCELL);
- fclose (f);
- len = strlen(cellbuf);
- if (cellbuf[len-1] == '\n')
- cellbuf[len-1] = '\0';
- cell = cellbuf;
- }
-
- if(krb_get_default_principal(name, instance, realm))
- errx (1, "Could not even figure out who you are");
-
- snprintf (cmd, sizeof(cmd),
- "pts createuser %s%s%s@%s -cell %s",
- name, *instance ? "." : "", instance, strlwr(realm),
- cell);
- DEBUG("Executing %s", cmd);
- return system(cmd);
-}
-
-int
-main(int argc, char **argv)
-{
- int i;
- int do_aklog = -1;
- int do_createuser = -1;
- char *cell = NULL;
- char *realm = NULL;
- char cellbuf[64];
-
- set_progname (argv[0]);
-
- if(!k_hasafs())
- exit(1);
-
- for(i = 1; i < argc; i++){
- if(!strncmp(argv[i], "-createuser", 11)){
- do_createuser = do_aklog = 1;
-
- }else if(!strncmp(argv[i], "-c", 2) && i + 1 < argc){
- cell = expand_cell_name(argv[++i]);
- do_aklog = 1;
-
- }else if(!strncmp(argv[i], "-k", 2) && i + 1 < argc){
- realm = argv[++i];
-
- }else if(!strncmp(argv[i], "-p", 2) && i + 1 < argc){
- if(k_afs_cell_of_file(argv[++i], cellbuf, sizeof(cellbuf)))
- errx (1, "No cell found for file \"%s\".", argv[i]);
- else
- cell = cellbuf;
- do_aklog = 1;
-
- }else if(!strncmp(argv[i], "-unlog", 6)){
- exit(k_unlog());
-
- }else if(!strncmp(argv[i], "-hosts", 6)){
- warnx ("Argument -hosts is not implemented.");
-
- }else if(!strncmp(argv[i], "-zsubs", 6)){
- warnx("Argument -zsubs is not implemented.");
-
- }else if(!strncmp(argv[i], "-noprdb", 6)){
- warnx("Argument -noprdb is not implemented.");
-
- }else if(!strncmp(argv[i], "-d", 6)){
- debug = 1;
-
- }else{
- if(!strcmp(argv[i], ".") ||
- !strcmp(argv[i], "..") ||
- strchr(argv[i], '/')){
- DEBUG("I guess that \"%s\" is a filename.", argv[i]);
- if(k_afs_cell_of_file(argv[i], cellbuf, sizeof(cellbuf)))
- errx (1, "No cell found for file \"%s\".", argv[i]);
- else {
- cell = cellbuf;
- DEBUG("The file \"%s\" lives in cell \"%s\".", argv[i], cell);
- }
- }else{
- cell = expand_cell_name(argv[i]);
- DEBUG("I guess that %s is cell %s.", argv[i], cell);
- }
- do_aklog = 1;
- }
- if(do_aklog == 1){
- do_aklog = 0;
- if(krb_afslog(cell, realm))
- errx (1, "Failed getting tokens for cell %s in realm %s.",
- cell?cell:"(local cell)", realm?realm:"(local realm)");
- }
- if(do_createuser == 1) {
- do_createuser = 0;
- if(createuser(cell))
- errx (1, "Failed creating user in cell %s", cell?cell:"(local cell)");
- }
- }
- if(do_aklog == -1 && do_createuser == -1 && krb_afslog(0, realm))
- errx (1, "Failed getting tokens for cell %s in realm %s.",
- cell?cell:"(local cell)", realm?realm:"(local realm)");
- return 0;
-}
diff --git a/crypto/kerberosIV/appl/afsutil/kstring2key.c b/crypto/kerberosIV/appl/afsutil/kstring2key.c
deleted file mode 100644
index 70246f90a66a..000000000000
--- a/crypto/kerberosIV/appl/afsutil/kstring2key.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 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. 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.
- */
-/* $FreeBSD$ */
-
-#include "config.h"
-
-RCSID("$Id: kstring2key.c,v 1.16 1999/12/02 16:58:28 joda Exp $");
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <err.h>
-
-#include <roken.h>
-
-#include <openssl/des.h>
-#include <krb.h>
-
-#define VERIFY 0
-
-static void
-usage(void)
-{
- fprintf(stderr,
- "Usage: %s [-c AFS cellname] [ -5 krb5salt ] [ password ]\n",
- __progname);
- fprintf(stderr,
- " krb5salt is realmname APPEND principal APPEND instance\n");
- exit(1);
-}
-
-static
-void
-krb5_string_to_key(char *str,
- char *salt,
- des_cblock *key)
-{
- char *foo;
-
- asprintf(&foo, "%s%s", str, salt);
- if (foo == NULL)
- errx (1, "malloc: out of memory");
- des_string_to_key(foo, key);
- free (foo);
-}
-
-
-int
-main(int argc, char **argv)
-{
- des_cblock key;
- char buf[1024];
- char *cellname = 0, *salt = 0;
-
- set_progname (argv[0]);
-
- if (argc >= 3 && argv[1][0] == '-' && argv[1][1] == 'c')
- {
- cellname = argv[2];
- argv += 2;
- argc -= 2;
- }
- else if (argc >= 3 && argv[1][0] == '-' && argv[1][1] == '5')
- {
- salt = argv[2];
- argv += 2;
- argc -= 2;
- }
- if (argc >= 2 && argv[1][0] == '-')
- usage();
-
- switch (argc) {
- case 1:
- if (des_read_pw_string(buf, sizeof(buf)-1, "password: ", VERIFY))
- errx (1, "Error reading password.");
- break;
- case 2:
- strlcpy(buf, argv[1], sizeof(buf));
- break;
- default:
- usage();
- break;
- }
-
- if (cellname != 0)
- afs_string_to_key(buf, cellname, &key);
- else if (salt != 0)
- krb5_string_to_key(buf, salt, &key);
- else
- des_string_to_key(buf, &key);
-
- {
- int j;
- unsigned char *tkey = (unsigned char *) &key;
- printf("ascii = ");
- for(j = 0; j < 8; j++)
- if(tkey[j] != '\\' && isalpha(tkey[j]) != 0)
- printf("%c", tkey[j]);
- else
- printf("\\%03o",(unsigned char)tkey[j]);
- printf("\n");
- printf("hex = ");
- for(j = 0; j < 8; j++)
- printf("%02x",(unsigned char)tkey[j]);
- printf("\n");
- }
- exit(0);
-}
diff --git a/crypto/kerberosIV/appl/afsutil/pagsh.c b/crypto/kerberosIV/appl/afsutil/pagsh.c
deleted file mode 100644
index c6704bed451d..000000000000
--- a/crypto/kerberosIV/appl/afsutil/pagsh.c
+++ /dev/null
@@ -1,136 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-RCSID("$Id: pagsh.c,v 1.22 1999/12/02 16:58:28 joda Exp $");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#include <time.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-
-#include <err.h>
-#include <roken.h>
-
-#include <krb.h>
-#include <kafs.h>
-
-int
-main(int argc, char **argv)
-{
- int f;
- char tf[1024];
- char *p;
-
- char *path;
- char **args;
- int i;
-
- do {
- snprintf(tf, sizeof(tf), "%s%u_%u", TKT_ROOT, (unsigned int)getuid(),
- (unsigned int)(getpid()*time(0)));
- f = open(tf, O_CREAT|O_EXCL|O_RDWR);
- } while(f < 0);
- close(f);
- unlink(tf);
- setenv("KRBTKFILE", tf, 1);
-
- i = 0;
-
- args = (char **) malloc((argc + 10)*sizeof(char *));
- if (args == NULL)
- errx (1, "Out of memory allocating %lu bytes",
- (unsigned long)((argc + 10)*sizeof(char *)));
-
- argv++;
-
- if(*argv == NULL) {
- path = getenv("SHELL");
- if(path == NULL){
- struct passwd *pw = k_getpwuid(geteuid());
- path = strdup(pw->pw_shell);
- }
- } else {
- if(strcmp(*argv, "-c") == 0) argv++;
- path = strdup(*argv++);
- }
- if (path == NULL)
- errx (1, "Out of memory copying path");
-
- p=strrchr(path, '/');
- if(p)
- args[i] = strdup(p+1);
- else
- args[i] = strdup(path);
-
- if (args[i++] == NULL)
- errx (1, "Out of memory copying arguments");
-
- while(*argv)
- args[i++] = *argv++;
-
- args[i++] = NULL;
-
- if(k_hasafs())
- k_setpag();
-
- execvp(path, args);
- if (errno == ENOENT) {
- char **sh_args = malloc ((i + 2) * sizeof(char *));
- int j;
-
- if (sh_args == NULL)
- errx (1, "Out of memory copying sh arguments");
- for (j = 1; j < i; ++j)
- sh_args[j + 2] = args[j];
- sh_args[0] = "sh";
- sh_args[1] = "-c";
- sh_args[2] = path;
- execv ("/bin/sh", sh_args);
- }
- perror("execvp");
- exit(1);
-}
diff --git a/crypto/kerberosIV/appl/bsd/osfc2.c b/crypto/kerberosIV/appl/bsd/osfc2.c
deleted file mode 100644
index fbfd742e9224..000000000000
--- a/crypto/kerberosIV/appl/bsd/osfc2.c
+++ /dev/null
@@ -1,79 +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. 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 "bsd_locl.h"
-RCSID("$Id: osfc2.c,v 1.2 1999/12/02 16:58:28 joda Exp $");
-
-int
-do_osfc2_magic(uid_t uid)
-{
-#ifdef HAVE_OSFC2
- struct es_passwd *epw;
- char *argv[2];
-
- /* fake */
- argv[0] = (char*)__progname;
- argv[1] = NULL;
- set_auth_parameters(1, argv);
-
- epw = getespwuid(uid);
- if(epw == NULL) {
- syslog(LOG_AUTHPRIV|LOG_NOTICE,
- "getespwuid failed for %d", uid);
- printf("Sorry.\n");
- return 1;
- }
- /* We don't check for auto-retired, foo-retired,
- bar-retired, or any other kind of retired accounts
- here; neither do we check for time-locked accounts, or
- any other kind of serious C2 mumbo-jumbo. We do,
- however, call setluid, since failing to do so it not
- very good (take my word for it). */
-
- if(!epw->uflg->fg_uid) {
- syslog(LOG_AUTHPRIV|LOG_NOTICE,
- "attempted login by %s (has no uid)", epw->ufld->fd_name);
- printf("Sorry.\n");
- return 1;
- }
- setluid(epw->ufld->fd_uid);
- if(getluid() != epw->ufld->fd_uid) {
- syslog(LOG_AUTHPRIV|LOG_NOTICE,
- "failed to set LUID for %s (%d)",
- epw->ufld->fd_name, epw->ufld->fd_uid);
- printf("Sorry.\n");
- return 1;
- }
-#endif /* HAVE_OSFC2 */
- return 0;
-}
diff --git a/crypto/kerberosIV/appl/ftp/ChangeLog b/crypto/kerberosIV/appl/ftp/ChangeLog
deleted file mode 100644
index e2e1bb5f4dfa..000000000000
--- a/crypto/kerberosIV/appl/ftp/ChangeLog
+++ /dev/null
@@ -1,376 +0,0 @@
-1999-11-30 Assar Westerlund <assar@sics.se>
-
- * ftpd/ftpd.c (getdatasock): make sure to keep the port-number of
- the outgoing connections. It has to be `ftp-data' or some people
- might get upset.
-
- * ftpd/ftpd.c (args): set correct variable when `-l' so that
- logging actually works
-
-1999-11-29 Assar Westerlund <assar@sics.se>
-
- * ftp/security.c (sec_login): check return value from realloc
- (sec_end): set app_data to NULL
-
-1999-11-25 Assar Westerlund <assar@sics.se>
-
- * ftp/krb4.c (krb4_auth): obtain the `local' address when doing
- NAT. also turn on passive mode. From <thn@stacken.kth.se>
-
-1999-11-20 Assar Westerlund <assar@sics.se>
-
- * ftpd/ls.c (make_fileinfo): cast to allow for non-const
- prototypes of readlink
-
-1999-11-12 Assar Westerlund <assar@sics.se>
-
- * ftpd/ftpd.c (args): use arg_counter for `l'
-
-1999-11-04 Assar Westerlund <assar@sics.se>
-
- * ftpd/ls.c (S_ISSOCK, S_ISLNK): fallback definitions for systems
- that don't have them (such as ultrix)
-
-1999-10-29 Assar Westerlund <assar@sics.se>
-
- * ftpd/ls.c (make_fileinfo): cast uid's and gid's to unsigned in
- printf, we don't know what types they might be.
- (lstat_file): conditionalize the kafs part on KRB4
-
- * ftpd/ftpd_locl.h: <sys/ioccom.h> is needed for kafs.h
-
-1999-10-28 Assar Westerlund <assar@sics.se>
-
- * ftpd/ls.c (lstat_file): don't set st_mode, it should already be
- correct
-
- * ftpd/ls.c: don't use warnx to print errors
-
- * ftpd/ls.c (builtin_ls): fix typo, 'd' shouldn't imply 'f'
-
- * ftpd/ls.c (lstat_file): new function for avoiding stating AFS
- mount points. From Love <lha@s3.kth.se>
- (list_files): use `lstat_file'
-
- * ftpd/ftpd.c: some const-poisoning
-
- * ftpd/ftpd.c (args): add `-B' as an alias for `--builtin-ls' to
- allow for stupid inetds that only support two arguments. From
- Love <lha@s3.kth.se>
-
-1999-10-26 Assar Westerlund <assar@sics.se>
-
- * ftpd/ftpcmd.y (help): it's unnecessary to interpret help strings
- as printf commands
-
- * ftpd/ftpd.c (show_issue): don't interpret contents of
- /etc/issue* as printf commands. From Brian A May
- <bmay@dgs.monash.edu.au>
-
-1999-10-21 Johan Danielsson <joda@pdc.kth.se>
-
- * ftpd/kauth.c (kauth): complain if protection level isn't
- `private'
-
- * ftp/krb4.c (krb4_decode): syslog failure reason
-
- * ftp/kauth.c (kauth): set private level earlier
-
- * ftp/security.c: get_command_prot; (sec_prot): partially match
- `command' and `data'
-
-1999-10-18 Johan Danielsson <joda@pdc.kth.se>
-
- * ftpd/ftpd.c: change `-l' flag to use arg_collect (this makes
- `-ll' work again)
-
- * ftpd/ftpd.c (list_file): pass filename to ls
-
-1999-10-04 Johan Danielsson <joda@pdc.kth.se>
-
- * ftpd/ftpcmd.y: FEAT
-
-1999-10-03 Assar Westerlund <assar@sics.se>
-
- * ftpd/ls.c: fall-back definitions for constans and casts for
- printfs
-
-1999-10-03 Johan Danielsson <joda@pdc.kth.se>
-
- * ftpd/ftpd.c (main): make this use getarg; add `list_file'
-
- * ftpd/ftpcmd.y (LIST): call list_file
-
- * ftpd/ls.c: add simple built-in ls
-
- * ftp/security.c: add `sec_vfprintf2' and `sec_fprintf2' that
- prints to the data stream
-
- * ftp/kauth.c (kauth): make sure we're using private protection
- level
-
- * ftp/security.c (set_command_prot): set command protection level
-
- * ftp/security.c: make it possible to set the command protection
- level with `prot'
-
-1999-09-30 Assar Westerlund <assar@sics.se>
-
- * ftpd/ftpd_locl.h: add prototype for fclose to make sunos happy
-
-1999-08-19 Johan Danielsson <joda@pdc.kth.se>
-
- * ftpd/ftpd.c (do_login): show issue-file
- (send_data): change handling of zero-byte files
-
-1999-08-18 Assar Westerlund <assar@sics.se>
-
- * ftp/cmds.c (getit): be more suspicious when parsing the result
- of MDTM. Do the comparison of timestamps correctly.
-
-1999-08-13 Assar Westerlund <assar@sics.se>
-
- * ftpd/ftpd.c (send_data): avoid calling mmap with `len == 0'.
- Some mmap:s rather dislike that (Solaris) and some munmap (Linux)
- get grumpy later.
-
- * ftp/ftp.c (copy_stream): avoid calling mmap with `len == 0'.
- Some mmap:s rather dislike that (Solaris) and some munmap (Linux)
- get grumpy later.
-
-1999-08-03 Assar Westerlund <assar@sics.se>
-
- * ftp/ftp.c (active_mode): hide failure of EPRT by setting verbose
-
- * ftp/gssapi.c (gss_auth): initialize application_data in bindings
-
-1999-08-02 Assar Westerlund <assar@sics.se>
-
- * ftpd/ftpcmd.y: save file names when doing commands that might
- get aborted (and longjmp:ed out of) to avoid overwriting them also
- remove extra closing brace
-
-1999-08-01 Johan Danielsson <joda@pdc.kth.se>
-
- * ftpd/ftpcmd.y: change `site find' to `site locate' (to match
- what it does, and other implementations) keep find as an alias
-
-1999-07-28 Assar Westerlund <assar@sics.se>
-
- * common/socket.c: moved to roken
-
- * common/socket.c: new file with generic socket functions
-
- * ftpd/ftpd.c: make it more AF-neutral and v6-capable
-
- * ftpd/ftpcmd.y: add EPRT and EPSV
-
- * ftpd/extern.h: update prototypes and variables
-
- * ftp/krb4.c: update to new types of addresses
-
- * ftp/gssapi.c: add support for both AF_INET and AF_INET6
- addresses
-
- * ftp/ftp.c: make it more AF-neutral and v6-capable
-
- * ftp/extern.h (hookup): change prototype
-
- * common/common.h: add prototypes for functions in socket.c
-
- * common/Makefile.am (libcommon_a_SOURCES): add socket.c
-
- * ftp/gssapi.c (gss_auth): check return value from
- `gss_import_name' and print error messages if it fails
-
-1999-06-15 Assar Westerlund <assar@sics.se>
-
- * ftp/krb4.c (krb4_auth): type correctness
-
-1999-06-02 Johan Danielsson <joda@pdc.kth.se>
-
- * ftp/ftp.c (sendrequest): lmode != rmode
-
-1999-05-21 Assar Westerlund <assar@sics.se>
-
- * ftp/extern.h (sendrequest): update prototype
-
- * ftp/cmds.c: update calls to sendrequest and recvrequest to send
- "b" when appropriate
-
- * ftp/ftp.c (sendrequest): add argument for mode to open file in.
-
-1999-05-08 Assar Westerlund <assar@sics.se>
-
- * ftpd/ftpcmd.y: rename getline -> ftpd_getline
-
- * ftp/main.c (makeargv): fill in unused slots with NULL
-
-Thu Apr 8 15:06:40 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * ftpd/ftpd.c: remove definition of KRB_VERIFY_USER (moved to
- config.h)
-
-Wed Apr 7 16:15:21 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * ftp/gssapi.c (gss_auth): call gss_display_status to get a sane
- error message; return AUTH_{CONTINUE,ERROR}, where appropriate
-
- * ftp/krb4.c: return AUTH_{CONTINUE,ERROR}, where appropriate
-
- * ftp/security.c (sec_login): if mechanism returns AUTH_CONTINUE,
- just continue with the next mechanism, this fixes the case of
- having GSSAPI fail because of non-existant of expired tickets
-
- * ftp/security.h: add AUTH_{OK,CONTINUE,ERROR}
-
-Thu Apr 1 16:59:04 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * ftpd/Makefile.am: don't run check-local
-
- * ftp/Makefile.am: don't run check-local
-
-Mon Mar 22 22:15:18 1999 Assar Westerlund <assar@sics.se>
-
- * ftpd/ftpd.c (pass): fall-back for KRB_VERIFY_SECURE
-
- * ftpd/ftpd.c (pass): 1 -> KRB_VERIFY_SECURE
-
-Thu Mar 18 12:07:09 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * ftpd/Makefile.am: clean ftpcmd.c
-
- * ftpd/ftpd_locl.h: remove krb5.h (breaks in ftpcmd.y)
-
- * ftpd/ftpd.c: move include of krb5.h here
-
- * ftpd/Makefile.am: include Makefile.am.common
-
- * Makefile.am: include Makefile.am.common
-
- * ftp/Makefile.am: include Makefile.am.common
-
- * common/Makefile.am: include Makefile.am.common
-
-Tue Mar 16 22:28:37 1999 Assar Westerlund <assar@sics.se>
-
- * ftpd/ftpd_locl.h: add krb5.h to get heimdal_version
-
- * ftpd/ftpd.c: krb_verify_user_multiple -> krb_verify_user
-
-Thu Mar 11 14:54:59 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * ftp/Makefile.in: WFLAGS
-
- * ftp/ruserpass.c: add some if-braces
-
-Wed Mar 10 20:02:55 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * ftpd/ftpd_locl.h: remove ifdef HAVE_FNMATCH
-
-Mon Mar 8 21:29:24 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * ftpd/ftpd.c: re-add version in greeting message
-
-Mon Mar 1 10:49:38 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * ftpd/logwtmp.c: HAVE_UT_* -> HAVE_STRUCT_UTMP*_UT_*
-
-Mon Feb 22 19:20:51 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * common/Makefile.in: remove glob
-
-Sat Feb 13 17:19:35 1999 Assar Westerlund <assar@sics.se>
-
- * ftpd/ftpd.c (match): remove #ifdef HAVE_FNMATCH. We have a
- fnmatch implementation in roken and therefore always have it.
-
- * ftp/ftp.c (copy_stream): initialize `werr'
-
-Wed Jan 13 23:52:57 1999 Assar Westerlund <assar@sics.se>
-
- * ftpd/ftpcmd.y: moved all check_login and check_login_no_guest to
- the end of the rules to ensure we don't generate several
- (independent) error messages. once again, having a yacc-grammar
- for FTP with embedded actions doesn't strike me as the most
- optimal way of doing it.
-
-Tue Dec 1 14:44:29 1998 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * ftpd/Makefile.am: link with extra libs for aix
-
-Sun Nov 22 10:28:20 1998 Assar Westerlund <assar@sics.se>
-
- * ftpd/ftpd.c (retrying): support on-the-fly decompression
-
- * ftpd/Makefile.in (WFLAGS): set
-
- * ftp/ruserpass.c (guess_domain): new function
- (ruserpass): use it
-
- * common/Makefile.in (WFLAGS): set
-
- * Makefile.in (WFLAGS): set
-
-Sat Nov 21 23:13:03 1998 Assar Westerlund <assar@sics.se>
-
- * ftp/security.c: some more type correctness.
-
- * ftp/gssapi.c (gss_adat): more braces to shut up warnings
-
-Wed Nov 18 21:47:55 1998 Assar Westerlund <assar@sics.se>
-
- * ftp/main.c (main): new option `-p' for enable passive mode.
-
-Mon Nov 2 01:57:49 1998 Assar Westerlund <assar@sics.se>
-
- * ftp/ftp.c (getreply): remove extra `break'
-
- * ftp/gssapi.c (gss_auth): fixo typo(copyo?)
-
- * ftp/security.c (sec_login): fix loop and return value
-
-Tue Sep 1 16:56:42 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * ftp/cmds.c (quote1): fix % quoting bug
-
-Fri Aug 14 17:10:06 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * ftp/krb4.c: krb_put_int -> KRB_PUT_INT
-
-Tue Jun 30 18:07:15 1998 Assar Westerlund <assar@sics.se>
-
- * ftp/security.c (auth): free `app_data'
- (sec_end): only destroy if it was initialized
-
-Tue Jun 9 21:01:59 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * ftp/krb4.c: pass client address to krb_rd_req
-
-Sat May 16 00:02:07 1998 Assar Westerlund <assar@sics.se>
-
- * ftpd/Makefile.am: link with DBLIB
-
-Tue May 12 14:15:32 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * ftp/gssapi.c: Save client name for userok().
-
- * ftpd/gss_userok.c: Userok for gssapi.
-
-Fri May 1 07:15:01 1998 Assar Westerlund <assar@sics.se>
-
- * ftp/ftp.c: unifdef -DHAVE_H_ERRNO
-
-Fri Mar 27 00:46:07 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * Make compile w/o krb4.
-
-Thu Mar 26 03:49:12 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * ftp/*, ftpd/*: Changes for new framework.
-
- * ftp/gssapi.c: GSS-API backend for the new security framework.
-
- * ftp/krb4.c: Updated for new framework.
-
- * ftp/security.{c,h}: New unified security framework.
diff --git a/crypto/kerberosIV/appl/ftp/Makefile.am b/crypto/kerberosIV/appl/ftp/Makefile.am
deleted file mode 100644
index f8831a308d03..000000000000
--- a/crypto/kerberosIV/appl/ftp/Makefile.am
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/appl/ftp/common/Makefile.am b/crypto/kerberosIV/appl/ftp/common/Makefile.am
deleted file mode 100644
index 4fab07b9a1ae..000000000000
--- a/crypto/kerberosIV/appl/ftp/common/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-# $Id: Makefile.am,v 1.9 1999/07/28 21:15:06 assar Exp $
-
-include $(top_srcdir)/Makefile.am.common
-
-INCLUDES += $(INCLUDE_krb4)
-
-noinst_LIBRARIES = libcommon.a
-
-libcommon_a_SOURCES = \
- sockbuf.c \
- buffer.c \
- common.h
diff --git a/crypto/kerberosIV/appl/ftp/ftp/Makefile.am b/crypto/kerberosIV/appl/ftp/ftp/Makefile.am
deleted file mode 100644
index 081465a50416..000000000000
--- a/crypto/kerberosIV/appl/ftp/ftp/Makefile.am
+++ /dev/null
@@ -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)
diff --git a/crypto/kerberosIV/appl/ftp/ftp/gssapi.c b/crypto/kerberosIV/appl/ftp/ftp/gssapi.c
deleted file mode 100644
index d06b5d62d29d..000000000000
--- a/crypto/kerberosIV/appl/ftp/ftp/gssapi.c
+++ /dev/null
@@ -1,379 +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. 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 FTP_SERVER
-#include "ftpd_locl.h"
-#else
-#include "ftp_locl.h"
-#endif
-#include <gssapi.h>
-
-RCSID("$Id: gssapi.c,v 1.13 1999/12/02 16:58:29 joda Exp $");
-
-struct gss_data {
- gss_ctx_id_t context_hdl;
- char *client_name;
-};
-
-static int
-gss_init(void *app_data)
-{
- struct gss_data *d = app_data;
- d->context_hdl = GSS_C_NO_CONTEXT;
- return 0;
-}
-
-static int
-gss_check_prot(void *app_data, int level)
-{
- if(level == prot_confidential)
- return -1;
- return 0;
-}
-
-static int
-gss_decode(void *app_data, void *buf, int len, int level)
-{
- OM_uint32 maj_stat, min_stat;
- gss_buffer_desc input, output;
- gss_qop_t qop_state;
- int conf_state;
- struct gss_data *d = app_data;
-
- input.length = len;
- input.value = buf;
- maj_stat = gss_unwrap (&min_stat,
- d->context_hdl,
- &input,
- &output,
- &conf_state,
- &qop_state);
- if(GSS_ERROR(maj_stat))
- return -1;
- memmove(buf, output.value, output.length);
- return output.length;
-}
-
-static int
-gss_overhead(void *app_data, int level, int len)
-{
- return 100; /* dunno? */
-}
-
-
-static int
-gss_encode(void *app_data, void *from, int length, int level, void **to)
-{
- OM_uint32 maj_stat, min_stat;
- gss_buffer_desc input, output;
- int conf_state;
- struct gss_data *d = app_data;
-
- input.length = length;
- input.value = from;
- maj_stat = gss_wrap (&min_stat,
- d->context_hdl,
- level == prot_private,
- GSS_C_QOP_DEFAULT,
- &input,
- &conf_state,
- &output);
- *to = output.value;
- return output.length;
-}
-
-static void
-sockaddr_to_gss_address (const struct sockaddr *sa,
- OM_uint32 *addr_type,
- gss_buffer_desc *gss_addr)
-{
- switch (sa->sa_family) {
-#ifdef HAVE_IPV6
- case AF_INET6 : {
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
-
- gss_addr->length = 16;
- gss_addr->value = &sin6->sin6_addr;
- *addr_type = GSS_C_AF_INET6;
- break;
- }
-#endif
- case AF_INET : {
- struct sockaddr_in *sin = (struct sockaddr_in *)sa;
-
- gss_addr->length = 4;
- gss_addr->value = &sin->sin_addr;
- *addr_type = GSS_C_AF_INET;
- break;
- }
- default :
- errx (1, "unknown address family %d", sa->sa_family);
-
- }
-}
-
-/* end common stuff */
-
-#ifdef FTP_SERVER
-
-static int
-gss_adat(void *app_data, void *buf, size_t len)
-{
- char *p = NULL;
- gss_buffer_desc input_token, output_token;
- OM_uint32 maj_stat, min_stat;
- gss_name_t client_name;
- struct gss_data *d = app_data;
-
- gss_channel_bindings_t bindings = malloc(sizeof(*bindings));
- sockaddr_to_gss_address (his_addr,
- &bindings->initiator_addrtype,
- &bindings->initiator_address);
- sockaddr_to_gss_address (ctrl_addr,
- &bindings->acceptor_addrtype,
- &bindings->acceptor_address);
-
- bindings->application_data.length = 0;
- bindings->application_data.value = NULL;
-
- input_token.value = buf;
- input_token.length = len;
-
- maj_stat = gss_accept_sec_context (&min_stat,
- &d->context_hdl,
- GSS_C_NO_CREDENTIAL,
- &input_token,
- bindings,
- &client_name,
- NULL,
- &output_token,
- NULL,
- NULL,
- NULL);
-
- if(output_token.length) {
- if(base64_encode(output_token.value, output_token.length, &p) < 0) {
- reply(535, "Out of memory base64-encoding.");
- return -1;
- }
- }
- if(maj_stat == GSS_S_COMPLETE){
- char *name;
- gss_buffer_desc export_name;
- maj_stat = gss_export_name(&min_stat, client_name, &export_name);
- if(maj_stat != 0) {
- reply(500, "Error exporting name");
- goto out;
- }
- name = realloc(export_name.value, export_name.length + 1);
- if(name == NULL) {
- reply(500, "Out of memory");
- free(export_name.value);
- goto out;
- }
- name[export_name.length] = '\0';
- d->client_name = name;
- if(p)
- reply(235, "ADAT=%s", p);
- else
- reply(235, "ADAT Complete");
- sec_complete = 1;
-
- } else if(maj_stat == GSS_S_CONTINUE_NEEDED) {
- if(p)
- reply(335, "ADAT=%s", p);
- else
- reply(335, "OK, need more data");
- } else
- reply(535, "foo?");
-out:
- free(p);
- return 0;
-}
-
-int gss_userok(void*, char*);
-
-struct sec_server_mech gss_server_mech = {
- "GSSAPI",
- sizeof(struct gss_data),
- gss_init, /* init */
- NULL, /* end */
- gss_check_prot,
- gss_overhead,
- gss_encode,
- gss_decode,
- /* */
- NULL,
- gss_adat,
- NULL, /* pbsz */
- NULL, /* ccc */
- gss_userok
-};
-
-#else /* FTP_SERVER */
-
-extern struct sockaddr *hisctladdr, *myctladdr;
-
-static int
-gss_auth(void *app_data, char *host)
-{
-
- OM_uint32 maj_stat, min_stat;
- gss_buffer_desc name;
- gss_name_t target_name;
- gss_buffer_desc input, output_token;
- int context_established = 0;
- char *p;
- int n;
- gss_channel_bindings_t bindings;
- struct gss_data *d = app_data;
-
- name.length = asprintf((char**)&name.value, "ftp@%s", host);
- maj_stat = gss_import_name(&min_stat,
- &name,
- GSS_C_NT_HOSTBASED_SERVICE,
- &target_name);
- if (GSS_ERROR(maj_stat)) {
- OM_uint32 new_stat;
- OM_uint32 msg_ctx = 0;
- gss_buffer_desc status_string;
-
- gss_display_status(&new_stat,
- min_stat,
- GSS_C_MECH_CODE,
- GSS_C_NO_OID,
- &msg_ctx,
- &status_string);
- printf("Error importing name %s: %s\n",
- (char *)name.value,
- (char *)status_string.value);
- gss_release_buffer(&new_stat, &status_string);
- return AUTH_ERROR;
- }
- free(name.value);
-
-
- input.length = 0;
- input.value = NULL;
-
- bindings = malloc(sizeof(*bindings));
-
- sockaddr_to_gss_address (myctladdr,
- &bindings->initiator_addrtype,
- &bindings->initiator_address);
- sockaddr_to_gss_address (hisctladdr,
- &bindings->acceptor_addrtype,
- &bindings->acceptor_address);
-
- bindings->application_data.length = 0;
- bindings->application_data.value = NULL;
-
- while(!context_established) {
- maj_stat = gss_init_sec_context(&min_stat,
- GSS_C_NO_CREDENTIAL,
- &d->context_hdl,
- target_name,
- GSS_C_NO_OID,
- GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG,
- 0,
- bindings,
- &input,
- NULL,
- &output_token,
- NULL,
- NULL);
- if (GSS_ERROR(maj_stat)) {
- OM_uint32 new_stat;
- OM_uint32 msg_ctx = 0;
- gss_buffer_desc status_string;
-
- gss_display_status(&new_stat,
- min_stat,
- GSS_C_MECH_CODE,
- GSS_C_NO_OID,
- &msg_ctx,
- &status_string);
- printf("Error initializing security context: %s\n",
- (char*)status_string.value);
- gss_release_buffer(&new_stat, &status_string);
- return AUTH_CONTINUE;
- }
-
- gss_release_buffer(&min_stat, &input);
- if (output_token.length != 0) {
- base64_encode(output_token.value, output_token.length, &p);
- gss_release_buffer(&min_stat, &output_token);
- n = command("ADAT %s", p);
- free(p);
- }
- if (GSS_ERROR(maj_stat)) {
- if (d->context_hdl != GSS_C_NO_CONTEXT)
- gss_delete_sec_context (&min_stat,
- &d->context_hdl,
- GSS_C_NO_BUFFER);
- break;
- }
- if (maj_stat & GSS_S_CONTINUE_NEEDED) {
- p = strstr(reply_string, "ADAT=");
- if(p == NULL){
- printf("Error: expected ADAT in reply.\n");
- return AUTH_ERROR;
- } else {
- p+=5;
- input.value = malloc(strlen(p));
- input.length = base64_decode(p, input.value);
- }
- } else {
- if(code != 235) {
- printf("Unrecognized response code: %d\n", code);
- return AUTH_ERROR;
- }
- context_established = 1;
- }
- }
- return AUTH_OK;
-}
-
-struct sec_client_mech gss_client_mech = {
- "GSSAPI",
- sizeof(struct gss_data),
- gss_init,
- gss_auth,
- NULL, /* end */
- gss_check_prot,
- gss_overhead,
- gss_encode,
- gss_decode,
-};
-
-#endif /* FTP_SERVER */
diff --git a/crypto/kerberosIV/appl/ftp/ftp/security.c b/crypto/kerberosIV/appl/ftp/ftp/security.c
deleted file mode 100644
index ca7eb0036a53..000000000000
--- a/crypto/kerberosIV/appl/ftp/ftp/security.c
+++ /dev/null
@@ -1,785 +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. 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 FTP_SERVER
-#include "ftpd_locl.h"
-#else
-#include "ftp_locl.h"
-#endif
-
-RCSID("$Id: security.c,v 1.15 1999/12/02 16:58:30 joda Exp $");
-
-static enum protection_level command_prot;
-static enum protection_level data_prot;
-static size_t buffer_size;
-
-struct buffer {
- void *data;
- size_t size;
- size_t index;
- int eof_flag;
-};
-
-static struct buffer in_buffer, out_buffer;
-int sec_complete;
-
-static struct {
- enum protection_level level;
- const char *name;
-} level_names[] = {
- { prot_clear, "clear" },
- { prot_safe, "safe" },
- { prot_confidential, "confidential" },
- { prot_private, "private" }
-};
-
-static const char *
-level_to_name(enum protection_level level)
-{
- int i;
- for(i = 0; i < sizeof(level_names) / sizeof(level_names[0]); i++)
- if(level_names[i].level == level)
- return level_names[i].name;
- return "unknown";
-}
-
-#ifndef FTP_SERVER /* not used in server */
-static enum protection_level
-name_to_level(const char *name)
-{
- int i;
- for(i = 0; i < sizeof(level_names) / sizeof(level_names[0]); i++)
- if(!strncasecmp(level_names[i].name, name, strlen(name)))
- return level_names[i].level;
- return (enum protection_level)-1;
-}
-#endif
-
-#ifdef FTP_SERVER
-
-static struct sec_server_mech *mechs[] = {
-#ifdef KRB5
- &gss_server_mech,
-#endif
-#ifdef KRB4
- &krb4_server_mech,
-#endif
- NULL
-};
-
-static struct sec_server_mech *mech;
-
-#else
-
-static struct sec_client_mech *mechs[] = {
-#ifdef KRB5
- &gss_client_mech,
-#endif
-#ifdef KRB4
- &krb4_client_mech,
-#endif
- NULL
-};
-
-static struct sec_client_mech *mech;
-
-#endif
-
-static void *app_data;
-
-int
-sec_getc(FILE *F)
-{
- if(sec_complete && data_prot) {
- char c;
- if(sec_read(fileno(F), &c, 1) <= 0)
- return EOF;
- return c;
- } else
- return getc(F);
-}
-
-static int
-block_read(int fd, void *buf, size_t len)
-{
- unsigned char *p = buf;
- int b;
- while(len) {
- b = read(fd, p, len);
- if (b == 0)
- return 0;
- else if (b < 0)
- return -1;
- len -= b;
- p += b;
- }
- return p - (unsigned char*)buf;
-}
-
-static int
-block_write(int fd, void *buf, size_t len)
-{
- unsigned char *p = buf;
- int b;
- while(len) {
- b = write(fd, p, len);
- if(b < 0)
- return -1;
- len -= b;
- p += b;
- }
- return p - (unsigned char*)buf;
-}
-
-static int
-sec_get_data(int fd, struct buffer *buf, int level)
-{
- int len;
- int b;
-
- b = block_read(fd, &len, sizeof(len));
- if (b == 0)
- return 0;
- else if (b < 0)
- return -1;
- len = ntohl(len);
- buf->data = realloc(buf->data, len);
- b = block_read(fd, buf->data, len);
- if (b == 0)
- return 0;
- else if (b < 0)
- return -1;
- buf->size = (*mech->decode)(app_data, buf->data, len, data_prot);
- buf->index = 0;
- return 0;
-}
-
-static size_t
-buffer_read(struct buffer *buf, void *data, size_t len)
-{
- len = min(len, buf->size - buf->index);
- memcpy(data, (char*)buf->data + buf->index, len);
- buf->index += len;
- return len;
-}
-
-static size_t
-buffer_write(struct buffer *buf, void *data, size_t len)
-{
- if(buf->index + len > buf->size) {
- void *tmp;
- if(buf->data == NULL)
- tmp = malloc(1024);
- else
- tmp = realloc(buf->data, buf->index + len);
- if(tmp == NULL)
- return -1;
- buf->data = tmp;
- buf->size = buf->index + len;
- }
- memcpy((char*)buf->data + buf->index, data, len);
- buf->index += len;
- return len;
-}
-
-int
-sec_read(int fd, void *data, int length)
-{
- size_t len;
- int rx = 0;
-
- if(sec_complete == 0 || data_prot == 0)
- return read(fd, data, length);
-
- if(in_buffer.eof_flag){
- in_buffer.eof_flag = 0;
- return 0;
- }
-
- len = buffer_read(&in_buffer, data, length);
- length -= len;
- rx += len;
- data = (char*)data + len;
-
- while(length){
- if(sec_get_data(fd, &in_buffer, data_prot) < 0)
- return -1;
- if(in_buffer.size == 0) {
- if(rx)
- in_buffer.eof_flag = 1;
- return rx;
- }
- len = buffer_read(&in_buffer, data, length);
- length -= len;
- rx += len;
- data = (char*)data + len;
- }
- return rx;
-}
-
-static int
-sec_send(int fd, char *from, int length)
-{
- int bytes;
- void *buf;
- bytes = (*mech->encode)(app_data, from, length, data_prot, &buf);
- bytes = htonl(bytes);
- block_write(fd, &bytes, sizeof(bytes));
- block_write(fd, buf, ntohl(bytes));
- free(buf);
- return length;
-}
-
-int
-sec_fflush(FILE *F)
-{
- if(data_prot != prot_clear) {
- if(out_buffer.index > 0){
- sec_write(fileno(F), out_buffer.data, out_buffer.index);
- out_buffer.index = 0;
- }
- sec_send(fileno(F), NULL, 0);
- }
- fflush(F);
- return 0;
-}
-
-int
-sec_write(int fd, char *data, int length)
-{
- int len = buffer_size;
- int tx = 0;
-
- if(data_prot == prot_clear)
- return write(fd, data, length);
-
- len -= (*mech->overhead)(app_data, data_prot, len);
- while(length){
- if(length < len)
- len = length;
- sec_send(fd, data, len);
- length -= len;
- data += len;
- tx += len;
- }
- return tx;
-}
-
-int
-sec_vfprintf2(FILE *f, const char *fmt, va_list ap)
-{
- char *buf;
- int ret;
- if(data_prot == prot_clear)
- return vfprintf(f, fmt, ap);
- else {
- vasprintf(&buf, fmt, ap);
- ret = buffer_write(&out_buffer, buf, strlen(buf));
- free(buf);
- return ret;
- }
-}
-
-int
-sec_fprintf2(FILE *f, const char *fmt, ...)
-{
- int ret;
- va_list ap;
- va_start(ap, fmt);
- ret = sec_vfprintf2(f, fmt, ap);
- va_end(ap);
- return ret;
-}
-
-int
-sec_putc(int c, FILE *F)
-{
- char ch = c;
- if(data_prot == prot_clear)
- return putc(c, F);
-
- buffer_write(&out_buffer, &ch, 1);
- if(c == '\n' || out_buffer.index >= 1024 /* XXX */) {
- sec_write(fileno(F), out_buffer.data, out_buffer.index);
- out_buffer.index = 0;
- }
- return c;
-}
-
-int
-sec_read_msg(char *s, int level)
-{
- int len;
- char *buf;
- int code;
-
- buf = malloc(strlen(s));
- len = base64_decode(s + 4, buf); /* XXX */
-
- len = (*mech->decode)(app_data, buf, len, level);
- if(len < 0)
- return -1;
-
- buf[len] = '\0';
-
- if(buf[3] == '-')
- code = 0;
- else
- sscanf(buf, "%d", &code);
- if(buf[len-1] == '\n')
- buf[len-1] = '\0';
- strcpy(s, buf);
- free(buf);
- return code;
-}
-
-int
-sec_vfprintf(FILE *f, const char *fmt, va_list ap)
-{
- char *buf;
- void *enc;
- int len;
- if(!sec_complete)
- return vfprintf(f, fmt, ap);
-
- vasprintf(&buf, fmt, ap);
- len = (*mech->encode)(app_data, buf, strlen(buf), command_prot, &enc);
- free(buf);
- if(len < 0) {
- printf("Failed to encode command.\n");
- return -1;
- }
- if(base64_encode(enc, len, &buf) < 0){
- printf("Out of memory base64-encoding.\n");
- return -1;
- }
-#ifdef FTP_SERVER
- if(command_prot == prot_safe)
- fprintf(f, "631 %s\r\n", buf);
- else if(command_prot == prot_private)
- fprintf(f, "632 %s\r\n", buf);
- else if(command_prot == prot_confidential)
- fprintf(f, "633 %s\r\n", buf);
-#else
- if(command_prot == prot_safe)
- fprintf(f, "MIC %s", buf);
- else if(command_prot == prot_private)
- fprintf(f, "ENC %s", buf);
- else if(command_prot == prot_confidential)
- fprintf(f, "CONF %s", buf);
-#endif
- free(buf);
- return 0;
-}
-
-int
-sec_fprintf(FILE *f, const char *fmt, ...)
-{
- va_list ap;
- int ret;
- va_start(ap, fmt);
- ret = sec_vfprintf(f, fmt, ap);
- va_end(ap);
- return ret;
-}
-
-/* end common stuff */
-
-#ifdef FTP_SERVER
-
-void
-auth(char *auth_name)
-{
- int i;
- for(i = 0; (mech = mechs[i]) != NULL; i++){
- if(!strcasecmp(auth_name, mech->name)){
- app_data = realloc(app_data, mech->size);
- if(mech->init && (*mech->init)(app_data) != 0) {
- reply(431, "Unable to accept %s at this time", mech->name);
- return;
- }
- if(mech->auth) {
- (*mech->auth)(app_data);
- return;
- }
- if(mech->adat)
- reply(334, "Send authorization data.");
- else
- reply(234, "Authorization complete.");
- return;
- }
- }
- free (app_data);
- reply(504, "%s is unknown to me", auth_name);
-}
-
-void
-adat(char *auth_data)
-{
- if(mech && !sec_complete) {
- void *buf = malloc(strlen(auth_data));
- size_t len;
- len = base64_decode(auth_data, buf);
- (*mech->adat)(app_data, buf, len);
- free(buf);
- } else
- reply(503, "You must %sissue an AUTH first.", mech ? "re-" : "");
-}
-
-void pbsz(int size)
-{
- size_t new = size;
- if(!sec_complete)
- reply(503, "Incomplete security data exchange.");
- if(mech->pbsz)
- new = (*mech->pbsz)(app_data, size);
- if(buffer_size != new){
- buffer_size = size;
- }
- if(new != size)
- reply(200, "PBSZ=%lu", (unsigned long)new);
- else
- reply(200, "OK");
-}
-
-void
-prot(char *pl)
-{
- int p = -1;
-
- if(buffer_size == 0){
- reply(503, "No protection buffer size negotiated.");
- return;
- }
-
- if(!strcasecmp(pl, "C"))
- p = prot_clear;
- else if(!strcasecmp(pl, "S"))
- p = prot_safe;
- else if(!strcasecmp(pl, "E"))
- p = prot_confidential;
- else if(!strcasecmp(pl, "P"))
- p = prot_private;
- else {
- reply(504, "Unrecognized protection level.");
- return;
- }
-
- if(sec_complete){
- if((*mech->check_prot)(app_data, p)){
- reply(536, "%s does not support %s protection.",
- mech->name, level_to_name(p));
- }else{
- data_prot = (enum protection_level)p;
- reply(200, "Data protection is %s.", level_to_name(p));
- }
- }else{
- reply(503, "Incomplete security data exchange.");
- }
-}
-
-void ccc(void)
-{
- if(sec_complete){
- if(mech->ccc && (*mech->ccc)(app_data) == 0)
- command_prot = data_prot = prot_clear;
- else
- reply(534, "You must be joking.");
- }else
- reply(503, "Incomplete security data exchange.");
-}
-
-void mec(char *msg, enum protection_level level)
-{
- void *buf;
- size_t len;
- if(!sec_complete) {
- reply(503, "Incomplete security data exchange.");
- return;
- }
- buf = malloc(strlen(msg) + 2); /* XXX go figure out where that 2
- comes from :-) */
- len = base64_decode(msg, buf);
- command_prot = level;
- if(len == (size_t)-1) {
- reply(501, "Failed to base64-decode command");
- return;
- }
- len = (*mech->decode)(app_data, buf, len, level);
- if(len == (size_t)-1) {
- reply(535, "Failed to decode command");
- return;
- }
- ((char*)buf)[len] = '\0';
- if(strstr((char*)buf, "\r\n") == NULL)
- strcat((char*)buf, "\r\n");
- new_ftp_command(buf);
-}
-
-/* ------------------------------------------------------------ */
-
-int
-sec_userok(char *user)
-{
- if(sec_complete)
- return (*mech->userok)(app_data, user);
- return 0;
-}
-
-char *ftp_command;
-
-void
-new_ftp_command(char *command)
-{
- ftp_command = command;
-}
-
-void
-delete_ftp_command(void)
-{
- free(ftp_command);
- ftp_command = NULL;
-}
-
-int
-secure_command(void)
-{
- return ftp_command != NULL;
-}
-
-enum protection_level
-get_command_prot(void)
-{
- return command_prot;
-}
-
-#else /* FTP_SERVER */
-
-void
-sec_status(void)
-{
- if(sec_complete){
- printf("Using %s for authentication.\n", mech->name);
- printf("Using %s command channel.\n", level_to_name(command_prot));
- printf("Using %s data channel.\n", level_to_name(data_prot));
- if(buffer_size > 0)
- printf("Protection buffer size: %lu.\n",
- (unsigned long)buffer_size);
- }else{
- printf("Not using any security mechanism.\n");
- }
-}
-
-static int
-sec_prot_internal(int level)
-{
- int ret;
- char *p;
- unsigned int s = 1048576;
-
- int old_verbose = verbose;
- verbose = 0;
-
- if(!sec_complete){
- printf("No security data exchange has taken place.\n");
- return -1;
- }
-
- if(level){
- ret = command("PBSZ %u", s);
- if(ret != COMPLETE){
- printf("Failed to set protection buffer size.\n");
- return -1;
- }
- buffer_size = s;
- p = strstr(reply_string, "PBSZ=");
- if(p)
- sscanf(p, "PBSZ=%u", &s);
- if(s < buffer_size)
- buffer_size = s;
- }
- verbose = old_verbose;
- ret = command("PROT %c", level["CSEP"]); /* XXX :-) */
- if(ret != COMPLETE){
- printf("Failed to set protection level.\n");
- return -1;
- }
-
- data_prot = (enum protection_level)level;
- return 0;
-}
-
-enum protection_level
-set_command_prot(enum protection_level level)
-{
- enum protection_level old = command_prot;
- command_prot = level;
- return old;
-}
-
-void
-sec_prot(int argc, char **argv)
-{
- int level = -1;
-
- if(argc < 2 || argc > 3)
- goto usage;
- if(!sec_complete) {
- printf("No security data exchange has taken place.\n");
- code = -1;
- return;
- }
- level = name_to_level(argv[argc - 1]);
-
- if(level == -1)
- goto usage;
-
- if((*mech->check_prot)(app_data, level)) {
- printf("%s does not implement %s protection.\n",
- mech->name, level_to_name(level));
- code = -1;
- return;
- }
-
- if(argc == 2 || strncasecmp(argv[1], "data", strlen(argv[1])) == 0) {
- if(sec_prot_internal(level) < 0){
- code = -1;
- return;
- }
- } else if(strncasecmp(argv[1], "command", strlen(argv[1])) == 0)
- set_command_prot(level);
- else
- goto usage;
- code = 0;
- return;
- usage:
- printf("usage: %s [command|data] [clear|safe|confidential|private]\n",
- argv[0]);
- code = -1;
-}
-
-static enum protection_level request_data_prot;
-
-void
-sec_set_protection_level(void)
-{
- if(sec_complete && data_prot != request_data_prot)
- sec_prot_internal(request_data_prot);
-}
-
-
-int
-sec_request_prot(char *level)
-{
- int l = name_to_level(level);
- if(l == -1)
- return -1;
- request_data_prot = (enum protection_level)l;
- return 0;
-}
-
-int
-sec_login(char *host)
-{
- int ret;
- struct sec_client_mech **m;
- int old_verbose = verbose;
-
- verbose = -1; /* shut up all messages this will produce (they
- are usually not very user friendly) */
-
- for(m = mechs; *m && (*m)->name; m++) {
- void *tmp;
-
- tmp = realloc(app_data, (*m)->size);
- if (tmp == NULL) {
- warnx ("realloc %u failed", (*m)->size);
- return -1;
- }
- app_data = tmp;
-
- if((*m)->init && (*(*m)->init)(app_data) != 0) {
- printf("Skipping %s...\n", (*m)->name);
- continue;
- }
- printf("Trying %s...\n", (*m)->name);
- ret = command("AUTH %s", (*m)->name);
- if(ret != CONTINUE){
- if(code == 504){
- printf("%s is not supported by the server.\n", (*m)->name);
- }else if(code == 534){
- printf("%s rejected as security mechanism.\n", (*m)->name);
- }else if(ret == ERROR) {
- printf("The server doesn't support the FTP "
- "security extensions.\n");
- verbose = old_verbose;
- return -1;
- }
- continue;
- }
-
- ret = (*(*m)->auth)(app_data, host);
-
- if(ret == AUTH_CONTINUE)
- continue;
- else if(ret != AUTH_OK){
- /* mechanism is supposed to output error string */
- verbose = old_verbose;
- return -1;
- }
- mech = *m;
- sec_complete = 1;
- command_prot = prot_safe;
- break;
- }
-
- verbose = old_verbose;
- return *m == NULL;
-}
-
-void
-sec_end(void)
-{
- if (mech != NULL) {
- if(mech->end)
- (*mech->end)(app_data);
- memset(app_data, 0, mech->size);
- free(app_data);
- app_data = NULL;
- }
- sec_complete = 0;
- data_prot = (enum protection_level)0;
-}
-
-#endif /* FTP_SERVER */
-
diff --git a/crypto/kerberosIV/appl/ftp/ftp/security.h b/crypto/kerberosIV/appl/ftp/ftp/security.h
deleted file mode 100644
index 6fe06946c570..000000000000
--- a/crypto/kerberosIV/appl/ftp/ftp/security.h
+++ /dev/null
@@ -1,131 +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. 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: security.h,v 1.7 1999/12/02 16:58:30 joda Exp $ */
-
-#ifndef __security_h__
-#define __security_h__
-
-enum protection_level {
- prot_clear,
- prot_safe,
- prot_confidential,
- prot_private
-};
-
-struct sec_client_mech {
- char *name;
- size_t size;
- int (*init)(void *);
- int (*auth)(void *, char*);
- void (*end)(void *);
- int (*check_prot)(void *, int);
- int (*overhead)(void *, int, int);
- int (*encode)(void *, void*, int, int, void**);
- int (*decode)(void *, void*, int, int);
-};
-
-struct sec_server_mech {
- char *name;
- size_t size;
- int (*init)(void *);
- void (*end)(void *);
- int (*check_prot)(void *, int);
- int (*overhead)(void *, int, int);
- int (*encode)(void *, void*, int, int, void**);
- int (*decode)(void *, void*, int, int);
-
- int (*auth)(void *);
- int (*adat)(void *, void*, size_t);
- size_t (*pbsz)(void *, size_t);
- int (*ccc)(void*);
- int (*userok)(void*, char*);
-};
-
-#define AUTH_OK 0
-#define AUTH_CONTINUE 1
-#define AUTH_ERROR 2
-
-#ifdef FTP_SERVER
-extern struct sec_server_mech krb4_server_mech, gss_server_mech;
-#else
-extern struct sec_client_mech krb4_client_mech, gss_client_mech;
-#endif
-
-extern int sec_complete;
-
-#ifdef FTP_SERVER
-extern char *ftp_command;
-void new_ftp_command(char*);
-void delete_ftp_command(void);
-#endif
-
-/* ---- */
-
-
-int sec_fflush (FILE *);
-int sec_fprintf (FILE *, const char *, ...);
-int sec_getc (FILE *);
-int sec_putc (int, FILE *);
-int sec_read (int, void *, int);
-int sec_read_msg (char *, int);
-int sec_vfprintf (FILE *, const char *, va_list);
-int sec_fprintf2(FILE *f, const char *fmt, ...);
-int sec_vfprintf2(FILE *, const char *, va_list);
-int sec_write (int, char *, int);
-
-#ifdef FTP_SERVER
-void adat (char *);
-void auth (char *);
-void ccc (void);
-void mec (char *, enum protection_level);
-void pbsz (int);
-void prot (char *);
-void delete_ftp_command (void);
-void new_ftp_command (char *);
-int sec_userok (char *);
-int secure_command (void);
-enum protection_level get_command_prot(void);
-#else
-void sec_end (void);
-int sec_login (char *);
-void sec_prot (int, char **);
-int sec_request_prot (char *);
-void sec_set_protection_level (void);
-void sec_status (void);
-
-enum protection_level set_command_prot(enum protection_level);
-
-#endif
-
-#endif /* __security_h__ */
diff --git a/crypto/kerberosIV/appl/ftp/ftpd/Makefile.am b/crypto/kerberosIV/appl/ftp/ftpd/Makefile.am
deleted file mode 100644
index 282cb3a43c42..000000000000
--- a/crypto/kerberosIV/appl/ftp/ftpd/Makefile.am
+++ /dev/null
@@ -1,54 +0,0 @@
-# $Id: Makefile.am,v 1.20 1999/10/03 16:38:53 joda Exp $
-
-include $(top_srcdir)/Makefile.am.common
-
-INCLUDES += -I$(srcdir)/../common $(INCLUDE_krb4) -DFTP_SERVER
-
-libexec_PROGRAMS = ftpd
-
-CHECK_LOCAL =
-
-if KRB4
-krb4_sources = krb4.c kauth.c
-endif
-if KRB5
-krb5_sources = gssapi.c gss_userok.c
-endif
-
-ftpd_SOURCES = \
- extern.h \
- ftpcmd.y \
- ftpd.c \
- ftpd_locl.h \
- logwtmp.c \
- ls.c \
- pathnames.h \
- popen.c \
- security.c \
- $(krb4_sources) \
- $(krb5_sources)
-
-EXTRA_ftpd_SOURCES = krb4.c kauth.c gssapi.c gss_userok.c
-
-$(ftpd_OBJECTS): security.h
-
-security.c:
- @test -f security.c || $(LN_S) $(srcdir)/../ftp/security.c .
-security.h:
- @test -f security.h || $(LN_S) $(srcdir)/../ftp/security.h .
-krb4.c:
- @test -f krb4.c || $(LN_S) $(srcdir)/../ftp/krb4.c .
-gssapi.c:
- @test -f gssapi.c || $(LN_S) $(srcdir)/../ftp/gssapi.c .
-
-CLEANFILES = security.c security.h krb4.c gssapi.c ftpcmd.c
-
-LDADD = ../common/libcommon.a \
- $(LIB_kafs) \
- $(LIB_gssapi) \
- $(LIB_krb5) \
- $(LIB_krb4) \
- $(LIB_otp) \
- $(top_builddir)/lib/des/libdes.la \
- $(LIB_roken) \
- $(DBLIB)
diff --git a/crypto/kerberosIV/appl/ftp/ftpd/ftpd_locl.h b/crypto/kerberosIV/appl/ftp/ftpd/ftpd_locl.h
deleted file mode 100644
index 5cb49046b52a..000000000000
--- a/crypto/kerberosIV/appl/ftp/ftpd/ftpd_locl.h
+++ /dev/null
@@ -1,170 +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. 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: ftpd_locl.h,v 1.9 1999/12/02 16:58:30 joda Exp $ */
-
-#ifndef __ftpd_locl_h__
-#define __ftpd_locl_h__
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-/*
- * FTP server.
- */
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#if defined(HAVE_SYS_IOCTL_H) && SunOS != 40
-#include <sys/ioctl.h>
-#endif
-#ifdef HAVE_SYS_IOCCOM_H
-#include <sys/ioccom.h>
-#endif
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#elif defined(HAVE_SYS_TIME_H)
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NETINET_IN_SYSTM_H
-#include <netinet/in_systm.h>
-#endif
-#ifdef HAVE_NETINET_IP_H
-#include <netinet/ip.h>
-#endif
-
-#ifdef HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
-
-#include <arpa/ftp.h>
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#ifdef HAVE_ARPA_TELNET_H
-#include <arpa/telnet.h>
-#endif
-
-#include <ctype.h>
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-#include <errno.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#include <glob.h>
-#include <limits.h>
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-#include <setjmp.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#ifdef HAVE_SYSLOG_H
-#include <syslog.h>
-#endif
-#include <time.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_GRP_H
-#include <grp.h>
-#endif
-#include <fnmatch.h>
-
-#ifdef HAVE_BSD_BSD_H
-#include <bsd/bsd.h>
-#endif
-
-#include <err.h>
-
-#include "pathnames.h"
-#include "extern.h"
-#include "common.h"
-
-#include "security.h"
-
-#include "roken.h"
-
-#ifdef KRB4
-#include <krb.h>
-#include <kafs.h>
-#endif
-
-#ifdef OTP
-#include <otp.h>
-#endif
-
-#ifdef SOCKS
-#include <socks.h>
-extern int LIBPREFIX(fclose) (FILE *);
-#endif
-
-/* SunOS doesn't have any declaration of fclose */
-
-int fclose(FILE *stream);
-
-int yyparse();
-
-#ifndef LOG_FTP
-#define LOG_FTP LOG_DAEMON
-#endif
-
-#endif /* __ftpd_locl_h__ */
diff --git a/crypto/kerberosIV/appl/ftp/ftpd/gss_userok.c b/crypto/kerberosIV/appl/ftp/ftpd/gss_userok.c
deleted file mode 100644
index 28e35960cc9d..000000000000
--- a/crypto/kerberosIV/appl/ftp/ftpd/gss_userok.c
+++ /dev/null
@@ -1,69 +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. 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 "ftpd_locl.h"
-#include <gssapi.h>
-#include <krb5.h>
-
-RCSID("$Id: gss_userok.c,v 1.2 1999/12/02 16:58:31 joda Exp $");
-
-/* XXX a bit too much of krb5 dependency here...
- What is the correct way to do this?
- */
-
-extern krb5_context gssapi_krb5_context;
-
-/* XXX sync with gssapi.c */
-struct gss_data {
- gss_ctx_id_t context_hdl;
- char *client_name;
-};
-
-int gss_userok(void*, char*); /* to keep gcc happy */
-
-int
-gss_userok(void *app_data, char *username)
-{
- struct gss_data *data = app_data;
- if(gssapi_krb5_context) {
- krb5_principal client;
- krb5_error_code ret;
- ret = krb5_parse_name(gssapi_krb5_context, data->client_name, &client);
- if(ret)
- return 1;
- ret = krb5_kuserok(gssapi_krb5_context, client, username);
- krb5_free_principal(gssapi_krb5_context, client);
- return !ret;
- }
- return 1;
-}
diff --git a/crypto/kerberosIV/appl/ftp/ftpd/ls.c b/crypto/kerberosIV/appl/ftp/ftpd/ls.c
deleted file mode 100644
index 97eb77ed906d..000000000000
--- a/crypto/kerberosIV/appl/ftp/ftpd/ls.c
+++ /dev/null
@@ -1,572 +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 "ftpd_locl.h"
-
-RCSID("$Id: ls.c,v 1.13 1999/11/20 20:49:41 assar Exp $");
-
-struct fileinfo {
- struct stat st;
- int inode;
- int bsize;
- char mode[11];
- int n_link;
- char *user;
- char *group;
- char *size;
- char *major;
- char *minor;
- char *date;
- char *filename;
- char *link;
-};
-
-#define LS_DIRS 1
-#define LS_IGNORE_DOT 2
-#define LS_SORT_MODE 12
-#define SORT_MODE(f) ((f) & LS_SORT_MODE)
-#define LS_SORT_NAME 4
-#define LS_SORT_MTIME 8
-#define LS_SORT_SIZE 12
-#define LS_SORT_REVERSE 16
-
-#define LS_SIZE 32
-#define LS_INODE 64
-
-#ifndef S_ISTXT
-#define S_ISTXT S_ISVTX
-#endif
-
-#ifndef S_ISSOCK
-#define S_ISSOCK(mode) (((mode) & _S_IFMT) == S_IFSOCK)
-#endif
-
-#ifndef S_ISLNK
-#define S_ISLNK(mode) (((mode) & _S_IFMT) == S_IFLNK)
-#endif
-
-static void
-make_fileinfo(const char *filename, struct fileinfo *file, int flags)
-{
- char buf[128];
- struct stat *st = &file->st;
-
- file->inode = st->st_ino;
-#ifdef S_BLKSIZE
- file->bsize = st->st_blocks * S_BLKSIZE / 1024;
-#else
- file->bsize = st->st_blocks * 512 / 1024;
-#endif
-
- if(S_ISDIR(st->st_mode))
- file->mode[0] = 'd';
- else if(S_ISCHR(st->st_mode))
- file->mode[0] = 'c';
- else if(S_ISBLK(st->st_mode))
- file->mode[0] = 'b';
- else if(S_ISREG(st->st_mode))
- file->mode[0] = '-';
- else if(S_ISFIFO(st->st_mode))
- file->mode[0] = 'p';
- else if(S_ISLNK(st->st_mode))
- file->mode[0] = 'l';
- else if(S_ISSOCK(st->st_mode))
- file->mode[0] = 's';
-#ifdef S_ISWHT
- else if(S_ISWHT(st->st_mode))
- file->mode[0] = 'w';
-#endif
- else
- file->mode[0] = '?';
- {
- char *x[] = { "---", "--x", "-w-", "-wx",
- "r--", "r-x", "rw-", "rwx" };
- strcpy(file->mode + 1, x[(st->st_mode & S_IRWXU) >> 6]);
- strcpy(file->mode + 4, x[(st->st_mode & S_IRWXG) >> 3]);
- strcpy(file->mode + 7, x[(st->st_mode & S_IRWXO) >> 0]);
- if((st->st_mode & S_ISUID)) {
- if((st->st_mode & S_IXUSR))
- file->mode[3] = 's';
- else
- file->mode[3] = 'S';
- }
- if((st->st_mode & S_ISGID)) {
- if((st->st_mode & S_IXGRP))
- file->mode[6] = 's';
- else
- file->mode[6] = 'S';
- }
- if((st->st_mode & S_ISTXT)) {
- if((st->st_mode & S_IXOTH))
- file->mode[9] = 't';
- else
- file->mode[9] = 'T';
- }
- }
- file->n_link = st->st_nlink;
- {
- struct passwd *pwd;
- pwd = getpwuid(st->st_uid);
- if(pwd == NULL)
- asprintf(&file->user, "%u", (unsigned)st->st_uid);
- else
- file->user = strdup(pwd->pw_name);
- }
- {
- struct group *grp;
- grp = getgrgid(st->st_gid);
- if(grp == NULL)
- asprintf(&file->group, "%u", (unsigned)st->st_gid);
- else
- file->group = strdup(grp->gr_name);
- }
-
- if(S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) {
-#if defined(major) && defined(minor)
- asprintf(&file->major, "%u", (unsigned)major(st->st_rdev));
- asprintf(&file->minor, "%u", (unsigned)minor(st->st_rdev));
-#else
- /* Don't want to use the DDI/DKI crap. */
- asprintf(&file->major, "%u", (unsigned)st->st_rdev);
- asprintf(&file->minor, "%u", 0);
-#endif
- } else
- asprintf(&file->size, "%lu", (unsigned long)st->st_size);
-
- {
- time_t t = time(NULL);
- struct tm *tm = localtime(&st->st_mtime);
- if((t - st->st_mtime > 6*30*24*60*60) ||
- (st->st_mtime - t > 6*30*24*60*60))
- strftime(buf, sizeof(buf), "%b %e %Y", tm);
- else
- strftime(buf, sizeof(buf), "%b %e %H:%M", tm);
- file->date = strdup(buf);
- }
- {
- const char *p = strrchr(filename, '/');
- if(p)
- p++;
- else
- p = filename;
- file->filename = strdup(p);
- }
- if(S_ISLNK(st->st_mode)) {
- int n;
- n = readlink((char *)filename, buf, sizeof(buf));
- if(n >= 0) {
- buf[n] = '\0';
- file->link = strdup(buf);
- } else
- warn("%s: readlink", filename);
- }
-}
-
-static void
-print_file(FILE *out,
- int flags,
- struct fileinfo *f,
- int max_inode,
- int max_bsize,
- int max_n_link,
- int max_user,
- int max_group,
- int max_size,
- int max_major,
- int max_minor,
- int max_date)
-{
- if(f->filename == NULL)
- return;
-
- if(flags & LS_INODE) {
- sec_fprintf2(out, "%*d", max_inode, f->inode);
- sec_fprintf2(out, " ");
- }
- if(flags & LS_SIZE) {
- sec_fprintf2(out, "%*d", max_bsize, f->bsize);
- sec_fprintf2(out, " ");
- }
- sec_fprintf2(out, "%s", f->mode);
- sec_fprintf2(out, " ");
- sec_fprintf2(out, "%*d", max_n_link, f->n_link);
- sec_fprintf2(out, " ");
- sec_fprintf2(out, "%-*s", max_user, f->user);
- sec_fprintf2(out, " ");
- sec_fprintf2(out, "%-*s", max_group, f->group);
- sec_fprintf2(out, " ");
- if(f->major != NULL && f->minor != NULL)
- sec_fprintf2(out, "%*s, %*s", max_major, f->major, max_minor, f->minor);
- else
- sec_fprintf2(out, "%*s", max_size, f->size);
- sec_fprintf2(out, " ");
- sec_fprintf2(out, "%*s", max_date, f->date);
- sec_fprintf2(out, " ");
- sec_fprintf2(out, "%s", f->filename);
- if(f->link)
- sec_fprintf2(out, " -> %s", f->link);
- sec_fprintf2(out, "\r\n");
-}
-
-static int
-compare_filename(struct fileinfo *a, struct fileinfo *b)
-{
- if(a->filename == NULL)
- return 1;
- if(b->filename == NULL)
- return -1;
- return strcmp(a->filename, b->filename);
-}
-
-static int
-compare_mtime(struct fileinfo *a, struct fileinfo *b)
-{
- if(a->filename == NULL)
- return 1;
- if(b->filename == NULL)
- return -1;
- return a->st.st_mtime - b->st.st_mtime;
-}
-
-static int
-compare_size(struct fileinfo *a, struct fileinfo *b)
-{
- if(a->filename == NULL)
- return 1;
- if(b->filename == NULL)
- return -1;
- return a->st.st_size - b->st.st_size;
-}
-
-static void
-list_dir(FILE *out, const char *directory, int flags);
-
-static int
-log10(int num)
-{
- int i = 1;
- while(num > 10) {
- i++;
- num /= 10;
- }
- return i;
-}
-
-/*
- * Operate as lstat but fake up entries for AFS mount points so we don't
- * have to fetch them.
- */
-
-static int
-lstat_file (const char *file, struct stat *sb)
-{
-#ifdef KRB4
- if (k_hasafs()
- && strcmp(file, ".")
- && strcmp(file, ".."))
- {
- struct ViceIoctl a_params;
- char *last;
- char *path_bkp;
- static ino_t ino_counter = 0, ino_last = 0;
- int ret;
- const int maxsize = 2048;
-
- path_bkp = strdup (file);
- if (path_bkp == NULL)
- return -1;
-
- a_params.out = malloc (maxsize);
- if (a_params.out == NULL) {
- free (path_bkp);
- return -1;
- }
-
- /* If path contains more than the filename alone - split it */
-
- last = strrchr (path_bkp, '/');
- if (last != NULL) {
- *last = '\0';
- a_params.in = last + 1;
- } else
- a_params.in = (char *)file;
-
- a_params.in_size = strlen (a_params.in) + 1;
- a_params.out_size = maxsize;
-
- ret = k_pioctl (last ? path_bkp : "." ,
- VIOC_AFS_STAT_MT_PT, &a_params, 0);
- free (a_params.out);
- if (ret < 0) {
- free (path_bkp);
-
- if (errno != EINVAL)
- return ret;
- else
- /* if we get EINVAL this is probably not a mountpoint */
- return lstat (file, sb);
- }
-
- /*
- * wow this was a mountpoint, lets cook the struct stat
- * use . as a prototype
- */
-
- ret = lstat (path_bkp, sb);
- free (path_bkp);
- if (ret < 0)
- return ret;
-
- if (ino_last == sb->st_ino)
- ino_counter++;
- else {
- ino_last = sb->st_ino;
- ino_counter = 0;
- }
- sb->st_ino += ino_counter;
- sb->st_nlink = 3;
-
- return 0;
- }
-#endif /* KRB4 */
- return lstat (file, sb);
-}
-
-static void
-list_files(FILE *out, char **files, int n_files, int flags)
-{
- struct fileinfo *fi;
- int i;
-
- fi = calloc(n_files, sizeof(*fi));
- if (fi == NULL) {
- sec_fprintf2(out, "ouf of memory\r\n");
- return;
- }
- for(i = 0; i < n_files; i++) {
- if(lstat_file(files[i], &fi[i].st) < 0) {
- sec_fprintf2(out, "%s: %s\r\n", files[i], strerror(errno));
- fi[i].filename = NULL;
- } else {
- if((flags & LS_DIRS) == 0 && S_ISDIR(fi[i].st.st_mode)) {
- if(n_files > 1)
- sec_fprintf2(out, "%s:\r\n", files[i]);
- list_dir(out, files[i], flags);
- } else {
- make_fileinfo(files[i], &fi[i], flags);
- }
- }
- }
- switch(SORT_MODE(flags)) {
- case LS_SORT_NAME:
- qsort(fi, n_files, sizeof(*fi),
- (int (*)(const void*, const void*))compare_filename);
- break;
- case LS_SORT_MTIME:
- qsort(fi, n_files, sizeof(*fi),
- (int (*)(const void*, const void*))compare_mtime);
- break;
- case LS_SORT_SIZE:
- qsort(fi, n_files, sizeof(*fi),
- (int (*)(const void*, const void*))compare_size);
- break;
- }
- {
- int max_inode = 0;
- int max_bsize = 0;
- int max_n_link = 0;
- int max_user = 0;
- int max_group = 0;
- int max_size = 0;
- int max_major = 0;
- int max_minor = 0;
- int max_date = 0;
- for(i = 0; i < n_files; i++) {
- if(fi[i].filename == NULL)
- continue;
- if(fi[i].inode > max_inode)
- max_inode = fi[i].inode;
- if(fi[i].bsize > max_bsize)
- max_bsize = fi[i].bsize;
- if(fi[i].n_link > max_n_link)
- max_n_link = fi[i].n_link;
- if(strlen(fi[i].user) > max_user)
- max_user = strlen(fi[i].user);
- if(strlen(fi[i].group) > max_group)
- max_group = strlen(fi[i].group);
- if(fi[i].major != NULL && strlen(fi[i].major) > max_major)
- max_major = strlen(fi[i].major);
- if(fi[i].minor != NULL && strlen(fi[i].minor) > max_minor)
- max_minor = strlen(fi[i].minor);
- if(fi[i].size != NULL && strlen(fi[i].size) > max_size)
- max_size = strlen(fi[i].size);
- if(strlen(fi[i].date) > max_date)
- max_date = strlen(fi[i].date);
- }
- if(max_size < max_major + max_minor + 2)
- max_size = max_major + max_minor + 2;
- else if(max_size - max_minor - 2 > max_major)
- max_major = max_size - max_minor - 2;
- max_inode = log10(max_inode);
- max_bsize = log10(max_bsize);
- max_n_link = log10(max_n_link);
-
- if(flags & LS_SORT_REVERSE)
- for(i = n_files - 1; i >= 0; i--)
- print_file(out,
- flags,
- &fi[i],
- max_inode,
- max_bsize,
- max_n_link,
- max_user,
- max_group,
- max_size,
- max_major,
- max_minor,
- max_date);
- else
- for(i = 0; i < n_files; i++)
- print_file(out,
- flags,
- &fi[i],
- max_inode,
- max_bsize,
- max_n_link,
- max_user,
- max_group,
- max_size,
- max_major,
- max_minor,
- max_date);
- }
-}
-
-static void
-free_files (char **files, int n)
-{
- int i;
-
- for (i = 0; i < n; ++i)
- free (files[i]);
- free (files);
-}
-
-static void
-list_dir(FILE *out, const char *directory, int flags)
-{
- DIR *d = opendir(directory);
- struct dirent *ent;
- char **files = NULL;
- int n_files = 0;
-
- if(d == NULL) {
- sec_fprintf2(out, "%s: %s\r\n", directory, strerror(errno));
- return;
- }
- while((ent = readdir(d)) != NULL) {
- void *tmp;
-
- if(ent->d_name[0] == '.') {
- if (flags & LS_IGNORE_DOT)
- continue;
- if (ent->d_name[1] == 0) /* Ignore . */
- continue;
- if (ent->d_name[1] == '.' && ent->d_name[2] == 0) /* Ignore .. */
- continue;
- }
- tmp = realloc(files, (n_files + 1) * sizeof(*files));
- if (tmp == NULL) {
- sec_fprintf2(out, "%s: out of memory\r\n", directory);
- free_files (files, n_files);
- closedir (d);
- return;
- }
- files = tmp;
- asprintf(&files[n_files], "%s/%s", directory, ent->d_name);
- if (files[n_files] == NULL) {
- sec_fprintf2(out, "%s: out of memory\r\n", directory);
- free_files (files, n_files);
- closedir (d);
- return;
- }
- ++n_files;
- }
- closedir(d);
- list_files(out, files, n_files, flags | LS_DIRS);
-}
-
-void
-builtin_ls(FILE *out, const char *file)
-{
- int flags = LS_SORT_NAME;
-
- if(*file == '-') {
- const char *p;
- for(p = file + 1; *p; p++) {
- switch(*p) {
- case 'a':
- case 'A':
- flags &= ~LS_IGNORE_DOT;
- break;
- case 'C':
- break;
- case 'd':
- flags |= LS_DIRS;
- break;
- case 'f':
- flags = (flags & ~LS_SORT_MODE);
- break;
- case 'i':
- flags |= flags | LS_INODE;
- break;
- case 'l':
- break;
- case 't':
- flags = (flags & ~LS_SORT_MODE) | LS_SORT_MTIME;
- break;
- case 's':
- flags |= LS_SIZE;
- break;
- case 'S':
- flags = (flags & ~LS_SORT_MODE) | LS_SORT_SIZE;
- break;
- case 'r':
- flags |= LS_SORT_REVERSE;
- break;
- }
- }
- file = ".";
- }
- list_files(out, &file, 1, flags);
- sec_fflush(out);
-}
diff --git a/crypto/kerberosIV/appl/kauth/ChangeLog b/crypto/kerberosIV/appl/kauth/ChangeLog
deleted file mode 100644
index a770682f713b..000000000000
--- a/crypto/kerberosIV/appl/kauth/ChangeLog
+++ /dev/null
@@ -1,30 +0,0 @@
-1999-08-31 Johan Danielsson <joda@pdc.kth.se>
-
- * kauth.c: cleanup usage string; handle `kauth -h' gracefully
- (print usage); add `-a' flag to get the ticket address (useful for
- firewall configurations)
-
-Thu Apr 15 15:05:33 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * kauth.c: add `-v'
-
-Thu Mar 18 11:17:14 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: include Makefile.am.common
-
-Sun Nov 22 10:30:47 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (WFLAGS): set
-
-Tue May 26 17:41:47 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * kauth.c: use krb_enable_debug
-
-Fri May 1 07:15:18 1998 Assar Westerlund <assar@sics.se>
-
- * rkinit.c: unifdef -DHAVE_H_ERRNO
-
-Thu Mar 19 16:07:18 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * kauth.c: Check for negative return value from krb_afslog().
-
diff --git a/crypto/kerberosIV/appl/kauth/Makefile.am b/crypto/kerberosIV/appl/kauth/Makefile.am
deleted file mode 100644
index a5bf0fdacac6..000000000000
--- a/crypto/kerberosIV/appl/kauth/Makefile.am
+++ /dev/null
@@ -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)
diff --git a/crypto/kerberosIV/appl/push/ChangeLog b/crypto/kerberosIV/appl/push/ChangeLog
deleted file mode 100644
index a55954d66a5a..000000000000
--- a/crypto/kerberosIV/appl/push/ChangeLog
+++ /dev/null
@@ -1,135 +0,0 @@
-1999-11-13 Assar Westerlund <assar@sics.se>
-
- * push.c: make `-v' a arg_counter
-
-1999-11-02 Assar Westerlund <assar@sics.se>
-
- * push.c (main): redo the v4/v5 selection for consistency. -4 ->
- try only v4 -5 -> try only v5 none, -45 -> try v5, v4
-
-1999-08-19 Assar Westerlund <assar@sics.se>
-
- * push.c (doit): remember to step over the error message when we
- discover that XDELE is not supported
-
-1999-08-12 Johan Danielsson <joda@pdc.kth.se>
-
- * push.c: use XDELE
-
-1999-08-05 Assar Westerlund <assar@sics.se>
-
- * push.c (do_connect): v6-ify
-
-1999-06-15 Assar Westerlund <assar@sics.se>
-
- * push.c: get_default_username and the resulting const propagation
-
-1999-05-21 Assar Westerlund <assar@sics.se>
-
- * push.c (parse_pobox): try $USERNAME
-
-1999-05-11 Assar Westerlund <assar@sics.se>
-
- * push.c (do_v5): remove unused and non-working code
-
-1999-05-10 Assar Westerlund <assar@sics.se>
-
- * push.c (do_v5): call krb5_sendauth with ccache == NULL
-
-Wed Apr 7 23:40:00 1999 Assar Westerlund <assar@sics.se>
-
- * Makefile.in: fix names of hesiod variables
-
-Wed Mar 24 04:37:04 1999 Assar Westerlund <assar@sics.se>
-
- * Makefile.am (pfrom): fix typo
-
- * push.c (get_pobox): try to handle old and new hesiod APIs
-
-Mon Mar 22 22:19:40 1999 Assar Westerlund <assar@sics.se>
-
- * Makefile.am: hesoid -> hesiod
-
-Sun Mar 21 18:02:10 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: bindir -> libexecdir
-
-Sat Mar 20 00:12:26 1999 Assar Westerlund <assar@sics.se>
-
- * Makefile.am: LDADD: add missing backslash
-
-Thu Mar 18 15:28:35 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: clean pfrom
-
- * Makefile.am: include Makefile.am.common
-
-Mon Mar 15 18:26:16 1999 Johan Danielsson <joda@blubb.pdc.kth.se>
-
- * push.c: strncasecmp headers
-
-Mon Feb 15 22:22:09 1999 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (pfrom): use libexecdir
-
- * Makefile.am: build and install pfrom
-
- * push.c (do_connect): init `s'
- (pop_state): spell-check enums
-
-Tue Nov 24 23:20:54 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in: build and install pfrom
-
- * pfrom.in: bindir -> libexecdir
-
-Sun Nov 22 15:33:52 1998 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * push.c: eliminate some warnings
-
-Sun Nov 22 10:34:54 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (WFLAGS): set
-
-Thu Nov 19 01:17:33 1998 Assar Westerlund <assar@sics.se>
-
- * push_locl.h: add <hesiod.h>
-
- * Makefile.am, Makefile.in: link and include hesiod
-
- * push.c (get_pobox): new function. add hesiod support.
-
-1998-11-07 Assar Westerlund <assar@sics.se>
-
- * push.8: updated
-
- * push.c: --from implementation from <lha@stacken.kth.se>
-
-Fri Jul 10 01:14:45 1998 Assar Westerlund <assar@sics.se>
-
- * push.c (net_{read,write}): remove
-
-Wed Jun 24 14:41:41 1998 Johan Danielsson <joda@blubb.pdc.kth.se>
-
- * push.c: allow `po:user@host' mailbox syntax
-
-Tue Jun 2 17:35:06 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * push.c: quote '^From ' properly
-
-Mon May 25 05:22:47 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (clean): PROGS -> PROGRAMS
-
-Sun Apr 26 11:42:13 1998 Assar Westerlund <assar@sics.se>
-
- * push.c (main): better default for v4 and v5
-
- * push.c (main): init context correctly
-
- * push.c: should work with krb4
-
- * push_locl.h: krb4 compat
-
- * Makefile.in: new file
-
diff --git a/crypto/kerberosIV/appl/push/Makefile.am b/crypto/kerberosIV/appl/push/Makefile.am
deleted file mode 100644
index 07ecd0ad9802..000000000000
--- a/crypto/kerberosIV/appl/push/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Id: Makefile.am,v 1.15 1999/04/09 18:29:48 assar Exp $
-
-include $(top_srcdir)/Makefile.am.common
-
-INCLUDES += $(INCLUDE_krb4) $(INCLUDE_hesiod)
-
-bin_SCRIPTS = pfrom
-
-libexec_PROGRAMS = push
-
-push_SOURCES = push.c push_locl.h
-
-pfrom: pfrom.in
- sed -e "s!%libexecdir%!$(libexecdir)!" $(srcdir)/pfrom.in > $@
- chmod +x $@
-
-man_MANS = push.8
-
-CLEANFILES = pfrom
-
-EXTRA_DIST = pfrom.in $(man_MANS)
-
-LDADD = $(LIB_krb5) \
- $(LIB_krb4) \
- $(top_builddir)/lib/des/libdes.la \
- $(LIB_roken) \
- $(LIB_hesiod)
diff --git a/crypto/kerberosIV/appl/push/Makefile.in b/crypto/kerberosIV/appl/push/Makefile.in
deleted file mode 100644
index 87da6cfab337..000000000000
--- a/crypto/kerberosIV/appl/push/Makefile.in
+++ /dev/null
@@ -1,95 +0,0 @@
-# $Id: Makefile.in,v 1.10 1999/04/07 18:39:56 assar Exp $
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-CC = @CC@
-LINK = @LINK@
-RANLIB = @RANLIB@
-DEFS = @DEFS@ @INCLUDE_hesiod@
-CFLAGS = @CFLAGS@ $(WFLAGS)
-WFLAGS = @WFLAGS@
-LD_FLAGS = @LD_FLAGS@
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-LIBS = @LIB_hesiod@ @LIBS@
-LIB_DBM = @LIB_DBM@
-MKINSTALLDIRS = @top_srcdir@/mkinstalldirs
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-libdir = @libdir@
-libexecdir = @libexecdir@
-bindir = @bindir@
-transform=@program_transform_name@
-EXECSUFFIX=@EXECSUFFIX@
-
-bin_PROGRAMS = pfrom
-
-libexec_PROGRAMS = push$(EXECSUFFIX)
-
-PROGRAMS = $(libexec_PROGRAMS) $(bin_PROGRAMS)
-
-push_SOURCES = push.c
-
-push_OBJECTS = push.o
-
-SOURCES = $(push_SOURCES)
-
-OBJECTS = $(push_OBJECTS)
-
-all: $(PROGRAMS)
-
-.c.o:
- $(CC) -c $(DEFS) -I../../include -I$(srcdir) $(CFLAGS) $(CPPFLAGS) $<
-
-install: all
- $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
- for x in $(bin_PROGRAMS); do \
- $(INSTALL_PROGRAM) $$x $(DESTDIR)$(bindir)/`echo $$x | sed '$(transform)'`; \
- done
- $(MKINSTALLDIRS) $(DESTDIR)$(libexecdir)
- for x in $(libexec_PROGRAMS); do \
- $(INSTALL_PROGRAM) $$x $(DESTDIR)$(libexecdir)/`echo $$x | sed '$(transform)'`; \
- done
-
-uninstall:
- for x in $(bin_PROGRAMS); do \
- rm -f $(DESTDIR)$(bindir)/`echo $$x | sed '$(transform)'`; \
- done
- for x in $(libexec_PROGRAMS); do \
- rm -f $(DESTDIR)$(libexecdir)/`echo $$x | sed '$(transform)'`; \
- done
-
-TAGS: $(SOURCES)
- etags $(SOURCES)
-
-check:
-
-clean:
- rm -f *.a *.o $(PROGRAMS)
-
-mostlyclean: clean
-
-distclean: clean
- rm -f Makefile *~
-
-realclean: distclean
- rm -f TAGS
-
-KLIB=-L../../lib/krb -lkrb -L../../lib/des -ldes
-LIBROKEN=-L../../lib/roken -lroken
-
-push$(EXECSUFFIX): $(push_OBJECTS)
- $(LINK) $(LD_FLAGS) $(LDFLAGS) -o $@ $(push_OBJECTS) $(KLIB) $(LIBROKEN) $(LIBS) $(LIBROKEN)
-
-pfrom: pfrom.in
- sed -e "s!%libexecdir%!$(libexecdir)!" $(srcdir)/pfrom.in > $@
- chmod +x $@
-
-$(OBJECTS): ../../include/config.h
-
-.PHONY: all install uninstall check clean mostlyclean distclean realclean
diff --git a/crypto/kerberosIV/appl/push/pfrom.in b/crypto/kerberosIV/appl/push/pfrom.in
deleted file mode 100644
index 6adf4f0f7971..000000000000
--- a/crypto/kerberosIV/appl/push/pfrom.in
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# $Id: pfrom.in,v 1.2 1998/11/24 13:25:47 assar Exp $
-libexecdir=%libexecdir%
-PATH=$libexecdir:$PATH
-export PATH
-push --from $*
diff --git a/crypto/kerberosIV/appl/push/push.8 b/crypto/kerberosIV/appl/push/push.8
deleted file mode 100644
index 5066b375cfb7..000000000000
--- a/crypto/kerberosIV/appl/push/push.8
+++ /dev/null
@@ -1,138 +0,0 @@
-.\" $Id: push.8,v 1.3.16.1 1999/12/06 17:25:27 assar Exp $
-.\"
-.Dd May 31, 1998
-.Dt PUSH 8
-.Os HEIMDAL
-.Sh NAME
-.Nm push
-.Nd
-fetch mail via POP
-.Sh SYNOPSIS
-.Nm
-.Op Fl 4 | Fl -krb4
-.Op Fl 5 | Fl -krb5
-.Op Fl v | Fl -verbose
-.Op Fl f | Fl -fork
-.Op Fl l | -leave
-.Op Fl -from
-.Op Fl c | -count
-.Op Fl -header
-.Oo Fl p Ar port-spec \*(Ba Xo
-.Fl -port= Ns Ar port-spec Oc
-.Xc
-.Ar po-box
-.Pa filename
-.Sh DESCRIPTION
-.Nm
-retrieves mail from the post office box
-.Ar po-box ,
-and stores the mail in mbox format in
-.Pa filename .
-The
-.Ar po-box
-can have any of the following formats:
-.Bl -hang -compact -offset indent
-.It Ql hostname:username
-.It Ql po:hostname:username
-.It Ql username@hostname
-.It Ql po:username@hostname
-.It Ql hostname
-.It Ql po:username
-.El
-
-If no username is specified,
-.Nm
-assumes that it's the same as on the local machine;
-.Ar hostname
-defaults to the value of the
-.Ev MAILHOST
-environment variable.
-
-Supported options:
-.Bl -tag -width Ds
-.It Xo
-.Fl 4 Ns ,
-.Fl -krb4
-.Xc
-use Kerberos 4 (if compiled with support for Kerberos 4)
-.It Xo
-.Fl 5 Ns ,
-.Fl -krb5
-.Xc
-use Kerberos 5 (if compiled with support for Kerberos 5)
-.It Xo
-.Fl f Ns ,
-.Fl -fork
-.Xc
-fork before starting to delete messages
-.It Xo
-.Fl l Ns ,
-.Fl -leave
-.Xc
-don't delete fetched mail
-.It Xo
-.Fl -from
-.Xc
-behave like from.
-.It Xo
-.Fl c Ns ,
-.Fl -count
-.Xc
-first print how many messages and bytes there are.
-.It Xo
-.Fl -header
-.Xc
-which header from should print.
-.It Xo
-.Fl p Ar port-spec Ns ,
-.Fl -port= Ns Ar port-spec
-.Xc
-use this port instead of the default
-.Ql kpop
-or
-.Ql 1109 .
-.El
-
-The default is to first try Kerberos 5 authentication and then, if
-that fails, Kerberos 4.
-.Sh ENVIRONMENT
-
-.Bl -tag -width Ds
-.It Ev MAILHOST
-points to the post office, if no other hostname is specified.
-.El
-.\".Sh FILES
-.Sh EXAMPLES
-.Bd -literal -offset indent
-$ push cornfield:roosta ~/.gnus-crash-box
-.Ed
-
-tries to fetch mail for the user
-.Ar roosta
-from the post office at
-.Dq cornfield ,
-and stores the mail in
-.Pa ~/.gnus-crash-box
-(you are using Gnus, aren't you?)
-.Bd -literal -offset indent
-$ push --from -5 havregryn
-.Ed
-
-tries to fetch
-.Nm From:
-lines for current user at post office
-.Dq havregryn
-using Kerberos 5.
-.\".Sh DIAGNOSTICS
-.Sh SEE ALSO
-.Xr movemail 8 ,
-.Xr popper 8 ,
-.Xr from 1
-.\".Sh STANDARDS
-.Sh HISTORY
-.Nm
-was written while waiting for
-.Nm movemail
-to finish getting the mail.
-.\".Sh AUTHORS
-.\".Sh BUGS
diff --git a/crypto/kerberosIV/appl/push/push.c b/crypto/kerberosIV/appl/push/push.c
deleted file mode 100644
index bc7574fa634e..000000000000
--- a/crypto/kerberosIV/appl/push/push.c
+++ /dev/null
@@ -1,795 +0,0 @@
-/*
- * Copyright (c) 1997-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 "push_locl.h"
-RCSID("$Id: push.c,v 1.34.2.1 1999/12/06 17:25:28 assar Exp $");
-
-#ifdef KRB4
-static int use_v4 = -1;
-#endif
-
-#ifdef KRB5
-static int use_v5 = -1;
-static krb5_context context;
-#endif
-
-static char *port_str;
-static int verbose_level;
-static int do_fork;
-static int do_leave;
-static int do_version;
-static int do_help;
-static int do_from;
-static int do_count;
-static char *header_str;
-
-struct getargs args[] = {
-#ifdef KRB4
- { "krb4", '4', arg_flag, &use_v4, "Use Kerberos V4",
- NULL },
-#endif
-#ifdef KRB5
- { "krb5", '5', arg_flag, &use_v5, "Use Kerberos V5",
- NULL },
-#endif
- { "verbose",'v', arg_counter, &verbose_level, "Verbose",
- NULL },
- { "fork", 'f', arg_flag, &do_fork, "Fork deleting proc",
- NULL },
- { "leave", 'l', arg_flag, &do_leave, "Leave mail on server",
- NULL },
- { "port", 'p', arg_string, &port_str, "Use this port",
- "number-or-service" },
- { "from", 0, arg_flag, &do_from, "Behave like from",
- NULL },
- { "header", 0, arg_string, &header_str, "Header string to print", NULL },
- { "count", 'c', arg_flag, &do_count, "Print number of messages", NULL},
- { "version", 0, arg_flag, &do_version, "Print version",
- NULL },
- { "help", 0, arg_flag, &do_help, NULL,
- NULL }
-
-};
-
-static void
-usage (int ret)
-{
- arg_printusage (args,
- sizeof(args) / sizeof(args[0]),
- NULL,
- "[[{po:username[@hostname] | hostname[:username]}] ...]"
- "filename");
- exit (ret);
-}
-
-static int
-do_connect (const char *hostname, int port, int nodelay)
-{
- struct hostent *hostent = NULL;
- char **h;
- int error;
- int af;
- int s;
-
-#ifdef HAVE_IPV6
- if (hostent == NULL)
- hostent = getipnodebyname (hostname, AF_INET6, 0, &error);
-#endif
- if (hostent == NULL)
- hostent = getipnodebyname (hostname, AF_INET, 0, &error);
-
- if (hostent == NULL)
- errx(1, "gethostbyname '%s' failed: %s", hostname, hstrerror(error));
-
- af = hostent->h_addrtype;
-
- for (h = hostent->h_addr_list; *h != NULL; ++h) {
- struct sockaddr_storage sa_ss;
- struct sockaddr *sa = (struct sockaddr *)&sa_ss;
-
- sa->sa_family = af;
- socket_set_address_and_port (sa, *h, port);
-
- s = socket (af, SOCK_STREAM, 0);
- if (s < 0)
- err (1, "socket");
- if (connect(s, sa, socket_sockaddr_size(sa)) < 0) {
- warn ("connect(%s)", hostname);
- close (s);
- continue;
- } else {
- break;
- }
- }
- freehostent (hostent);
- if (*h == NULL)
- return -1;
- if(setsockopt(s, IPPROTO_TCP, TCP_NODELAY,
- (void *)&nodelay, sizeof(nodelay)) < 0)
- err (1, "setsockopt TCP_NODELAY");
- return s;
-}
-
-typedef enum { INIT = 0, GREET, USER, PASS, STAT, RETR, TOP,
- DELE, XDELE, QUIT} pop_state;
-
-#define PUSH_BUFSIZ 65536
-
-#define STEP 16
-
-struct write_state {
- struct iovec *iovecs;
- size_t niovecs, maxiovecs, allociovecs;
- int fd;
-};
-
-static void
-write_state_init (struct write_state *w, int fd)
-{
-#ifdef UIO_MAXIOV
- w->maxiovecs = UIO_MAXIOV;
-#else
- w->maxiovecs = 16;
-#endif
- w->allociovecs = min(STEP, w->maxiovecs);
- w->niovecs = 0;
- w->iovecs = malloc(w->allociovecs * sizeof(*w->iovecs));
- if (w->iovecs == NULL)
- err (1, "malloc");
- w->fd = fd;
-}
-
-static void
-write_state_add (struct write_state *w, void *v, size_t len)
-{
- if(w->niovecs == w->allociovecs) {
- if(w->niovecs == w->maxiovecs) {
- if(writev (w->fd, w->iovecs, w->niovecs) < 0)
- err(1, "writev");
- w->niovecs = 0;
- } else {
- w->allociovecs = min(w->allociovecs + STEP, w->maxiovecs);
- w->iovecs = realloc (w->iovecs,
- w->allociovecs * sizeof(*w->iovecs));
- if (w->iovecs == NULL)
- errx (1, "realloc");
- }
- }
- w->iovecs[w->niovecs].iov_base = v;
- w->iovecs[w->niovecs].iov_len = len;
- ++w->niovecs;
-}
-
-static void
-write_state_flush (struct write_state *w)
-{
- if (w->niovecs) {
- if (writev (w->fd, w->iovecs, w->niovecs) < 0)
- err (1, "writev");
- w->niovecs = 0;
- }
-}
-
-static void
-write_state_destroy (struct write_state *w)
-{
- free (w->iovecs);
-}
-
-static int
-doit(int s,
- const char *host,
- const char *user,
- const char *outfilename,
- const char *header_str,
- int leavep,
- int verbose,
- int forkp)
-{
- int ret;
- char out_buf[PUSH_BUFSIZ];
- size_t out_len = 0;
- char in_buf[PUSH_BUFSIZ + 1]; /* sentinel */
- size_t in_len = 0;
- char *in_ptr = in_buf;
- pop_state state = INIT;
- unsigned count, bytes;
- unsigned asked_for = 0, retrieved = 0, asked_deleted = 0, deleted = 0;
- unsigned sent_xdele = 0;
- int out_fd;
- char from_line[128];
- size_t from_line_length;
- time_t now;
- struct write_state write_state;
-
- if (do_from) {
- out_fd = -1;
- if (verbose)
- fprintf (stderr, "%s@%s\n", user, host);
- } else {
- out_fd = open(outfilename, O_WRONLY | O_APPEND | O_CREAT, 0666);
- if (out_fd < 0)
- err (1, "open %s", outfilename);
- if (verbose)
- fprintf (stderr, "%s@%s -> %s\n", user, host, outfilename);
- }
-
- now = time(NULL);
- from_line_length = snprintf (from_line, sizeof(from_line),
- "From %s %s", "push", ctime(&now));
-
- out_len = snprintf (out_buf, sizeof(out_buf),
- "USER %s\r\nPASS hej\r\nSTAT\r\n",
- user);
- if (net_write (s, out_buf, out_len) != out_len)
- err (1, "write");
- if (verbose > 1)
- write (STDERR_FILENO, out_buf, out_len);
-
- if (!do_from)
- write_state_init (&write_state, out_fd);
-
- while(state != QUIT) {
- fd_set readset, writeset;
-
- FD_ZERO(&readset);
- FD_ZERO(&writeset);
- FD_SET(s,&readset);
- if (((state == STAT || state == RETR || state == TOP)
- && asked_for < count)
- || (state == XDELE && !sent_xdele)
- || (state == DELE && asked_deleted < count))
- FD_SET(s,&writeset);
- ret = select (s + 1, &readset, &writeset, NULL, NULL);
- if (ret < 0) {
- if (errno == EAGAIN)
- continue;
- else
- err (1, "select");
- }
-
- if (FD_ISSET(s, &readset)) {
- char *beg, *p;
- size_t rem;
- int blank_line = 0;
-
- ret = read (s, in_ptr, sizeof(in_buf) - in_len - 1);
- if (ret < 0)
- err (1, "read");
- else if (ret == 0)
- errx (1, "EOF during read");
-
- in_len += ret;
- in_ptr += ret;
- *in_ptr = '\0';
-
- beg = in_buf;
- rem = in_len;
- while(rem > 1
- && (p = strstr(beg, "\r\n")) != NULL) {
- if (state == TOP) {
- char *copy = beg;
-
- if (strncasecmp(copy,
- header_str,
- min(p - copy + 1, strlen(header_str))) == 0) {
- fprintf (stdout, "%.*s\n", (int)(p - copy), copy);
- }
- if (beg[0] == '.' && beg[1] == '\r' && beg[2] == '\n') {
- state = STAT;
- if (++retrieved == count) {
- state = QUIT;
- net_write (s, "QUIT\r\n", 6);
- if (verbose > 1)
- net_write (STDERR_FILENO, "QUIT\r\n", 6);
- }
- }
- rem -= p - beg + 2;
- beg = p + 2;
- } else if (state == RETR) {
- char *copy = beg;
- if (beg[0] == '.') {
- if (beg[1] == '\r' && beg[2] == '\n') {
- if(!blank_line)
- write_state_add(&write_state, "\n", 1);
- state = STAT;
- rem -= p - beg + 2;
- beg = p + 2;
- if (++retrieved == count) {
- write_state_flush (&write_state);
- if (fsync (out_fd) < 0)
- err (1, "fsync");
- close(out_fd);
- if (leavep) {
- state = QUIT;
- net_write (s, "QUIT\r\n", 6);
- if (verbose > 1)
- net_write (STDERR_FILENO, "QUIT\r\n", 6);
- } else {
- if (forkp) {
- pid_t pid;
-
- pid = fork();
- if (pid < 0)
- warn ("fork");
- else if(pid != 0) {
- if(verbose)
- fprintf (stderr,
- "(exiting)");
- return 0;
- }
- }
-
- state = XDELE;
- if (verbose)
- fprintf (stderr, "deleting... ");
- }
- }
- continue;
- } else
- ++copy;
- }
- *p = '\n';
- if(blank_line &&
- strncmp(copy, "From ", min(p - copy + 1, 5)) == 0)
- write_state_add(&write_state, ">", 1);
- write_state_add(&write_state, copy, p - copy + 1);
- blank_line = (*copy == '\n');
- rem -= p - beg + 2;
- beg = p + 2;
- } else if (rem >= 3 && strncmp (beg, "+OK", 3) == 0) {
- if (state == STAT) {
- if (!do_from)
- write_state_add(&write_state,
- from_line, from_line_length);
- blank_line = 0;
- if (do_from)
- state = TOP;
- else
- state = RETR;
- } else if (state == XDELE) {
- state = QUIT;
- net_write (s, "QUIT\r\n", 6);
- if (verbose > 1)
- net_write (STDERR_FILENO, "QUIT\r\n", 6);
- break;
- } else if (state == DELE) {
- if (++deleted == count) {
- state = QUIT;
- net_write (s, "QUIT\r\n", 6);
- if (verbose > 1)
- net_write (STDERR_FILENO, "QUIT\r\n", 6);
- break;
- }
- } else if (++state == STAT) {
- if(sscanf (beg + 4, "%u %u", &count, &bytes) != 2)
- errx(1, "Bad STAT-line: %.*s", (int)(p - beg), beg);
- if (verbose) {
- fprintf (stderr, "%u message(s) (%u bytes). "
- "fetching... ",
- count, bytes);
- if (do_from)
- fprintf (stderr, "\n");
- } else if (do_count) {
- fprintf (stderr, "%u message(s) (%u bytes).\n",
- count, bytes);
- }
- if (count == 0) {
- state = QUIT;
- net_write (s, "QUIT\r\n", 6);
- if (verbose > 1)
- net_write (STDERR_FILENO, "QUIT\r\n", 6);
- break;
- }
- }
-
- rem -= p - beg + 2;
- beg = p + 2;
- } else {
- if(state == XDELE) {
- state = DELE;
- rem -= p - beg + 2;
- beg = p + 2;
- } else
- errx (1, "Bad response: %.*s", (int)(p - beg), beg);
- }
- }
- if (!do_from)
- write_state_flush (&write_state);
-
- memmove (in_buf, beg, rem);
- in_len = rem;
- in_ptr = in_buf + rem;
- }
- if (FD_ISSET(s, &writeset)) {
- if ((state == STAT && !do_from) || state == RETR)
- out_len = snprintf (out_buf, sizeof(out_buf),
- "RETR %u\r\n", ++asked_for);
- else if ((state == STAT && do_from) || state == TOP)
- out_len = snprintf (out_buf, sizeof(out_buf),
- "TOP %u 0\r\n", ++asked_for);
- else if(state == XDELE) {
- out_len = snprintf(out_buf, sizeof(out_buf),
- "XDELE %u %u\r\n", 1, count);
- sent_xdele++;
- }
- else if(state == DELE)
- out_len = snprintf (out_buf, sizeof(out_buf),
- "DELE %u\r\n", ++asked_deleted);
- if (net_write (s, out_buf, out_len) != out_len)
- err (1, "write");
- if (verbose > 1)
- write (STDERR_FILENO, out_buf, out_len);
- }
- }
- if (verbose)
- fprintf (stderr, "Done\n");
- if (!do_from)
- write_state_destroy (&write_state);
- return 0;
-}
-
-#ifdef KRB5
-static int
-do_v5 (const char *host,
- int port,
- const char *user,
- const char *filename,
- const char *header_str,
- int leavep,
- int verbose,
- int forkp)
-{
- krb5_error_code ret;
- krb5_auth_context auth_context = NULL;
- krb5_principal server;
- int s;
-
- s = do_connect (host, port, 1);
- if (s < 0)
- return 1;
-
- ret = krb5_sname_to_principal (context,
- host,
- "pop",
- KRB5_NT_SRV_HST,
- &server);
- if (ret) {
- warnx ("krb5_sname_to_principal: %s",
- krb5_get_err_text (context, ret));
- return 1;
- }
-
- ret = krb5_sendauth (context,
- &auth_context,
- &s,
- "KPOPV1.0",
- NULL,
- server,
- 0,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL);
- krb5_free_principal (context, server);
- if (ret) {
- warnx ("krb5_sendauth: %s",
- krb5_get_err_text (context, ret));
- return 1;
- }
- return doit (s, host, user, filename, header_str, leavep, verbose, forkp);
-}
-#endif
-
-#ifdef KRB4
-static int
-do_v4 (const char *host,
- int port,
- const char *user,
- const char *filename,
- const char *header_str,
- int leavep,
- int verbose,
- int forkp)
-{
- KTEXT_ST ticket;
- MSG_DAT msg_data;
- CREDENTIALS cred;
- des_key_schedule sched;
- int s;
- int ret;
-
- s = do_connect (host, port, 1);
- if (s < 0)
- return 1;
- ret = krb_sendauth(0,
- s,
- &ticket,
- "pop",
- (char *)host,
- krb_realmofhost(host),
- getpid(),
- &msg_data,
- &cred,
- sched,
- NULL,
- NULL,
- "KPOPV0.1");
- if(ret) {
- warnx("krb_sendauth: %s", krb_get_err_text(ret));
- return 1;
- }
- return doit (s, host, user, filename, header_str, leavep, verbose, forkp);
-}
-#endif /* KRB4 */
-
-#ifdef HESIOD
-
-#ifdef HESIOD_INTERFACES
-
-static char *
-hesiod_get_pobox (const char **user)
-{
- void *context;
- struct hesiod_postoffice *hpo;
- char *ret = NULL;
-
- if(hesiod_init (&context) != 0)
- err (1, "hesiod_init");
-
- hpo = hesiod_getmailhost (context, *user);
- if (hpo == NULL) {
- warn ("hesiod_getmailhost %s", *user);
- } else {
- if (strcasecmp(hpo->hesiod_po_type, "pop") != 0)
- errx (1, "Unsupported po type %s", hpo->hesiod_po_type);
-
- ret = strdup(hpo->hesiod_po_host);
- if(ret == NULL)
- errx (1, "strdup: out of memory");
- *user = strdup(hpo->hesiod_po_name);
- if (*user == NULL)
- errx (1, "strdup: out of memory");
- hesiod_free_postoffice (context, hpo);
- }
- hesiod_end (context);
- return ret;
-}
-
-#else /* !HESIOD_INTERFACES */
-
-static char *
-hesiod_get_pobox (const char **user)
-{
- char *ret = NULL;
- struct hes_postoffice *hpo;
-
- hpo = hes_getmailhost (*user);
- if (hpo == NULL) {
- warn ("hes_getmailhost %s", *user);
- } else {
- if (strcasecmp(hpo->po_type, "pop") != 0)
- errx (1, "Unsupported po type %s", hpo->po_type);
-
- ret = strdup(hpo->po_host);
- if(ret == NULL)
- errx (1, "strdup: out of memory");
- *user = strdup(hpo->po_name);
- if (*user == NULL)
- errx (1, "strdup: out of memory");
- }
- return ret;
-}
-
-#endif /* HESIOD_INTERFACES */
-
-#endif /* HESIOD */
-
-static char *
-get_pobox (const char **user)
-{
- char *ret = NULL;
-
-#ifdef HESIOD
- ret = hesiod_get_pobox (user);
-#endif
-
- if (ret == NULL)
- ret = getenv("MAILHOST");
- if (ret == NULL)
- errx (1, "MAILHOST not set");
- return ret;
-}
-
-static void
-parse_pobox (char *a0, const char **host, const char **user)
-{
- const char *h, *u;
- char *p;
- int po = 0;
-
- if (a0 == NULL) {
-
- *user = getenv ("USERNAME");
- if (*user == NULL) {
- struct passwd *pwd = getpwuid (getuid ());
-
- if (pwd == NULL)
- errx (1, "Who are you?");
- *user = strdup (pwd->pw_name);
- if (*user == NULL)
- errx (1, "strdup: out of memory");
- }
- *host = get_pobox (user);
- return;
- }
-
- /* if the specification starts with po:, remember this information */
- if(strncmp(a0, "po:", 3) == 0) {
- a0 += 3;
- po++;
- }
- /* if there is an `@', the hostname is after it, otherwise at the
- beginning of the string */
- p = strchr(a0, '@');
- if(p != NULL) {
- *p++ = '\0';
- h = p;
- } else {
- h = a0;
- }
- /* if there is a `:', the username comes before it, otherwise at
- the beginning of the string */
- p = strchr(a0, ':');
- if(p != NULL) {
- *p++ = '\0';
- u = p;
- } else {
- u = a0;
- }
- if(h == u) {
- /* some inconsistent compatibility with various mailers */
- if(po) {
- h = get_pobox (&u);
- } else {
- u = get_default_username ();
- if (u == NULL)
- errx (1, "Who are you?");
- }
- }
- *host = h;
- *user = u;
-}
-
-int
-main(int argc, char **argv)
-{
- int port = 0;
- int optind = 0;
- int ret = 1;
- const char *host, *user, *filename = NULL;
- char *pobox = NULL;
-
- set_progname (argv[0]);
-
-#ifdef KRB5
- krb5_init_context (&context);
-#endif
-
- if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv,
- &optind))
- usage (1);
-
- argc -= optind;
- argv += optind;
-
-#if defined(KRB4) && defined(KRB5)
- if(use_v4 == -1 && use_v5 == 1)
- use_v4 = 0;
- if(use_v5 == -1 && use_v4 == 1)
- use_v5 = 0;
-#endif
-
- if (do_help)
- usage (0);
-
- if (do_version) {
- print_version(NULL);
- return 0;
- }
-
- if (do_from && header_str == NULL)
- header_str = "From:";
- else if (header_str != NULL)
- do_from = 1;
-
- if (do_from) {
- if (argc == 0)
- pobox = NULL;
- else if (argc == 1)
- pobox = argv[0];
- else
- usage (1);
- } else {
- if (argc == 1) {
- filename = argv[0];
- pobox = NULL;
- } else if (argc == 2) {
- filename = argv[1];
- pobox = argv[0];
- } else
- usage (1);
- }
-
- if (port_str) {
- struct servent *s = roken_getservbyname (port_str, "tcp");
-
- if (s)
- port = s->s_port;
- else {
- char *ptr;
-
- port = strtol (port_str, &ptr, 10);
- if (port == 0 && ptr == port_str)
- errx (1, "Bad port `%s'", port_str);
- port = htons(port);
- }
- }
- if (port == 0)
-#ifdef KRB5
- port = krb5_getportbyname (context, "kpop", "tcp", 1109);
-#elif defined(KRB4)
- port = k_getportbyname ("kpop", "tcp", 1109);
-#else
-#error must define KRB4 or KRB5
-#endif
-
- parse_pobox (pobox, &host, &user);
-
-#ifdef KRB5
- if (ret && use_v5) {
- ret = do_v5 (host, port, user, filename, header_str,
- do_leave, verbose_level, do_fork);
- }
-#endif
-
-#ifdef KRB4
- if (ret && use_v4) {
- ret = do_v4 (host, port, user, filename, header_str,
- do_leave, verbose_level, do_fork);
- }
-#endif /* KRB4 */
- return ret;
-}
diff --git a/crypto/kerberosIV/appl/push/push.cat8 b/crypto/kerberosIV/appl/push/push.cat8
deleted file mode 100644
index bdd380491baf..000000000000
--- a/crypto/kerberosIV/appl/push/push.cat8
+++ /dev/null
@@ -1,77 +0,0 @@
-
-PUSH(8) UNIX System Manager's Manual PUSH(8)
-
-NNAAMMEE
- ppuusshh - fetch mail via POP
-
-SSYYNNOOPPSSIISS
- ppuusshh [--44 | ----kkrrbb44] [--55 | ----kkrrbb55] [--vv | ----vveerrbboossee] [--ff | ----ffoorrkk] [--ll |
- ----lleeaavvee] [----ffrroomm] [--cc | ----ccoouunntt] [----hheeaaddeerr] [--pp _p_o_r_t_-_s_p_e_c | ----ppoorrtt==_p_o_r_t_-
- _s_p_e_c] _p_o_-_b_o_x _f_i_l_e_n_a_m_e
-
-DDEESSCCRRIIPPTTIIOONN
- ppuusshh retrieves mail from the post office box _p_o_-_b_o_x, and stores the mail
- in mbox format in _f_i_l_e_n_a_m_e. The _p_o_-_b_o_x can have any of the following for-
- mats:
- `hostname:username'
- `po:hostname:username'
- `username@hostname'
- `po:username@hostname'
- `hostname'
- `po:username'
-
- If no username is specified, ppuusshh assumes that it's the same as on the
- local machine; _h_o_s_t_n_a_m_e defaults to the value of the MAILHOST environment
- variable.
-
- Supported options:
-
- --44, ----kkrrbb44
- use Kerberos 4 (if compiled with support for Kerberos 4)
-
- --55, ----kkrrbb55
- use Kerberos 5 (if compiled with support for Kerberos 5)
-
- --ff, ----ffoorrkk
- fork before starting to delete messages
-
- --ll, ----lleeaavvee
- don't delete fetched mail
-
- ----ffrroomm behave like from.
-
- --cc, ----ccoouunntt
- first print how many messages and bytes there are.
-
- ----hheeaaddeerr
- which header from should print.
-
- --pp _p_o_r_t_-_s_p_e_c, ----ppoorrtt==_p_o_r_t_-_s_p_e_c
- use this port instead of the default `kpop' or `1109'.
-
- The default is to first try Kerberos 5 authentication and then, if that
- fails, Kerberos 4.
-
-EENNVVIIRROONNMMEENNTT
- MAILHOST
- points to the post office, if no other hostname is specified.
-
-EEXXAAMMPPLLEESS
- $ push cornfield:roosta ~/.gnus-crash-box
-
- tries to fetch mail for the user _r_o_o_s_t_a from the post office at
- ``cornfield'', and stores the mail in _~_/_._g_n_u_s_-_c_r_a_s_h_-_b_o_x (you are using
- Gnus, aren't you?)
-
- $ push --from -5 havregryn
-
- tries to fetch FFrroomm:: lines for current user at post office ``havregryn''
- using Kerberos 5.
-
-SSEEEE AALLSSOO
- movemail(8), popper(8), from(1)
-
-HHIISSTTOORRYY
- ppuusshh was written while waiting for mmoovveemmaaiill to finish getting the mail.
-
- HEIMDAL May 31, 1998 2
diff --git a/crypto/kerberosIV/appl/push/push_locl.h b/crypto/kerberosIV/appl/push/push_locl.h
deleted file mode 100644
index 1e5ca784c845..000000000000
--- a/crypto/kerberosIV/appl/push/push_locl.h
+++ /dev/null
@@ -1,98 +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. 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: push_locl.h,v 1.6 1999/12/02 16:58:33 joda Exp $ */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#include <ctype.h>
-#include <limits.h>
-#include <time.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_UIO_H
-#include <sys/uio.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_NETINET_TCP_H
-#include <netinet/tcp.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-#ifdef HESIOD
-#include <hesiod.h>
-#endif
-
-#include <roken.h>
-#include <err.h>
-#include <getarg.h>
-#ifdef KRB5
-#include <krb5.h>
-#endif
-
-#ifdef KRB4
-#include <krb.h>
-#endif
diff --git a/crypto/kerberosIV/appl/sample/Makefile.in b/crypto/kerberosIV/appl/sample/Makefile.in
deleted file mode 100644
index d88023a2d287..000000000000
--- a/crypto/kerberosIV/appl/sample/Makefile.in
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/appl/sample/sample.h b/crypto/kerberosIV/appl/sample/sample.h
deleted file mode 100644
index d79d57441a7c..000000000000
--- a/crypto/kerberosIV/appl/sample/sample.h
+++ /dev/null
@@ -1,76 +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.
- */
-
-/* $Id: sample.h,v 1.11 1999/12/02 16:58:33 joda Exp $ */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif /* HAVE_CONFIG_H */
-
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#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_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#include <errno.h>
-#ifdef SOCKS
-#include <socks.h>
-/* This doesn't belong here. */
-struct tm *localtime(const time_t *);
-struct hostent *gethostbyname(const char *);
-#endif
-
-#include <err.h>
-#include <krb.h>
-
-#include <roken.h>
-
-#define SAMPLE_PORT 6354
-
-#define SAMPLE_SERVICE "sample"
-#define SAMPLE_VERSION "VERSION9"
diff --git a/crypto/kerberosIV/appl/sample/sample_client.c b/crypto/kerberosIV/appl/sample/sample_client.c
deleted file mode 100644
index d0ec1c566749..000000000000
--- a/crypto/kerberosIV/appl/sample/sample_client.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- *
- * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
- *
- * For copying and distribution information,
- * please see the file <mit-copyright.h>.
- *
- * sample_client:
- * A sample Kerberos client, which connects to a server on a remote host,
- * at port "sample" (be sure to define it in /etc/services)
- * and authenticates itself to the server. The server then writes back
- * (in ASCII) the authenticated name.
- *
- * Usage:
- * sample_client <hostname> <checksum>
- *
- * <hostname> is the name of the foreign host to contact.
- *
- * <checksum> is an integer checksum to be used for the call to krb_mk_req()
- * and mutual authentication
- *
- */
-
-#include "sample.h"
-
-RCSID("$Id: sample_client.c,v 1.21 1999/11/13 06:27:01 assar Exp $");
-
-static void
-usage (void)
-{
- fprintf (stderr, "Usage: %s [-s service] [-p port] hostname checksum\n",
- __progname);
- exit (1);
-}
-
-int
-main(int argc, char **argv)
-{
- struct hostent *hp;
- struct sockaddr_in sin, lsin;
- char *remote_host;
- int status;
- int namelen;
- int sock = -1;
- KTEXT_ST ticket;
- char buf[512];
- long authopts;
- MSG_DAT msg_data;
- CREDENTIALS cred;
- des_key_schedule sched;
- u_int32_t cksum;
- int c;
- char service[SNAME_SZ];
- u_int16_t port;
- struct servent *serv;
- char **h_addr_list;
-
- set_progname (argv[0]);
- strlcpy (service, SAMPLE_SERVICE, sizeof(service));
- port = 0;
-
- while ((c = getopt(argc, argv, "s:p:")) != -1)
- switch(c) {
- case 's' :
- strlcpy (service, optarg, sizeof(service));
- break;
- case 'p' :
- serv = getservbyname (optarg, "tcp");
- if (serv)
- port = serv->s_port;
- else
- port = htons(atoi(optarg));
- break;
- case '?' :
- default :
- usage();
- }
-
- argc -= optind;
- argv += optind;
-
- if (argc != 2)
- usage ();
-
- /* convert cksum to internal rep */
- cksum = atoi(argv[1]);
-
- printf("Setting checksum to %ld\n", (long)cksum);
-
- /* clear out the structure first */
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- if (port)
- sin.sin_port = port;
- else
- sin.sin_port = k_getportbyname (service, "tcp", htons(SAMPLE_PORT));
-
- /* look up the server host */
- hp = gethostbyname(argv[0]);
- if (hp == NULL)
- errx (1, "gethostbyname(%s): %s", argv[0],
- hstrerror(h_errno));
-
- /* copy the hostname into non-volatile storage */
- remote_host = strdup(hp->h_name);
- if (remote_host == NULL)
- errx (1, "strdup: out of memory");
-
- /* set up the address of the foreign socket for connect() */
- sin.sin_family = hp->h_addrtype;
-
- for (h_addr_list = hp->h_addr_list;
- *h_addr_list;
- ++h_addr_list) {
- memcpy(&sin.sin_addr, *h_addr_list, sizeof(sin.sin_addr));
- fprintf (stderr, "Trying %s...\n", inet_ntoa(sin.sin_addr));
-
- /* open a TCP socket */
- sock = socket(PF_INET, SOCK_STREAM, 0);
- if (sock < 0)
- err (1, "socket");
-
- /* connect to the server */
- if (connect(sock, (struct sockaddr *)&sin, sizeof(sin)) >= 0)
- break;
- close (sock);
- }
-
- if (*h_addr_list == NULL)
- err (1, "connect");
-
- /* find out who I am, now that we are connected and therefore bound */
- namelen = sizeof(lsin);
- if (getsockname(sock, (struct sockaddr *) &lsin, &namelen) < 0) {
- close (sock);
- err (1, "getsockname");
- }
-
- /* call Kerberos library routine to obtain an authenticator,
- pass it over the socket to the server, and obtain mutual
- authentication. */
-
- authopts = KOPT_DO_MUTUAL;
- status = krb_sendauth(authopts, sock, &ticket,
- service, remote_host,
- NULL, cksum, &msg_data, &cred,
- sched, &lsin, &sin, SAMPLE_VERSION);
- if (status != KSUCCESS)
- errx (1, "cannot authenticate to server: %s",
- krb_get_err_text(status));
-
- /* After we send the authenticator to the server, it will write
- back the name we authenticated to. Read what it has to say. */
- status = read(sock, buf, sizeof(buf));
- if (status < 0)
- errx(1, "read");
-
- /* make sure it's null terminated before printing */
- if (status < sizeof(buf))
- buf[status] = '\0';
- else
- buf[sizeof(buf) - 1] = '\0';
-
- printf("The server says:\n%s\n", buf);
-
- close(sock);
- return 0;
-}
diff --git a/crypto/kerberosIV/appl/sample/sample_server.c b/crypto/kerberosIV/appl/sample/sample_server.c
deleted file mode 100644
index 5442562f3aa3..000000000000
--- a/crypto/kerberosIV/appl/sample/sample_server.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- *
- * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
- *
- * For copying and distribution information,
- * please see the file <mit-copyright.h>.
- *
- * sample_server:
- * A sample Kerberos server, which reads a ticket from a TCP socket,
- * decodes it, and writes back the results (in ASCII) to the client.
- *
- * Usage:
- * sample_server
- *
- * file descriptor 0 (zero) should be a socket connected to the requesting
- * client (this will be correct if this server is started by inetd).
- */
-
-#include "sample.h"
-
-RCSID("$Id: sample_server.c,v 1.14 1999/11/13 06:28:49 assar Exp $");
-
-static void
-usage (void)
-{
- fprintf (stderr, "Usage: %s [-i] [-s service] [-t srvtab]\n",
- __progname);
- exit (1);
-}
-
-int
-main(int argc, char **argv)
-{
- struct sockaddr_in peername, myname;
- int namelen = sizeof(peername);
- int status, count, len;
- long authopts;
- AUTH_DAT auth_data;
- KTEXT_ST clt_ticket;
- des_key_schedule sched;
- char instance[INST_SZ];
- char service[ANAME_SZ];
- char version[KRB_SENDAUTH_VLEN+1];
- char retbuf[512];
- char lname[ANAME_SZ];
- char srvtab[MaxPathLen];
- int c;
- int no_inetd = 0;
-
- /* open a log connection */
-
- set_progname (argv[0]);
-
- roken_openlog(__progname, LOG_ODELAY, LOG_DAEMON);
-
- strlcpy (service, SAMPLE_SERVICE, sizeof(service));
- *srvtab = '\0';
-
- while ((c = getopt (argc, argv, "s:t:i")) != -1)
- switch (c) {
- case 's' :
- strlcpy (service, optarg, sizeof(service));
- break;
- case 't' :
- strlcpy (srvtab, optarg, sizeof(srvtab));
- break;
- case 'i':
- no_inetd = 1;
- break;
- case '?' :
- default :
- usage ();
- }
-
- if (no_inetd)
- mini_inetd (htons(SAMPLE_PORT));
-
- /*
- * To verify authenticity, we need to know the address of the
- * client.
- */
- if (getpeername(STDIN_FILENO,
- (struct sockaddr *)&peername,
- &namelen) < 0) {
- syslog(LOG_ERR, "getpeername: %m");
- return 1;
- }
-
- /* for mutual authentication, we need to know our address */
- namelen = sizeof(myname);
- if (getsockname(STDIN_FILENO, (struct sockaddr *)&myname, &namelen) < 0) {
- syslog(LOG_ERR, "getsocknamename: %m");
- return 1;
- }
-
- /* read the authenticator and decode it. Using `k_getsockinst' we
- * always get the right instance on a multi-homed host.
- */
- k_getsockinst (STDIN_FILENO, instance, sizeof(instance));
-
- /* we want mutual authentication */
- authopts = KOPT_DO_MUTUAL;
- status = krb_recvauth(authopts, STDIN_FILENO, &clt_ticket,
- service, instance, &peername, &myname,
- &auth_data, srvtab,
- sched, version);
- if (status != KSUCCESS) {
- snprintf(retbuf, sizeof(retbuf),
- "Kerberos error: %s\n",
- krb_get_err_text(status));
- syslog(LOG_ERR, retbuf);
- } else {
- /* Check the version string (KRB_SENDAUTH_VLEN chars) */
- if (strncmp(version, SAMPLE_VERSION, KRB_SENDAUTH_VLEN)) {
- /* didn't match the expected version */
- /* could do something different, but we just log an error
- and continue */
- version[8] = '\0'; /* make sure null term */
- syslog(LOG_ERR, "Version mismatch: '%s' isn't '%s'",
- version, SAMPLE_VERSION);
- }
- /* now that we have decoded the authenticator, translate
- the kerberos principal.instance@realm into a local name */
- if (krb_kntoln(&auth_data, lname) != KSUCCESS)
- strlcpy(lname,
- "*No local name returned by krb_kntoln*",
- sizeof(lname));
- /* compose the reply */
- snprintf(retbuf, sizeof(retbuf),
- "You are %s.%s@%s (local name %s),\n at address %s, version %s, cksum %ld\n",
- auth_data.pname,
- auth_data.pinst,
- auth_data.prealm,
- lname,
- inet_ntoa(peername.sin_addr),
- version,
- (long)auth_data.checksum);
- }
-
- /* write back the response */
- if ((count = write(0, retbuf, (len = strlen(retbuf) + 1))) < 0) {
- syslog(LOG_ERR,"write: %m");
- return 1;
- } else if (count != len) {
- syslog(LOG_ERR, "write count incorrect: %d != %d\n",
- count, len);
- return 1;
- }
-
- /* close up and exit */
- close(0);
- return 0;
-}
diff --git a/crypto/kerberosIV/appl/sample/simple.h b/crypto/kerberosIV/appl/sample/simple.h
deleted file mode 100644
index 17315b33475c..000000000000
--- a/crypto/kerberosIV/appl/sample/simple.h
+++ /dev/null
@@ -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"
diff --git a/crypto/kerberosIV/appl/sample/simple_client.c b/crypto/kerberosIV/appl/sample/simple_client.c
deleted file mode 100644
index 434150d2189b..000000000000
--- a/crypto/kerberosIV/appl/sample/simple_client.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- *
- * Copyright 1989 by the Massachusetts Institute of Technology.
- *
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
- *
- * Simple UDP-based sample client program. For demonstration.
- * This program performs no useful function.
- */
-
-#include "sample.h"
-RCSID("$Id: simple_client.c,v 1.15 1999/11/13 06:29:01 assar Exp $");
-
-#define MSG "hi, Jennifer!" /* message text */
-
-static int
-talkto(char *hostname, char *service, int port)
-{
- int flags = 0; /* flags for sendto() */
- long len;
- u_long cksum = 0L; /* cksum not used */
- char c_realm[REALM_SZ]; /* local Kerberos realm */
- char *s_realm; /* server's Kerberos realm */
-
- KTEXT_ST k; /* Kerberos data */
- KTEXT ktxt = &k;
-
- int sock, i;
- struct hostent *host;
- struct sockaddr_in s_sock; /* server address */
- char myhostname[MaxHostNameLen]; /* local hostname */
-
- /* for krb_mk_safe/priv */
- struct sockaddr_in c_sock; /* client address */
- CREDENTIALS c; /* ticket & session key */
- CREDENTIALS *cred = &c;
-
- /* for krb_mk_priv */
- des_key_schedule sched; /* session key schedule */
-
- /* Look up server host */
- if ((host = gethostbyname(hostname)) == NULL) {
- fprintf(stderr, "%s: unknown host \n", hostname);
- return 1;
- }
-
- /* Set server's address */
- memset(&s_sock, 0, sizeof(s_sock));
- memcpy(&s_sock.sin_addr, host->h_addr, sizeof(s_sock.sin_addr));
- s_sock.sin_family = AF_INET;
- if (port)
- s_sock.sin_port = port;
- else
- s_sock.sin_port = k_getportbyname (service, "tcp", htons(SAMPLE_PORT));
-
- if (gethostname(myhostname, sizeof(myhostname)) < 0) {
- warn("gethostname");
- return 1;
- }
-
- if ((host = gethostbyname(myhostname)) == NULL) {
- fprintf(stderr, "%s: unknown host\n", myhostname);
- return 1;
- }
-
- /* Open a socket */
- if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
- warn("socket SOCK_DGRAM");
- return 1;
- }
-
- memset(&c_sock, 0, sizeof(c_sock));
- memcpy(&c_sock.sin_addr, host->h_addr, sizeof(c_sock.sin_addr));
- c_sock.sin_family = AF_INET;
-
- /* Bind it to set the address; kernel will fill in port # */
- if (bind(sock, (struct sockaddr *)&c_sock, sizeof(c_sock)) < 0) {
- warn("bind");
- return 1;
- }
-
- /* Get local realm, not needed, just an example */
- if ((i = krb_get_lrealm(c_realm, 1)) != KSUCCESS) {
- fprintf(stderr, "can't find local Kerberos realm\n");
- return 1;
- }
- printf("Local Kerberos realm is %s\n", c_realm);
-
- /* Get Kerberos realm of host */
- s_realm = krb_realmofhost(hostname);
-
- /* PREPARE KRB_MK_REQ MESSAGE */
-
- /* Get credentials for server, create krb_mk_req message */
- if ((i = krb_mk_req(ktxt, service, hostname, s_realm, cksum))
- != KSUCCESS) {
- fprintf(stderr, "%s\n", krb_get_err_text(i));
- return 1;
- }
- printf("Got credentials for %s.\n", service);
-
- /* Send authentication info to server */
- i = sendto(sock, (char *)ktxt->dat, ktxt->length, flags,
- (struct sockaddr *)&s_sock, sizeof(s_sock));
- if (i < 0)
- warn("sending datagram message");
- printf("Sent authentication data: %d bytes\n", i);
-
- /* PREPARE KRB_MK_SAFE MESSAGE */
-
- /* Get my address */
- memset(&c_sock, 0, sizeof(c_sock));
- i = sizeof(c_sock);
- if (getsockname(sock, (struct sockaddr *)&c_sock, &i) < 0) {
- warn("getsockname");
- return 1;
- }
-
- /* Get session key */
- i = krb_get_cred(service, hostname, s_realm, cred);
- if (i != KSUCCESS)
- return 1;
-
- /* Make the safe message */
- len = krb_mk_safe(MSG, ktxt->dat, strlen(MSG)+1,
- &cred->session, &c_sock, &s_sock);
-
- /* Send it */
- i = sendto(sock, (char *)ktxt->dat, (int) len, flags,
- (struct sockaddr *)&s_sock, sizeof(s_sock));
- if (i < 0)
- warn("sending safe message");
- printf("Sent checksummed message: %d bytes\n", i);
-
- /* PREPARE KRB_MK_PRIV MESSAGE */
-
-#ifdef NOENCRYPTION
- memset(sched, 0, sizeof(sched));
-#else
- /* Get key schedule for session key */
- des_key_sched(&cred->session, sched);
-#endif
-
- /* Make the encrypted message */
- len = krb_mk_priv(MSG, ktxt->dat, strlen(MSG)+1,
- sched, &cred->session, &c_sock, &s_sock);
-
- /* Send it */
- i = sendto(sock, (char *)ktxt->dat, (int) len, flags,
- (struct sockaddr *)&s_sock, sizeof(s_sock));
- if (i < 0)
- warn("sending encrypted message");
- printf("Sent encrypted message: %d bytes\n", i);
- return 0;
-}
-
-static void
-usage (void)
-{
- fprintf (stderr, "Usage: %s [-s service] [-p port] hostname\n",
- __progname);
- exit (1);
-}
-
-int
-main(int argc, char **argv)
-{
- int ret = 0;
- int port = 0;
- char service[SNAME_SZ];
- struct servent *serv;
- int c;
-
- set_progname (argv[0]);
-
- strlcpy (service, SAMPLE_SERVICE, sizeof(service));
-
- while ((c = getopt(argc, argv, "s:p:")) != -1)
- switch(c) {
- case 's' :
- strlcpy (service, optarg, sizeof(service));
- break;
- case 'p' :
- serv = getservbyname (optarg, "tcp");
- if (serv)
- port = serv->s_port;
- else
- port = htons(atoi(optarg));
- break;
- case '?' :
- default :
- usage();
- }
-
- argc -= optind;
- argv += optind;
-
- while (argc-- > 0)
- ret &= talkto (*argv++, service, port);
- return ret;
-}
diff --git a/crypto/kerberosIV/appl/sample/simple_server.c b/crypto/kerberosIV/appl/sample/simple_server.c
deleted file mode 100644
index 05baa4ee1c4a..000000000000
--- a/crypto/kerberosIV/appl/sample/simple_server.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- *
- * Copyright 1989 by the Massachusetts Institute of Technology.
- *
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
- *
- * Simple UDP-based server application. For demonstration.
- * This program performs no useful function.
- */
-
-#include "sample.h"
-
-RCSID("$Id: simple_server.c,v 1.11 1999/11/13 06:29:24 assar Exp $");
-
-static void
-usage (void)
-{
- fprintf (stderr, "Usage: %s [-p port] [-s service] [-t srvtab]\n",
- __progname);
- exit (1);
-}
-
-int
-main(int argc, char **argv)
-{
- char service[SNAME_SZ];
- char instance[INST_SZ];
- int port;
- char srvtab[MaxPathLen];
- struct sockaddr_in addr, otheraddr;
- int c;
- int sock;
- int i;
- int len;
- KTEXT_ST k;
- KTEXT ktxt = &k;
- AUTH_DAT ad;
- MSG_DAT msg_data;
- des_key_schedule sched;
-
- set_progname (argv[0]);
- strlcpy (service, SAMPLE_SERVICE, sizeof(service));
- strlcpy (instance, "*", sizeof(instance));
- *srvtab = '\0';
- port = 0;
-
- while ((c = getopt (argc, argv, "p:s:t:")) != -1)
- switch (c) {
- case 'p' : {
- struct servent *sp;
-
- sp = getservbyname (optarg, "udp");
- if (sp)
- port = sp->s_port;
- else
- port = htons(atoi(optarg));
- break;
- }
- case 's' :
- strlcpy (service, optarg, sizeof(service));
- break;
- case 't' :
- strlcpy (srvtab, optarg, sizeof(srvtab));
- break;
- case '?' :
- default :
- usage ();
- }
-
- if(port == 0)
- port = k_getportbyname (SAMPLE_SERVICE, "udp", htons(SAMPLE_PORT));
-
- memset (&addr, 0, sizeof(addr));
- addr.sin_family = AF_INET;
- addr.sin_port = port;
-
- sock = socket (AF_INET, SOCK_DGRAM, 0);
- if (sock < 0)
- err (1, "socket");
-
- if (bind (sock, (struct sockaddr *)&addr, sizeof(addr)) < 0)
- err (1, "bind");
-
- /* GET KRB_MK_REQ MESSAGE */
-
- i = read(sock, ktxt->dat, MAX_KTXT_LEN);
- if (i < 0)
- err (1, "read");
-
- printf("Received %d bytes\n", i);
- ktxt->length = i;
-
- /* Check authentication info */
- i = krb_rd_req(ktxt, service, instance, 0, &ad, "");
- if (i != KSUCCESS)
- errx (1, "krb_rd_req: %s", krb_get_err_text(i));
- printf("Got authentication info from %s%s%s@%s\n", ad.pname,
- *ad.pinst ? "." : "", ad.pinst, ad.prealm);
-
- /* GET KRB_MK_SAFE MESSAGE */
-
- /* use "recvfrom" so we know client's address */
- len = sizeof(otheraddr);
- i = recvfrom(sock, ktxt->dat, MAX_KTXT_LEN, 0,
- (struct sockaddr *)&otheraddr, &len);
- if (i < 0)
- err (1, "recvfrom");
- printf("Received %d bytes\n", i);
-
- /* Verify the checksummed message */
- i = krb_rd_safe(ktxt->dat, i, &ad.session, &otheraddr,
- &addr, &msg_data);
- if (i != KSUCCESS)
- errx (1, "krb_rd_safe: %s", krb_get_err_text(i));
- printf("Safe message is: %s\n", msg_data.app_data);
-
- /* NOW GET ENCRYPTED MESSAGE */
-
-#ifdef NOENCRYPTION
- memset(sched, 0, sizeof(sched));
-#else
- /* need key schedule for session key */
- des_key_sched(&ad.session, sched);
-#endif
-
- /* use "recvfrom" so we know client's address */
- len = sizeof(otheraddr);
- i = recvfrom(sock, ktxt->dat, MAX_KTXT_LEN, 0,
- (struct sockaddr *)&otheraddr, &len);
- if (i < 0)
- err (1, "recvfrom");
- printf("Received %d bytes\n", i);
- i = krb_rd_priv(ktxt->dat, i, sched, &ad.session, &otheraddr,
- &addr, &msg_data);
- if (i != KSUCCESS)
- errx (1, "krb_rd_priv: %s", krb_get_err_text(i));
- printf("Decrypted message is: %s\n", msg_data.app_data);
- return(0);
-}
diff --git a/crypto/kerberosIV/cf/ChangeLog b/crypto/kerberosIV/cf/ChangeLog
deleted file mode 100644
index 13d9bfd93d2e..000000000000
--- a/crypto/kerberosIV/cf/ChangeLog
+++ /dev/null
@@ -1,216 +0,0 @@
-1999-11-05 Assar Westerlund <assar@sics.se>
-
- * check-x.m4: include X_PRE_LIBS and X_EXTRA_LIBS when testing
-
-1999-11-01 Assar Westerlund <assar@sics.se>
-
- * Makefile.am.common (install-build-headers): use `cp' instead of
- INSTALL_DATA for copying header files inside the build tree. The
- user might have redefined INSTALL_DATA to specify owners and other
- information.
-
-1999-10-30 Assar Westerlund <assar@sics.se>
-
- * find-func-no-libs2.m4: add yet another argument to allow specify
- linker flags that will be added _before_ the library when trying
- to link
-
- * find-func-no-libs.m4: add yet another argument to allow specify
- linker flags that will be added _before_ the library when trying
- to link
-
-1999-10-12 Assar Westerlund <assar@sics.se>
-
- * find-func-no-libs2.m4 (AC_FIND_FUNC_NO_LIBS2): new argument
- `extra libs'
-
- * find-func-no-libs.m4 (AC_FIND_FUNC_NO_LIBS): new argument `extra
- libs'
-
-1999-09-01 Johan Danielsson <joda@pdc.kth.se>
-
- * capabilities.m4: sgi capabilities
-
-1999-07-29 Assar Westerlund <assar@sics.se>
-
- * have-struct-field.m4: quote macros when undefining
-
-1999-07-28 Assar Westerlund <assar@sics.se>
-
- * Makefile.am.common (install-build-headers): add dependencies
-
-1999-07-24 Assar Westerlund <assar@sics.se>
-
- * have-type.m4: try to get autoheader to co-operate
-
- * have-type.m4: stolen from Arla
-
- * krb-struct-sockaddr-sa-len.m4: not used any longer. removed.
-
-1999-06-13 Assar Westerlund <assar@sics.se>
-
- * krb-struct-spwd.m4: consequent name of cache variables
-
- * krb-func-getlogin.m4: new file for testing for posix (broken)
- getlogin
-
- * shared-libs.m4 (freebsd[34]): don't use ld -Bshareable
-
-1999-06-02 Johan Danielsson <joda@pdc.kth.se>
-
- * check-x.m4: extended test for X
-
-1999-05-14 Assar Westerlund <assar@sics.se>
-
- * check-netinet-ip-and-tcp.m4: proper autoheader tricks
-
- * check-netinet-ip-and-tcp.m4: new file for checking for
- netinet/{ip,tcp}.h. These are special as they on Irix 6.5.3
- require <standards.h> to be included in advance.
-
- * check-xau.m4: we also need to check for XauFilename since it's
- used by appl/kx. And on Irix 6.5 that function requires linking
- with -lX11.
-
-1999-05-08 Assar Westerlund <assar@sics.se>
-
- * krb-find-db.m4: try with more header files than ndbm.h
-
-1999-04-19 Assar Westerlund <assar@sics.se>
-
- * test-package.m4: try to handle the case of --without-package
- correctly
-
-1999-04-17 Assar Westerlund <assar@sics.se>
-
- * make-aclocal: removed. Not used anymore, being replaced by
- aclocal from automake.
-
-Thu Apr 15 14:17:26 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * make-proto.pl: handle __attribute__
-
-Fri Apr 9 20:37:18 1999 Assar Westerlund <assar@sics.se>
-
- * shared-libs.m4: quote $@
- (freebsd3): add install_symlink_command2
-
-Wed Apr 7 20:40:22 1999 Assar Westerlund <assar@sics.se>
-
- * shared-libs.m4 (hpux): no library dependencies
-
-Mon Apr 5 16:13:08 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * test-package.m4: compile and link, rather than looking for
- files; also export more information, so it's possible to add rpath
- information
-
-Tue Mar 30 13:49:54 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am.common: CFLAGS -> AM_CFLAGS
-
-Mon Mar 29 16:51:12 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * check-xau.m4: check for XauWriteAuth before checking for
- XauReadAuth to catch -lX11:s not containing XauWriteAuth, and IRIX
- 6.5 that doesn't work with -lXau
-
-Sat Mar 27 18:03:58 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * osfc2.m4: --enable-osfc2
-
-Fri Mar 19 15:34:52 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * shared-libs.m4: move shared lib stuff here
-
-Wed Mar 24 23:24:51 1999 Assar Westerlund <assar@sics.se>
-
- * Makefile.am.common (install-build-headers): simplify loop
-
-Tue Mar 23 17:31:23 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * check-getpwnam_r-posix.m4: check for getpwnam_r, and if it's
- posix or not
-
-Tue Mar 23 00:00:13 1999 Assar Westerlund <assar@sics.se>
-
- * Makefile.am.common (install_build_headers): try to make it work
- better when list of headers is empty. handle make rewriting the
- filenames.
-
- * Makefile.am.common: hesoid -> hesiod
-
-Sun Mar 21 14:48:03 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * grok-type.m4: <bind/bitypes.h>
-
- * Makefile.am.common: fix for automake bug/feature; add more LIB_*
-
- * test-package.m4: fix typo
-
- * check-man.m4: fix some typos
-
- * auth-modules.m4: tests for authentication modules
-
-Thu Mar 18 11:02:55 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am.common: make install-build-headers a multi
- dependency target
-
- * Makefile.am.common: remove include_dir hack
-
- * Makefile.am.common: define LIB_kafs and LIB_gssapi
-
- * krb-find-db.m4: subst DBLIB also
-
- * check-xau.m4: test for Xau{Read,Write}Auth
-
-Wed Mar 10 19:29:20 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * wflags.m4: AC_WFLAGS
-
-Mon Mar 1 11:23:41 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * have-struct-field.m4: remove extra AC_MSG_RESULT
-
- * proto-compat.m4: typo
-
- * krb-func-getcwd-broken.m4: update to autoconf 2.13
-
- * krb-find-db.m4: update to autoconf 2.13
-
- * check-declaration.m4: typo
-
- * have-pragma-weak.m4: update to autoconf 2.13
-
- * have-struct-field.m4: better handling of types with spaces
-
-Mon Feb 22 20:05:06 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * broken-glob.m4: check for broken glob
-
-Sun Jan 31 06:50:33 1999 Assar Westerlund <assar@sics.se>
-
- * krb-ipv6.m4: more magic for different v6 implementations. From
- Jun-ichiro itojun Hagino <itojun@kame.net>
-
-Sun Nov 22 12:16:06 1998 Assar Westerlund <assar@sics.se>
-
- * krb-struct-spwd.m4: new file
-
-Thu Jun 4 04:07:41 1998 Assar Westerlund <assar@sics.se>
-
- * find-func-no-libs2.m4: new file
-
-Fri May 1 23:31:28 1998 Assar Westerlund <assar@sics.se>
-
- * c-attribute.m4, c-function.m4: new files (from arla)
-
-Wed Mar 18 23:11:29 1998 Assar Westerlund <assar@sics.se>
-
- * krb-ipv6.m4: rename HAVE_STRUCT_SOCKADDR_IN6 to HAVE_IPV6
-
-Thu Feb 26 02:37:49 1998 Assar Westerlund <assar@sics.se>
-
- * make-proto.pl: should work with perl4
-
diff --git a/crypto/kerberosIV/cf/Makefile.am.common b/crypto/kerberosIV/cf/Makefile.am.common
deleted file mode 100644
index e7d747b269dc..000000000000
--- a/crypto/kerberosIV/cf/Makefile.am.common
+++ /dev/null
@@ -1,255 +0,0 @@
-# $Id: Makefile.am.common,v 1.13 1999/11/01 03:19:58 assar Exp $
-
-AUTOMAKE_OPTIONS = foreign no-dependencies
-
-SUFFIXES = .et .h
-
-INCLUDES = -I$(top_builddir)/include
-
-AM_CFLAGS += $(WFLAGS)
-
-COMPILE_ET = $(top_builddir)/lib/com_err/compile_et
-
-## set build_HEADERZ to headers that should just be installed in build tree
-
-buildinclude = $(top_builddir)/include
-
-## these aren't detected by automake
-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@
-LIB_readline = @LIB_readline@
-
-LEXLIB = @LEXLIB@
-
-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 " cp $$file $(buildinclude)/$$f"; \
- cp $$file $(buildinclude)/$$f; \
- fi ; \
- done
-
-all-local: install-build-headers
-
-cat1dir = $(mandir)/cat1
-cat3dir = $(mandir)/cat3
-cat5dir = $(mandir)/cat5
-cat8dir = $(mandir)/cat8
-
-MANRX = \(.*\)\.\([0-9]\)
-CATSUFFIX = @CATSUFFIX@
-
-SUFFIXES += .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
-
-NROFF_MAN = groff -mandoc -Tascii
-#NROFF_MAN = nroff -man
-.1.cat1:
- $(NROFF_MAN) $< > $@
-.3.cat3:
- $(NROFF_MAN) $< > $@
-.5.cat5:
- $(NROFF_MAN) $< > $@
-.8.cat8:
- $(NROFF_MAN) $< > $@
-
-## MAINTAINERCLEANFILES +=
-
-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) $<
-
-if KRB4
-LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
-endif
-
-if KRB5
-LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \
- $(top_builddir)/lib/asn1/libasn1.la
-LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
-endif
-
diff --git a/crypto/kerberosIV/cf/auth-modules.m4 b/crypto/kerberosIV/cf/auth-modules.m4
deleted file mode 100644
index 2f11c7354cde..000000000000
--- a/crypto/kerberosIV/cf/auth-modules.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/broken-glob.m4 b/crypto/kerberosIV/cf/broken-glob.m4
deleted file mode 100644
index 8d5279275006..000000000000
--- a/crypto/kerberosIV/cf/broken-glob.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/broken-snprintf.m4 b/crypto/kerberosIV/cf/broken-snprintf.m4
deleted file mode 100644
index efd69f0aa53d..000000000000
--- a/crypto/kerberosIV/cf/broken-snprintf.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/broken.m4 b/crypto/kerberosIV/cf/broken.m4
deleted file mode 100644
index 404406470476..000000000000
--- a/crypto/kerberosIV/cf/broken.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/c-attribute.m4 b/crypto/kerberosIV/cf/c-attribute.m4
deleted file mode 100644
index 87cea037b173..000000000000
--- a/crypto/kerberosIV/cf/c-attribute.m4
+++ /dev/null
@@ -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__)
-])
-
diff --git a/crypto/kerberosIV/cf/c-function.m4 b/crypto/kerberosIV/cf/c-function.m4
deleted file mode 100644
index b16d5562bb0a..000000000000
--- a/crypto/kerberosIV/cf/c-function.m4
+++ /dev/null
@@ -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__)
-])
-
diff --git a/crypto/kerberosIV/cf/capabilities.m4 b/crypto/kerberosIV/cf/capabilities.m4
deleted file mode 100644
index 6d2669bfe130..000000000000
--- a/crypto/kerberosIV/cf/capabilities.m4
+++ /dev/null
@@ -1,14 +0,0 @@
-dnl
-dnl $Id: capabilities.m4,v 1.2 1999/09/01 11:02:26 joda Exp $
-dnl
-
-dnl
-dnl Test SGI capabilities
-dnl
-
-AC_DEFUN(KRB_CAPABILITIES,[
-
-AC_CHECK_HEADERS(capability.h sys/capability.h)
-
-AC_CHECK_FUNCS(sgi_getcapabilitybyname cap_set_proc)
-])
diff --git a/crypto/kerberosIV/cf/check-declaration.m4 b/crypto/kerberosIV/cf/check-declaration.m4
deleted file mode 100644
index 5f584e5c38f3..000000000000
--- a/crypto/kerberosIV/cf/check-declaration.m4
+++ /dev/null
@@ -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])
-])
diff --git a/crypto/kerberosIV/cf/check-getpwnam_r-posix.m4 b/crypto/kerberosIV/cf/check-getpwnam_r-posix.m4
deleted file mode 100644
index cc75666a6daf..000000000000
--- a/crypto/kerberosIV/cf/check-getpwnam_r-posix.m4
+++ /dev/null
@@ -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
-]) \ No newline at end of file
diff --git a/crypto/kerberosIV/cf/check-man.m4 b/crypto/kerberosIV/cf/check-man.m4
deleted file mode 100644
index 21330697d499..000000000000
--- a/crypto/kerberosIV/cf/check-man.m4
+++ /dev/null
@@ -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)
-
-]) \ No newline at end of file
diff --git a/crypto/kerberosIV/cf/check-netinet-ip-and-tcp.m4 b/crypto/kerberosIV/cf/check-netinet-ip-and-tcp.m4
deleted file mode 100644
index 8cb529de2379..000000000000
--- a/crypto/kerberosIV/cf/check-netinet-ip-and-tcp.m4
+++ /dev/null
@@ -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
-
-])
diff --git a/crypto/kerberosIV/cf/check-type-extra.m4 b/crypto/kerberosIV/cf/check-type-extra.m4
deleted file mode 100644
index e6af4bd51377..000000000000
--- a/crypto/kerberosIV/cf/check-type-extra.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/check-var.m4 b/crypto/kerberosIV/cf/check-var.m4
deleted file mode 100644
index 9f37366d73e7..000000000000
--- a/crypto/kerberosIV/cf/check-var.m4
+++ /dev/null
@@ -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])
-])
diff --git a/crypto/kerberosIV/cf/check-x.m4 b/crypto/kerberosIV/cf/check-x.m4
deleted file mode 100644
index 1791e5aaf95b..000000000000
--- a/crypto/kerberosIV/cf/check-x.m4
+++ /dev/null
@@ -1,52 +0,0 @@
-dnl
-dnl See if there is any X11 present
-dnl
-dnl $Id: check-x.m4,v 1.2 1999/11/05 04:25:23 assar Exp $
-
-AC_DEFUN(KRB_CHECK_X,[
-AC_PATH_XTRA
-
-# try to figure out if we need any additional ld flags, like -R
-# and yes, the autoconf X test is utterly broken
-if test "$no_x" != yes; then
- AC_CACHE_CHECK(for special X linker flags,krb_cv_sys_x_libs_rpath,[
- ac_save_libs="$LIBS"
- ac_save_cflags="$CFLAGS"
- CFLAGS="$CFLAGS $X_CFLAGS"
- krb_cv_sys_x_libs_rpath=""
- krb_cv_sys_x_libs=""
- for rflag in "" "-R" "-R " "-rpath "; do
- if test "$rflag" = ""; then
- foo="$X_LIBS"
- else
- foo=""
- for flag in $X_LIBS; do
- case $flag in
- -L*)
- foo="$foo $flag `echo $flag | sed \"s/-L/$rflag/\"`"
- ;;
- *)
- foo="$foo $flag"
- ;;
- esac
- done
- fi
- LIBS="$ac_save_libs $foo $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
- AC_TRY_RUN([
- #include <X11/Xlib.h>
- foo()
- {
- XOpenDisplay(NULL);
- }
- main()
- {
- return 0;
- }
- ], krb_cv_sys_x_libs_rpath="$rflag"; krb_cv_sys_x_libs="$foo"; break,:)
- done
- LIBS="$ac_save_libs"
- CFLAGS="$ac_save_cflags"
- ])
- X_LIBS="$krb_cv_sys_x_libs"
-fi
-])
diff --git a/crypto/kerberosIV/cf/check-xau.m4 b/crypto/kerberosIV/cf/check-xau.m4
deleted file mode 100644
index bad2a6023be5..000000000000
--- a/crypto/kerberosIV/cf/check-xau.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/find-func-no-libs.m4 b/crypto/kerberosIV/cf/find-func-no-libs.m4
deleted file mode 100644
index 3deab02b9d9d..000000000000
--- a/crypto/kerberosIV/cf/find-func-no-libs.m4
+++ /dev/null
@@ -1,9 +0,0 @@
-dnl $Id: find-func-no-libs.m4,v 1.5 1999/10/30 21:08:18 assar Exp $
-dnl
-dnl
-dnl Look for function in any of the specified libraries
-dnl
-
-dnl AC_FIND_FUNC_NO_LIBS(func, libraries, includes, arguments, extra libs, extra args)
-AC_DEFUN(AC_FIND_FUNC_NO_LIBS, [
-AC_FIND_FUNC_NO_LIBS2([$1], ["" $2], [$3], [$4], [$5], [$6])])
diff --git a/crypto/kerberosIV/cf/find-func-no-libs2.m4 b/crypto/kerberosIV/cf/find-func-no-libs2.m4
deleted file mode 100644
index c404a7c1b476..000000000000
--- a/crypto/kerberosIV/cf/find-func-no-libs2.m4
+++ /dev/null
@@ -1,63 +0,0 @@
-dnl $Id: find-func-no-libs2.m4,v 1.3 1999/10/30 21:09:53 assar Exp $
-dnl
-dnl
-dnl Look for function in any of the specified libraries
-dnl
-
-dnl AC_FIND_FUNC_NO_LIBS2(func, libraries, includes, arguments, extra libs, extra args)
-AC_DEFUN(AC_FIND_FUNC_NO_LIBS2, [
-
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(ac_cv_funclib_$1,
-[
-if eval "test \"\$ac_cv_func_$1\" != yes" ; then
- ac_save_LIBS="$LIBS"
- for ac_lib in $2; do
- if test -n "$ac_lib"; then
- ac_lib="-l$ac_lib"
- else
- ac_lib=""
- fi
- LIBS="$6 $ac_lib $5 $ac_save_LIBS"
- AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break)
- done
- eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}"
- LIBS="$ac_save_LIBS"
-fi
-])
-
-eval "ac_res=\$ac_cv_funclib_$1"
-
-dnl autoheader tricks *sigh*
-: << END
-@@@funcs="$funcs $1"@@@
-@@@libs="$libs $2"@@@
-END
-
-# $1
-eval "ac_tr_func=HAVE_[]upcase($1)"
-eval "ac_tr_lib=HAVE_LIB[]upcase($ac_res | sed -e 's/-l//')"
-eval "LIB_$1=$ac_res"
-
-case "$ac_res" in
- yes)
- eval "ac_cv_func_$1=yes"
- eval "LIB_$1="
- AC_DEFINE_UNQUOTED($ac_tr_func)
- AC_MSG_RESULT([yes])
- ;;
- no)
- eval "ac_cv_func_$1=no"
- eval "LIB_$1="
- AC_MSG_RESULT([no])
- ;;
- *)
- eval "ac_cv_func_$1=yes"
- eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
- AC_DEFINE_UNQUOTED($ac_tr_func)
- AC_DEFINE_UNQUOTED($ac_tr_lib)
- AC_MSG_RESULT([yes, in $ac_res])
- ;;
-esac
-AC_SUBST(LIB_$1)
-])
diff --git a/crypto/kerberosIV/cf/find-func.m4 b/crypto/kerberosIV/cf/find-func.m4
deleted file mode 100644
index bb2b3ac70966..000000000000
--- a/crypto/kerberosIV/cf/find-func.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/find-if-not-broken.m4 b/crypto/kerberosIV/cf/find-if-not-broken.m4
deleted file mode 100644
index e855ec7a6903..000000000000
--- a/crypto/kerberosIV/cf/find-if-not-broken.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/grok-type.m4 b/crypto/kerberosIV/cf/grok-type.m4
deleted file mode 100644
index 5bc6a66241fb..000000000000
--- a/crypto/kerberosIV/cf/grok-type.m4
+++ /dev/null
@@ -1,38 +0,0 @@
-dnl $Id: grok-type.m4,v 1.4 1999/11/29 11:16:48 joda Exp $
-dnl
-AC_DEFUN(AC_GROK_TYPE, [
-AC_CACHE_VAL(ac_cv_type_$1,
-AC_TRY_COMPILE([
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-#ifdef HAVE_BIND_BITYPES_H
-#include <bind/bitypes.h>
-#endif
-#ifdef HAVE_NETINET_IN6_MACHTYPES_H
-#include <netinet/in6_machtypes.h>
-#endif
-],
-$i x;
-,
-eval ac_cv_type_$1=yes,
-eval ac_cv_type_$1=no))])
-
-AC_DEFUN(AC_GROK_TYPES, [
-for i in $1; do
- AC_MSG_CHECKING(for $i)
- AC_GROK_TYPE($i)
- eval ac_res=\$ac_cv_type_$i
- if test "$ac_res" = yes; then
- type=HAVE_[]upcase($i)
- AC_DEFINE_UNQUOTED($type)
- fi
- AC_MSG_RESULT($ac_res)
-done
-])
diff --git a/crypto/kerberosIV/cf/have-pragma-weak.m4 b/crypto/kerberosIV/cf/have-pragma-weak.m4
deleted file mode 100644
index 330e6012c8f2..000000000000
--- a/crypto/kerberosIV/cf/have-pragma-weak.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/have-struct-field.m4 b/crypto/kerberosIV/cf/have-struct-field.m4
deleted file mode 100644
index 88ad5c3b29ab..000000000000
--- a/crypto/kerberosIV/cf/have-struct-field.m4
+++ /dev/null
@@ -1,19 +0,0 @@
-dnl $Id: have-struct-field.m4,v 1.6 1999/07/29 01:44:32 assar Exp $
-dnl
-dnl check for fields in a structure
-dnl
-dnl AC_HAVE_STRUCT_FIELD(struct, field, headers)
-
-AC_DEFUN(AC_HAVE_STRUCT_FIELD, [
-define(cache_val, translit(ac_cv_type_$1_$2, [A-Z ], [a-z_]))
-AC_CACHE_CHECK([for $2 in $1], cache_val,[
-AC_TRY_COMPILE([$3],[$1 x; x.$2;],
-cache_val=yes,
-cache_val=no)])
-if test "$cache_val" = yes; then
- define(foo, translit(HAVE_$1_$2, [a-z ], [A-Z_]))
- AC_DEFINE(foo, 1, [Define if $1 has field $2.])
- undefine([foo])
-fi
-undefine([cache_val])
-])
diff --git a/crypto/kerberosIV/cf/have-type.m4 b/crypto/kerberosIV/cf/have-type.m4
deleted file mode 100644
index 79633551c6e5..000000000000
--- a/crypto/kerberosIV/cf/have-type.m4
+++ /dev/null
@@ -1,31 +0,0 @@
-dnl $Id: have-type.m4,v 1.4 1999/07/24 19:23:01 assar Exp $
-dnl
-dnl check for existance of a type
-
-dnl AC_HAVE_TYPE(TYPE,INCLUDES)
-AC_DEFUN(AC_HAVE_TYPE, [
-cv=`echo "$1" | sed 'y%./+- %__p__%'`
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL([ac_cv_type_$cv],
-AC_TRY_COMPILE(
-[#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-$2],
-[$1 foo;],
-eval "ac_cv_type_$cv=yes",
-eval "ac_cv_type_$cv=no"))dnl
-AC_MSG_RESULT(`eval echo \\$ac_cv_type_$cv`)
-if test `eval echo \\$ac_cv_type_$cv` = yes; then
- ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
-dnl autoheader tricks *sigh*
-define(foo,translit($1, [ ], [_]))
-: << END
-@@@funcs="$funcs foo"@@@
-END
-undefine([foo])
- AC_DEFINE_UNQUOTED($ac_tr_hdr, 1)
-fi
-])
diff --git a/crypto/kerberosIV/cf/have-types.m4 b/crypto/kerberosIV/cf/have-types.m4
deleted file mode 100644
index 7c85c5ddddba..000000000000
--- a/crypto/kerberosIV/cf/have-types.m4
+++ /dev/null
@@ -1,14 +0,0 @@
-dnl
-dnl $Id: have-types.m4,v 1.1 1999/07/24 18:38:58 assar Exp $
-dnl
-
-AC_DEFUN(AC_HAVE_TYPES, [
-for i in $1; do
- AC_HAVE_TYPE($i)
-done
-: << END
-changequote(`,')dnl
-@@@funcs="$funcs $1"@@@
-changequote([,])dnl
-END
-])
diff --git a/crypto/kerberosIV/cf/krb-find-db.m4 b/crypto/kerberosIV/cf/krb-find-db.m4
deleted file mode 100644
index 50800497eb5c..000000000000
--- a/crypto/kerberosIV/cf/krb-find-db.m4
+++ /dev/null
@@ -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)
-
-])
diff --git a/crypto/kerberosIV/cf/krb-func-getcwd-broken.m4 b/crypto/kerberosIV/cf/krb-func-getcwd-broken.m4
deleted file mode 100644
index d248922c9768..000000000000
--- a/crypto/kerberosIV/cf/krb-func-getcwd-broken.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/krb-func-getlogin.m4 b/crypto/kerberosIV/cf/krb-func-getlogin.m4
deleted file mode 100644
index 921c5ab8dff0..000000000000
--- a/crypto/kerberosIV/cf/krb-func-getlogin.m4
+++ /dev/null
@@ -1,22 +0,0 @@
-dnl
-dnl $Id: krb-func-getlogin.m4,v 1.1 1999/07/13 17:45:30 assar Exp $
-dnl
-dnl test for POSIX (broken) getlogin
-dnl
-
-
-AC_DEFUN(AC_FUNC_GETLOGIN, [
-AC_CHECK_FUNCS(getlogin setlogin)
-if test "$ac_cv_func_getlogin" = yes; then
-AC_CACHE_CHECK(if getlogin is posix, ac_cv_func_getlogin_posix, [
-if test "$ac_cv_func_getlogin" = yes -a "$ac_cv_func_setlogin" = yes; then
- ac_cv_func_getlogin_posix=no
-else
- ac_cv_func_getlogin_posix=yes
-fi
-])
-if test "$ac_cv_func_getlogin_posix" = yes; then
- AC_DEFINE(POSIX_GETLOGIN, 1, [Define if getlogin has POSIX flavour (and not BSD).])
-fi
-fi
-])
diff --git a/crypto/kerberosIV/cf/krb-ipv6.m4 b/crypto/kerberosIV/cf/krb-ipv6.m4
deleted file mode 100644
index 490058d7c061..000000000000
--- a/crypto/kerberosIV/cf/krb-ipv6.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/krb-prog-ln-s.m4 b/crypto/kerberosIV/cf/krb-prog-ln-s.m4
deleted file mode 100644
index efb706ec2a68..000000000000
--- a/crypto/kerberosIV/cf/krb-prog-ln-s.m4
+++ /dev/null
@@ -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
-])
-
diff --git a/crypto/kerberosIV/cf/krb-prog-ranlib.m4 b/crypto/kerberosIV/cf/krb-prog-ranlib.m4
deleted file mode 100644
index fd1d3db2b9d7..000000000000
--- a/crypto/kerberosIV/cf/krb-prog-ranlib.m4
+++ /dev/null
@@ -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, :)])
diff --git a/crypto/kerberosIV/cf/krb-prog-yacc.m4 b/crypto/kerberosIV/cf/krb-prog-yacc.m4
deleted file mode 100644
index 28ae59c7a378..000000000000
--- a/crypto/kerberosIV/cf/krb-prog-yacc.m4
+++ /dev/null
@@ -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')])
diff --git a/crypto/kerberosIV/cf/krb-struct-spwd.m4 b/crypto/kerberosIV/cf/krb-struct-spwd.m4
deleted file mode 100644
index 4ab81fd34f52..000000000000
--- a/crypto/kerberosIV/cf/krb-struct-spwd.m4
+++ /dev/null
@@ -1,22 +0,0 @@
-dnl $Id: krb-struct-spwd.m4,v 1.3 1999/07/13 21:04:11 assar Exp $
-dnl
-dnl Test for `struct spwd'
-
-AC_DEFUN(AC_KRB_STRUCT_SPWD, [
-AC_MSG_CHECKING(for struct spwd)
-AC_CACHE_VAL(ac_cv_struct_spwd, [
-AC_TRY_COMPILE(
-[#include <pwd.h>
-#ifdef HAVE_SHADOW_H
-#include <shadow.h>
-#endif],
-[struct spwd foo;],
-ac_cv_struct_spwd=yes,
-ac_cv_struct_spwd=no)
-])
-AC_MSG_RESULT($ac_cv_struct_spwd)
-
-if test "$ac_cv_struct_spwd" = "yes"; then
- AC_DEFINE(HAVE_STRUCT_SPWD, 1, [define if you have struct spwd])
-fi
-])
diff --git a/crypto/kerberosIV/cf/krb-struct-winsize.m4 b/crypto/kerberosIV/cf/krb-struct-winsize.m4
deleted file mode 100644
index f89f68337c3a..000000000000
--- a/crypto/kerberosIV/cf/krb-struct-winsize.m4
+++ /dev/null
@@ -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]))
-])
diff --git a/crypto/kerberosIV/cf/krb-sys-aix.m4 b/crypto/kerberosIV/cf/krb-sys-aix.m4
deleted file mode 100644
index a538005513a2..000000000000
--- a/crypto/kerberosIV/cf/krb-sys-aix.m4
+++ /dev/null
@@ -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)
-])
diff --git a/crypto/kerberosIV/cf/krb-sys-nextstep.m4 b/crypto/kerberosIV/cf/krb-sys-nextstep.m4
deleted file mode 100644
index 31dc907be4e1..000000000000
--- a/crypto/kerberosIV/cf/krb-sys-nextstep.m4
+++ /dev/null
@@ -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)
-])
diff --git a/crypto/kerberosIV/cf/krb-version.m4 b/crypto/kerberosIV/cf/krb-version.m4
deleted file mode 100644
index a4a12211a6ea..000000000000
--- a/crypto/kerberosIV/cf/krb-version.m4
+++ /dev/null
@@ -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)
-])
diff --git a/crypto/kerberosIV/cf/make-proto.pl b/crypto/kerberosIV/cf/make-proto.pl
deleted file mode 100644
index 9a47aedbed42..000000000000
--- a/crypto/kerberosIV/cf/make-proto.pl
+++ /dev/null
@@ -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;
diff --git a/crypto/kerberosIV/cf/mips-abi.m4 b/crypto/kerberosIV/cf/mips-abi.m4
deleted file mode 100644
index c7b88150ce25..000000000000
--- a/crypto/kerberosIV/cf/mips-abi.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/misc.m4 b/crypto/kerberosIV/cf/misc.m4
deleted file mode 100644
index 0be97a4758d1..000000000000
--- a/crypto/kerberosIV/cf/misc.m4
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/cf/need-proto.m4 b/crypto/kerberosIV/cf/need-proto.m4
deleted file mode 100644
index 8c8d1d349081..000000000000
--- a/crypto/kerberosIV/cf/need-proto.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/cf/osfc2.m4 b/crypto/kerberosIV/cf/osfc2.m4
deleted file mode 100644
index d8cb2e112210..000000000000
--- a/crypto/kerberosIV/cf/osfc2.m4
+++ /dev/null
@@ -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)
-])
diff --git a/crypto/kerberosIV/cf/proto-compat.m4 b/crypto/kerberosIV/cf/proto-compat.m4
deleted file mode 100644
index 942f658889d2..000000000000
--- a/crypto/kerberosIV/cf/proto-compat.m4
+++ /dev/null
@@ -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])
-]) \ No newline at end of file
diff --git a/crypto/kerberosIV/cf/shared-libs.m4 b/crypto/kerberosIV/cf/shared-libs.m4
deleted file mode 100644
index 9fe576ff8b39..000000000000
--- a/crypto/kerberosIV/cf/shared-libs.m4
+++ /dev/null
@@ -1,187 +0,0 @@
-dnl
-dnl $Id: shared-libs.m4,v 1.4 1999/07/13 17:47:09 assar Exp $
-dnl
-dnl Shared library stuff has to be different everywhere
-dnl
-
-AC_DEFUN(AC_SHARED_LIBS, [
-
-dnl Check if we want to use shared libraries
-AC_ARG_ENABLE(shared,
-[ --enable-shared create shared libraries for Kerberos])
-
-AC_SUBST(CFLAGS)dnl
-AC_SUBST(LDFLAGS)dnl
-
-case ${enable_shared} in
- yes ) enable_shared=yes;;
- no ) enable_shared=no;;
- * ) enable_shared=no;;
-esac
-
-# NOTE: Building shared libraries may not work if you do not use gcc!
-#
-# OS $SHLIBEXT
-# HP-UX sl
-# Linux so
-# NetBSD so
-# FreeBSD so
-# OSF so
-# SunOS5 so
-# SunOS4 so.0.5
-# Irix so
-#
-# LIBEXT is the extension we should build (.a or $SHLIBEXT)
-LINK='$(CC)'
-AC_SUBST(LINK)
-lib_deps=yes
-REAL_PICFLAGS="-fpic"
-LDSHARED='$(CC) $(PICFLAGS) -shared'
-LIBPREFIX=lib
-build_symlink_command=@true
-install_symlink_command=@true
-install_symlink_command2=@true
-REAL_SHLIBEXT=so
-changequote({,})dnl
-SHLIB_VERSION=`echo $VERSION | sed 's/\([0-9.]*\).*/\1/'`
-SHLIB_SONAME=`echo $VERSION | sed 's/\([0-9]*\).*/\1/'`
-changequote([,])dnl
-case "${host}" in
-*-*-hpux*)
- REAL_SHLIBEXT=sl
- REAL_LD_FLAGS='-Wl,+b$(libdir)'
- if test -z "$GCC"; then
- LDSHARED="ld -b"
- REAL_PICFLAGS="+z"
- fi
- lib_deps=no
- ;;
-*-*-linux*)
- LDSHARED='$(CC) -shared -Wl,-soname,$(LIBNAME).so.'"${SHLIB_SONAME}"
- REAL_LD_FLAGS='-Wl,-rpath,$(libdir)'
- REAL_SHLIBEXT=so.$SHLIB_VERSION
- build_symlink_command='$(LN_S) -f [$][@] $(LIBNAME).so'
- install_symlink_command='$(LN_S) -f $(LIB) $(DESTDIR)$(libdir)/$(LIBNAME).so.'"${SHLIB_SONAME}"';$(LN_S) -f $(LIB) $(DESTDIR)$(libdir)/$(LIBNAME).so'
- install_symlink_command2='$(LN_S) -f $(LIB2) $(DESTDIR)$(libdir)/$(LIBNAME2).so.'"${SHLIB_SONAME}"';$(LN_S) -f $(LIB2) $(DESTDIR)$(libdir)/$(LIBNAME2).so'
- ;;
-changequote(,)dnl
-*-*-freebsd[34]*)
-changequote([,])dnl
- REAL_SHLIBEXT=so.$SHLIB_VERSION
- REAL_LD_FLAGS='-Wl,-R$(libdir)'
- build_symlink_command='$(LN_S) -f [$][@] $(LIBNAME).so'
- install_symlink_command='$(LN_S) -f $(LIB) $(DESTDIR)$(libdir)/$(LIBNAME).so'
- install_symlink_command2='$(LN_S) -f $(LIB2) $(DESTDIR)$(libdir)/$(LIBNAME2).so'
- ;;
-*-*-*bsd*)
- REAL_SHLIBEXT=so.$SHLIB_VERSION
- LDSHARED='ld -Bshareable'
- REAL_LD_FLAGS='-Wl,-R$(libdir)'
- ;;
-*-*-osf*)
- REAL_LD_FLAGS='-Wl,-rpath,$(libdir)'
- REAL_PICFLAGS=
- LDSHARED='ld -shared -expect_unresolved \*'
- ;;
-*-*-solaris2*)
- REAL_LD_FLAGS='-Wl,-R$(libdir)'
- if test -z "$GCC"; then
- LDSHARED='$(CC) -G'
- REAL_PICFLAGS="-Kpic"
- fi
- ;;
-*-fujitsu-uxpv*)
- REAL_LD_FLAGS='' # really: LD_RUN_PATH=$(libdir) cc -o ...
- REAL_LINK='LD_RUN_PATH=$(libdir) $(CC)'
- LDSHARED='$(CC) -G'
- REAL_PICFLAGS="-Kpic"
- lib_deps=no # fails in mysterious ways
- ;;
-*-*-sunos*)
- REAL_SHLIBEXT=so.$SHLIB_VERSION
- REAL_LD_FLAGS='-Wl,-L$(libdir)'
- lib_deps=no
- ;;
-*-*-irix*)
- libdir="${libdir}${abilibdirext}"
- REAL_LD_FLAGS="${abi} -Wl,-rpath,\$(libdir)"
- LD_FLAGS="${abi} -Wl,-rpath,\$(libdir)"
- LDSHARED="\$(CC) -shared ${abi}"
- REAL_PICFLAGS=
- CFLAGS="${abi} ${CFLAGS}"
- ;;
-*-*-os2*)
- LIBPREFIX=
- EXECSUFFIX='.exe'
- RANLIB=EMXOMF
- LD_FLAGS=-Zcrtdll
- REAL_SHLIBEXT=nobuild
- ;;
-*-*-cygwin32*)
- EXECSUFFIX='.exe'
- REAL_SHLIBEXT=nobuild
- ;;
-*) REAL_SHLIBEXT=nobuild
- REAL_PICFLAGS=
- ;;
-esac
-
-if test "${enable_shared}" != "yes" ; then
- PICFLAGS=""
- SHLIBEXT="nobuild"
- LIBEXT="a"
- build_symlink_command=@true
- install_symlink_command=@true
- install_symlink_command2=@true
-else
- PICFLAGS="$REAL_PICFLAGS"
- SHLIBEXT="$REAL_SHLIBEXT"
- LIBEXT="$SHLIBEXT"
- AC_MSG_CHECKING(whether to use -rpath)
- case "$libdir" in
- /lib | /usr/lib | /usr/local/lib)
- AC_MSG_RESULT(no)
- REAL_LD_FLAGS=
- LD_FLAGS=
- ;;
- *)
- LD_FLAGS="$REAL_LD_FLAGS"
- test "$REAL_LINK" && LINK="$REAL_LINK"
- AC_MSG_RESULT($LD_FLAGS)
- ;;
- esac
-fi
-
-if test "$lib_deps" = yes; then
- lib_deps_yes=""
- lib_deps_no="# "
-else
- lib_deps_yes="# "
- lib_deps_no=""
-fi
-AC_SUBST(lib_deps_yes)
-AC_SUBST(lib_deps_no)
-
-# use supplied ld-flags, or none if `no'
-if test "$with_ld_flags" = no; then
- LD_FLAGS=
-elif test -n "$with_ld_flags"; then
- LD_FLAGS="$with_ld_flags"
-fi
-
-AC_SUBST(REAL_PICFLAGS) dnl
-AC_SUBST(REAL_SHLIBEXT) dnl
-AC_SUBST(REAL_LD_FLAGS) dnl
-
-AC_SUBST(PICFLAGS) dnl
-AC_SUBST(SHLIBEXT) dnl
-AC_SUBST(LDSHARED) dnl
-AC_SUBST(LD_FLAGS) dnl
-AC_SUBST(LIBEXT) dnl
-AC_SUBST(LIBPREFIX) dnl
-AC_SUBST(EXECSUFFIX) dnl
-
-AC_SUBST(build_symlink_command)dnl
-AC_SUBST(install_symlink_command)dnl
-AC_SUBST(install_symlink_command2)dnl
-])
diff --git a/crypto/kerberosIV/cf/test-package.m4 b/crypto/kerberosIV/cf/test-package.m4
deleted file mode 100644
index 6bae158da60a..000000000000
--- a/crypto/kerberosIV/cf/test-package.m4
+++ /dev/null
@@ -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)
-])
diff --git a/crypto/kerberosIV/cf/wflags.m4 b/crypto/kerberosIV/cf/wflags.m4
deleted file mode 100644
index 6d9e0736618b..000000000000
--- a/crypto/kerberosIV/cf/wflags.m4
+++ /dev/null
@@ -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
-])
diff --git a/crypto/kerberosIV/doc/dir b/crypto/kerberosIV/doc/dir
deleted file mode 100644
index 911f622a2c9d..000000000000
--- a/crypto/kerberosIV/doc/dir
+++ /dev/null
@@ -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:
-
diff --git a/crypto/kerberosIV/etc/inetd.conf.changes.in b/crypto/kerberosIV/etc/inetd.conf.changes.in
deleted file mode 100644
index 2ccb8f5a7d3f..000000000000
--- a/crypto/kerberosIV/etc/inetd.conf.changes.in
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# $Id: inetd.conf.changes.in,v 1.14 1999/11/10 14:21:07 joda Exp $
-#
-# Turn off vanilla rshd and rlogind with an informational message.
-# If you really want this security problem remove the '-v' option!
-shell stream tcp nowait root @prefix@/libexec/rshd rshd -l -L -v
-login stream tcp nowait root @prefix@/libexec/rlogind rlogind -l -v
-#
-# Kerberos rsh
-kshell stream tcp nowait root @prefix@/libexec/rshd rshd -L -k
-ekshell stream tcp nowait root @prefix@/libexec/rshd rshd -L -k -x
-ekshell2 stream tcp nowait root @prefix@/libexec/rshd rshd -L -k -x
-#
-# Kerberos rlogin
-klogin stream tcp nowait root @prefix@/libexec/rlogind rlogind -k
-eklogin stream tcp nowait root @prefix@/libexec/rlogind rlogind -k -x
-#
-# Kerberized telnet and ftp, consider adding '-a user' to
-# disallow cleartext passwords to both telnetd and ftpd.
-telnet stream tcp nowait root @prefix@/libexec/telnetd telnetd -a none
-ftp stream tcp nowait root @prefix@/libexec/ftpd ftpd -l -a none
-#
-# Kerberized POP. Server principal is pop.hostname, *not* rcmd.hostname!
-#kpop stream tcp nowait root @prefix@/libexec/popper popper -k
-#
-# Old POP3 with passwords in clear (not recommended, uses cleartext passwords)
-#pop3 stream tcp nowait root @prefix@/libexec/popper popper
-#
-# Kauthd, support for putting tickets on other machines in a secure fashion.
-kauth stream tcp nowait root @prefix@/libexec/kauthd kauthd
-#
-# Encrypted X connections
-kx stream tcp nowait root @prefix@/libexec/kxd kxd
diff --git a/crypto/kerberosIV/include/bits.c b/crypto/kerberosIV/include/bits.c
deleted file mode 100644
index a2c40bc3df6b..000000000000
--- a/crypto/kerberosIV/include/bits.c
+++ /dev/null
@@ -1,208 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: bits.c,v 1.6 1999/12/02 16:58:36 joda Exp $");
-#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#ifndef HAVE_STRUPR
-static void
-strupr(char *s)
-{
- unsigned char *p = (unsigned char *)s;
- while(*p){
- if(islower(*p))
- *p = toupper(*p);
- p++;
- }
-}
-#endif /* HAVE_STRUPR */
-
-#define BITSIZE(TYPE) \
-{ \
- int b = 0; TYPE x = 1, zero = 0; char *pre = "u_"; \
- char tmp[128], tmp2[128]; \
- while(x){ x <<= 1; b++; if(x < zero) pre=""; } \
- if(b >= len){ \
- int tabs; \
- sprintf(tmp, "%sint%d_t" , pre, len); \
- sprintf(tmp2, "typedef %s %s;", #TYPE, tmp); \
- strupr(tmp); \
- tabs = 5 - strlen(tmp2) / 8; \
- fprintf(f, "%s", tmp2); \
- while(tabs-- > 0) fprintf(f, "\t"); \
- fprintf(f, "/* %2d bits */\n", b); \
- return; \
- } \
-}
-
-#ifndef HAVE___ATTRIBUTE__
-#define __attribute__(x)
-#endif
-
-static void
-try_signed(FILE *f, int len) __attribute__ ((unused));
-
-static void
-try_unsigned(FILE *f, int len) __attribute__ ((unused));
-
-static void
-try_signed(FILE *f, int len)
-{
- BITSIZE(signed char);
- BITSIZE(short);
- BITSIZE(int);
- BITSIZE(long);
-#ifdef HAVE_LONG_LONG
- BITSIZE(long long);
-#endif
- fprintf(f, "/* There is no %d bit type */\n", len);
-}
-
-static void
-try_unsigned(FILE *f, int len)
-{
- BITSIZE(unsigned char);
- BITSIZE(unsigned short);
- BITSIZE(unsigned int);
- BITSIZE(unsigned long);
-#ifdef HAVE_LONG_LONG
- BITSIZE(unsigned long long);
-#endif
- fprintf(f, "/* There is no %d bit type */\n", len);
-}
-
-static int
-print_bt(FILE *f, int flag)
-{
- if(flag == 0){
- fprintf(f, "/* For compatibility with various type definitions */\n");
- fprintf(f, "#ifndef __BIT_TYPES_DEFINED__\n");
- fprintf(f, "#define __BIT_TYPES_DEFINED__\n");
- fprintf(f, "\n");
- }
- return 1;
-}
-
-int main(int argc, char **argv)
-{
- FILE *f;
- int flag;
- char *fn, *hb;
-
- if(argc < 2){
- fn = "bits.h";
- hb = "__BITS_H__";
- f = stdout;
- } else {
- char *p;
- fn = argv[1];
- hb = malloc(strlen(fn) + 5);
- sprintf(hb, "__%s__", fn);
- for(p = hb; *p; p++){
- if(!isalnum((unsigned char)*p))
- *p = '_';
- }
- f = fopen(argv[1], "w");
- }
- fprintf(f, "/* %s -- this file was generated for %s by\n", fn, HOST);
- fprintf(f, " %*s %s */\n\n", (int)strlen(fn), "",
- "$Id: bits.c,v 1.6 1999/12/02 16:58:36 joda Exp $");
- fprintf(f, "#ifndef %s\n", hb);
- fprintf(f, "#define %s\n", hb);
- fprintf(f, "\n");
-#ifdef HAVE_SYS_TYPES_H
- fprintf(f, "#include <sys/types.h>\n");
-#endif
-#ifdef HAVE_INTTYPES_H
- fprintf(f, "#include <inttypes.h>\n");
-#endif
-#ifdef HAVE_SYS_BITYPES_H
- fprintf(f, "#include <sys/bitypes.h>\n");
-#endif
-#ifdef HAVE_NETINET_IN6_MACHTYPES_H
- fprintf(f, "#include <netinet/in6_machtypes.h>\n");
-#endif
- fprintf(f, "\n");
-
- flag = 0;
-#ifndef HAVE_INT8_T
- flag = print_bt(f, flag);
- try_signed (f, 8);
-#endif /* HAVE_INT8_T */
-#ifndef HAVE_INT16_T
- flag = print_bt(f, flag);
- try_signed (f, 16);
-#endif /* HAVE_INT16_T */
-#ifndef HAVE_INT32_T
- flag = print_bt(f, flag);
- try_signed (f, 32);
-#endif /* HAVE_INT32_T */
-#if 0
-#ifndef HAVE_INT64_T
- flag = print_bt(f, flag);
- try_signed (f, 64);
-#endif /* HAVE_INT64_T */
-#endif
-
-#ifndef HAVE_U_INT8_T
- flag = print_bt(f, flag);
- try_unsigned (f, 8);
-#endif /* HAVE_INT8_T */
-#ifndef HAVE_U_INT16_T
- flag = print_bt(f, flag);
- try_unsigned (f, 16);
-#endif /* HAVE_U_INT16_T */
-#ifndef HAVE_U_INT32_T
- flag = print_bt(f, flag);
- try_unsigned (f, 32);
-#endif /* HAVE_U_INT32_T */
-#if 0
-#ifndef HAVE_U_INT64_T
- flag = print_bt(f, flag);
- try_unsigned (f, 64);
-#endif /* HAVE_U_INT64_T */
-#endif
-
- if(flag){
- fprintf(f, "\n");
- fprintf(f, "#endif /* __BIT_TYPES_DEFINED__ */\n\n");
- }
- fprintf(f, "#endif /* %s */\n", hb);
- return 0;
-}
diff --git a/crypto/kerberosIV/include/netdb.x b/crypto/kerberosIV/include/netdb.x
deleted file mode 100644
index 70559184749f..000000000000
--- a/crypto/kerberosIV/include/netdb.x
+++ /dev/null
@@ -1,7 +0,0 @@
-/* fix for broken ultrix netdb.h. */
-#ifndef __NETDB_H__
-#define __NETDB_H__
-
-#include "/usr/include/netdb.h"
-
-#endif /* __NETDB_H__ */
diff --git a/crypto/kerberosIV/include/protos.H b/crypto/kerberosIV/include/protos.H
deleted file mode 100644
index faf911e96615..000000000000
--- a/crypto/kerberosIV/include/protos.H
+++ /dev/null
@@ -1,277 +0,0 @@
-/* -*- C -*-
- * 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.
- */
-
-/*
- * Add here functions that don't have a prototype on your system.
- *
- * $Id: protos.H,v 1.46 1999/12/02 16:58:36 joda Exp $
- */
-
-#ifdef NEED_CRYPT_PROTO
-char *crypt(const char*, const char*);
-#endif
-
-#ifdef NEED_STRTOK_R_PROTO
-char *strtok_r (char *s1, const char *s2, char **lasts);
-#endif
-
-#ifndef HAVE_OPTARG_DECLARATION
-extern char *optarg;
-#endif
-#ifndef HAVE_OPTERR_DECLARATION
-extern int opterr;
-#endif
-#ifndef HAVE_OPTIND_DECLARATION
-extern int optind;
-#endif
-#ifndef HAVE_OPTOPT_DECLARATION
-extern int optopt;
-#endif
-
-#if defined(__GNUC__) && SunOS == 4
-
-/* To get type fd_set */
-#include <sys/types.h>
-#include <sys/time.h>
-
-/* To get struct sockaddr, struct in_addr and struct hostent */
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-
-/* To get struct stat */
-#include <sys/stat.h>
-
-/* To get struct utimbuf */
-#include <utime.h>
-
-#if !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT)
-#define atexit(X) on_exit(X, NULL)
-#define HAVE_ATEXIT 1
-#endif
-#ifdef NEED_UTIME_PROTO
-int utime(const char *, const struct utimbuf *);
-#endif
-int syscall(int, ...);
-pid_t getpid(void);
-int ftruncate(int, off_t);
-int fchmod(int, mode_t);
-int fchown(int fd, int owner, int group);
-int fsync(int);
-int seteuid(uid_t);
-int setreuid(int, int);
-int flock(int, int);
-int gettimeofday(struct timeval *tp, struct timezone *tzp);
-int lstat(const char *, struct stat *);
-int ioctl(int, int, void *);
-int getpriority(int which, int who);
-int setpriority(int which, int who, int priority);
-int getdtablesize(void);
-int initgroups(const char *name, int basegid);
-long ulimit(int cmd, long newlimit);
-int vhangup(void);
-
-int sigblock(int);
-int sigsetmask(int);
-int setitimer(int which, struct itimerval *value, struct itimerval *ovalue);
-
-int munmap(caddr_t addr, int len);
-
-int socket(int, int, int);
-int setsockopt(int, int, int, void *, int);
-int bind(int, void *, int);
-int getsockname(int, struct sockaddr *, int *);
-int accept(int, struct sockaddr *, int *);
-int connect(int, struct sockaddr *, int);
-int listen(int, int);
-int recv(int s, void *buf, int len, int flags);
-int recvfrom(int, char *, int, int, void *, int *);
-int sendto(int, const char *, int, int, void *, int);
-int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
-int shutdown(int, int);
-int getpeername(int, struct sockaddr *, int *);
-int getsockopt(int, int, int, void *, int *);
-int send(int s, const void *msg, int len, int flags);
-struct strbuf;
-int getmsg(int fd, struct strbuf *ctlptr, struct strbuf *dataptr, int *flags);
-
-char *inet_ntoa(struct in_addr in);
-unsigned long inet_addr(const char *cp);
-int gethostname(char *, int);
-struct hostent *gethostbyname(const char *);
-int dn_expand(const u_char *msg,
- const u_char *eomorig,
- const u_char *comp_dn,
- char *exp_dn,
- int length);
-int res_search(const char *dname,
- int class,
- int type,
- u_char *answer,
- int anslen);
-
-int yp_get_default_domain (char **outdomain);
-int innetgr(const char *netgroup, const char *machine,
- const char *user, const char *domain);
-
-char *getwd(char *pathname);
-
-void bzero(char *b, int length);
-int strcasecmp(const char *, const char *);
-void swab(const char *, char *, int);
-int atoi(const char *str);
-char *mktemp(char *);
-void srandom(int seed);
-int random(void);
-
-int rcmd(char **, unsigned short, char *, char *, char *, int *);
-int rresvport(int *);
-int openlog(const char *ident, int logopt, int facility);
-int syslog(int priority, const char *message, ...);
-int ttyslot(void);
-
-char *getpass(const char *);
-
-char *getusershell(void);
-void setpwent();
-void endpwent();
-
-#include <stdio.h>
-int fclose(FILE *);
-
-#endif /* SunOS4 */
-
-#if SunOS == 5
-
-#include <sys/types.h>
-#include <sys/resource.h>
-
-char *getusershell(void);
-char *strtok_r(char *, const char *, char **);
-int getpriority (int which, id_t who);
-int setpriority (int which, id_t who, int prio);
-int getdtablesize (void);
-char *getusershell(void);
-void setusershell(void);
-void endusershell(void);
-
-#if defined(__GNUC__)
-
-int syscall(int, ...);
-int gethostname(char *, int);
-
-struct timeval;
-int gettimeofday(struct timeval *tp, void *);
-
-#endif
-#endif
-
-#if defined(__osf__) /* OSF/1 */
-
-#if 0
-/* To get type fd_set */
-#include <sys/types.h>
-#include <sys/time.h>
-
-int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
-int fsync(int fildes);
-int gethostname(char *address, int address_len);
-int setreuid(int ruid, int euid);
-int ioctl(int d, unsigned long request, void * arg);
-#endif
-int flock(int fildes, int operation);
-int syscall(int, ...);
-
-unsigned short htons(unsigned short hostshort);
-unsigned int htonl(unsigned int hostint);
-unsigned short ntohs(unsigned short netshort);
-unsigned int ntohl(unsigned int netint);
-
-char *mktemp(char *template);
-char *getusershell(void);
-
-int rcmd(char **, unsigned short, char *, char *, char *, int *);
-int rresvport (int *port);
-
-#endif /* OSF/1 */
-
-#if defined(__sgi)
-#include <sys/types.h>
-
-char *ptsname(int fd);
-struct spwd *getspuid(uid_t);
-#endif /* IRIX */
-
-#if defined(__GNUC__) && defined(_AIX) /* AIX */
-
-struct timeval;
-struct timezone;
-int gettimeofday (struct timeval *Tp, void *Tzp);
-
-#endif /* AIX */
-
-#if defined(__GNUC__) && defined(__hpux) /* HP-UX */
-
-int syscall(int, ...);
-
-int vhangup(void);
-
-char *ptsname(int fildes);
-
-void utmpname(const char *file);
-
-int innetgr(const char *netgroup, const char *machine,
- const char *user, const char *domain);
-
-int dn_comp(char *exp_dn, char *comp_dn, int length,
- char **dnptrs, char **lastdnptr);
-
-int res_query(char *dname, int class, int type,
- unsigned char *answer, int anslen);
-
-int dn_expand(char *msg, char *eomorig, char *comp_dn,
- char *exp_dn, int length);
-
-int res_search(char *dname, int class, int type,
- unsigned char *answer, int anslen);
-
-#endif /* HP-UX */
-
-#if defined(WIN32) /* Visual C++ 4.0 (Windows95/NT) */
-
-int open(const char *, int, ...);
-int close(int);
-int read(int, void *, unsigned int);
-int write(int, const void *, unsigned int);
-
-#endif /* WIN32 */
diff --git a/crypto/kerberosIV/include/sys/socket.x b/crypto/kerberosIV/include/sys/socket.x
deleted file mode 100644
index d5678c8ce0c1..000000000000
--- a/crypto/kerberosIV/include/sys/socket.x
+++ /dev/null
@@ -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__ */
diff --git a/crypto/kerberosIV/include/win32/config.h b/crypto/kerberosIV/include/win32/config.h
deleted file mode 100644
index 199961ec77bb..000000000000
--- a/crypto/kerberosIV/include/win32/config.h
+++ /dev/null
@@ -1,1185 +0,0 @@
-/* include/config.h.in. Generated automatically from configure.in by autoheader. */
-
-/* Define if using alloca.c. */
-#undef C_ALLOCA
-
-/* Define to empty if the keyword does not work. */
-#undef const
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-#undef CRAY_STACKSEG_END
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#define gid_t int
-
-/* Define if you have alloca, as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-#undef HAVE_ALLOCA_H
-
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define if your struct stat has st_blksize. */
-#undef HAVE_ST_BLKSIZE
-
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#undef pid_t
-
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
-
-/* Define as the return type of signal handlers (int or void). */
-#undef RETSIGTYPE
-
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
-
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define if `sys_siglist' is declared by <signal.h>. */
-#undef SYS_SIGLIST_DECLARED
-
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#define uid_t int
-
-/* Define if your processor stores words with the most significant
- byte first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
-
-/* Define if the X Window System is missing or not being used. */
-#undef X_DISPLAY_MISSING
-
-/* Define if you have the _getpty function. */
-#undef HAVE__GETPTY
-
-/* Define if you have the _scrsize function. */
-#undef HAVE__SCRSIZE
-
-/* Define if you have the _setsid function. */
-#undef HAVE__SETSID
-
-/* Define if you have the _stricmp function. */
-#define HAVE__STRICMP 1
-
-/* Define if you have the asnprintf function. */
-#undef HAVE_ASNPRINTF
-
-/* Define if you have the asprintf function. */
-#undef HAVE_ASPRINTF
-
-/* Define if you have the atexit function. */
-#undef HAVE_ATEXIT
-
-/* Define if you have the chown function. */
-#undef HAVE_CHOWN
-
-/* Define if you have the chroot function. */
-#undef HAVE_CHROOT
-
-/* Define if you have the crypt function. */
-#undef HAVE_CRYPT
-
-/* Define if you have the daemon function. */
-#undef HAVE_DAEMON
-
-/* Define if you have the dlopen function. */
-#undef HAVE_DLOPEN
-
-/* Define if you have the dn_expand function. */
-#undef HAVE_DN_EXPAND
-
-/* Define if you have the el_init function. */
-#undef HAVE_EL_INIT
-
-/* Define if you have the err function. */
-#undef HAVE_ERR
-
-/* Define if you have the errx function. */
-#undef HAVE_ERRX
-
-/* Define if you have the fattach function. */
-#undef HAVE_FATTACH
-
-/* Define if you have the fchmod function. */
-#undef HAVE_FCHMOD
-
-/* Define if you have the fchown function. */
-#undef HAVE_FCHOWN
-
-/* Define if you have the fcntl function. */
-#undef HAVE_FCNTL
-
-/* Define if you have the flock function. */
-#undef HAVE_FLOCK
-
-/* Define if you have the fnmatch function. */
-#undef HAVE_FNMATCH
-
-/* Define if you have the forkpty function. */
-#undef HAVE_FORKPTY
-
-/* Define if you have the frevoke function. */
-#undef HAVE_FREVOKE
-
-/* Define if you have the getattr function. */
-#undef HAVE_GETATTR
-
-/* Define if you have the getcwd function. */
-#undef HAVE_GETCWD
-
-/* Define if you have the getdtablesize function. */
-#undef HAVE_GETDTABLESIZE
-
-/* Define if you have the getegid function. */
-#undef HAVE_GETEGID
-
-/* Define if you have the geteuid function. */
-#undef HAVE_GETEUID
-
-/* Define if you have the getgid function. */
-#undef HAVE_GETGID
-
-/* Define if you have the gethostbyname function. */
-#define HAVE_GETHOSTBYNAME 1
-
-/* Define if you have the gethostname function. */
-#define HAVE_GETHOSTNAME 1
-
-/* Define if you have the getlogin function. */
-#undef HAVE_GETLOGIN
-
-/* Define if you have the getopt function. */
-#undef HAVE_GETOPT
-
-/* Define if you have the getpagesize function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define if you have the getpriority function. */
-#undef HAVE_GETPRIORITY
-
-/* Define if you have the getpwnam_r function. */
-#undef HAVE_GETPWNAM_R
-
-/* Define if you have the getrlimit function. */
-#undef HAVE_GETRLIMIT
-
-/* Define if you have the getservbyname function. */
-#define HAVE_GETSERVBYNAME 1
-
-/* Define if you have the getsockopt function. */
-#define HAVE_GETSOCKOPT 1
-
-/* Define if you have the getspnam function. */
-#undef HAVE_GETSPNAM
-
-/* Define if you have the getspuid function. */
-#undef HAVE_GETSPUID
-
-/* Define if you have the gettimeofday function. */
-#undef HAVE_GETTIMEOFDAY
-
-/* Define if you have the gettosbyname function. */
-#undef HAVE_GETTOSBYNAME
-
-/* Define if you have the getudbnam function. */
-#undef HAVE_GETUDBNAM
-
-/* Define if you have the getuid function. */
-#undef HAVE_GETUID
-
-/* Define if you have the getusershell function. */
-#undef HAVE_GETUSERSHELL
-
-/* Define if you have the grantpt function. */
-#undef HAVE_GRANTPT
-
-/* Define if you have the hstrerror function. */
-#undef HAVE_HSTRERROR
-
-/* Define if you have the inet_aton function. */
-#undef HAVE_INET_ATON
-
-/* Define if you have the initgroups function. */
-#undef HAVE_INITGROUPS
-
-/* Define if you have the innetgr function. */
-#undef HAVE_INNETGR
-
-/* Define if you have the iruserok function. */
-#undef HAVE_IRUSEROK
-
-/* Define if you have the logout function. */
-#undef HAVE_LOGOUT
-
-/* Define if you have the logwtmp function. */
-#undef HAVE_LOGWTMP
-
-/* Define if you have the lstat function. */
-#undef HAVE_LSTAT
-
-/* Define if you have the memmove function. */
-#define HAVE_MEMMOVE 1
-
-/* Define if you have the mkstemp function. */
-#undef HAVE_MKSTEMP
-
-/* Define if you have the mktime function. */
-#define HAVE_MKTIME 1
-
-/* Define if you have the odm_initialize function. */
-#undef HAVE_ODM_INITIALIZE
-
-/* Define if you have the on_exit function. */
-#undef HAVE_ON_EXIT
-
-/* Define if you have the parsetos function. */
-#undef HAVE_PARSETOS
-
-/* Define if you have the ptsname function. */
-#undef HAVE_PTSNAME
-
-/* Define if you have the putenv function. */
-#undef HAVE_PUTENV
-
-/* Define if you have the rand function. */
-#define HAVE_RAND 1
-
-/* Define if you have the random function. */
-#undef HAVE_RANDOM
-
-/* Define if you have the rcmd function. */
-#undef HAVE_RCMD
-
-/* Define if you have the readline function. */
-#undef HAVE_READLINE
-
-/* Define if you have the readv function. */
-#undef HAVE_READV
-
-/* Define if you have the res_search function. */
-#undef HAVE_RES_SEARCH
-
-/* Define if you have the revoke function. */
-#undef HAVE_REVOKE
-
-/* Define if you have the setegid function. */
-#undef HAVE_SETEGID
-
-/* Define if you have the setenv function. */
-#undef HAVE_SETENV
-
-/* Define if you have the seteuid function. */
-#undef HAVE_SETEUID
-
-/* Define if you have the setitimer function. */
-#undef HAVE_SETITIMER
-
-/* Define if you have the setlim function. */
-#undef HAVE_SETLIM
-
-/* Define if you have the setlogin function. */
-#undef HAVE_SETLOGIN
-
-/* Define if you have the setpcred function. */
-#undef HAVE_SETPCRED
-
-/* Define if you have the setpgid function. */
-#undef HAVE_SETPGID
-
-/* Define if you have the setpriority function. */
-#undef HAVE_SETPRIORITY
-
-/* Define if you have the setproctitle function. */
-#undef HAVE_SETPROCTITLE
-
-/* Define if you have the setregid function. */
-#undef HAVE_SETREGID
-
-/* Define if you have the setresgid function. */
-#undef HAVE_SETRESGID
-
-/* Define if you have the setresuid function. */
-#undef HAVE_SETRESUID
-
-/* Define if you have the setreuid function. */
-#undef HAVE_SETREUID
-
-/* Define if you have the setsid function. */
-#undef HAVE_SETSID
-
-/* Define if you have the setsockopt function. */
-#define HAVE_SETSOCKOPT 1
-
-/* Define if you have the setutent function. */
-#undef HAVE_SETUTENT
-
-/* Define if you have the sigaction function. */
-#undef HAVE_SIGACTION
-
-/* Define if you have the socket function. */
-#define HAVE_SOCKET 1
-
-/* Define if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
-
-/* Define if you have the strdup function. */
-#define HAVE_STRDUP 1
-
-/* Define if you have the strerror function. */
-#undef HAVE_STRERROR
-
-/* Define if you have the strftime function. */
-#define HAVE_STRFTIME 1
-
-/* Define if you have the strlwr function. */
-#define HAVE_STRLWR 1
-
-/* Define if you have the strncasecmp function. */
-#undef HAVE_STRNCASECMP
-
-/* Define if you have the strnlen function. */
-#undef HAVE_STRNLEN
-
-/* Define if you have the strsep function. */
-#undef HAVE_STRSEP
-
-/* Define if you have the strtok_r function. */
-#undef HAVE_STRTOK_R
-
-/* Define if you have the strupr function. */
-#define HAVE_STRUPR 1
-
-/* Define if you have the swab function. */
-#define HAVE_SWAB 1
-
-/* Define if you have the sysconf function. */
-#undef HAVE_SYSCONF
-
-/* Define if you have the sysctl function. */
-#undef HAVE_SYSCTL
-
-/* Define if you have the syslog function. */
-#undef HAVE_SYSLOG
-
-/* Define if you have the tgetent function. */
-#undef HAVE_TGETENT
-
-/* Define if you have the ttyname function. */
-#undef HAVE_TTYNAME
-
-/* Define if you have the ttyslot function. */
-#undef HAVE_TTYSLOT
-
-/* Define if you have the ulimit function. */
-#undef HAVE_ULIMIT
-
-/* Define if you have the uname function. */
-#undef HAVE_UNAME
-
-/* Define if you have the unlockpt function. */
-#undef HAVE_UNLOCKPT
-
-/* Define if you have the unsetenv function. */
-#undef HAVE_UNSETENV
-
-/* Define if you have the vasnprintf function. */
-#undef HAVE_VASNPRINTF
-
-/* Define if you have the vasprintf function. */
-#undef HAVE_VASPRINTF
-
-/* Define if you have the verr function. */
-#undef HAVE_VERR
-
-/* Define if you have the verrx function. */
-#undef HAVE_VERRX
-
-/* Define if you have the vhangup function. */
-#undef HAVE_VHANGUP
-
-/* Define if you have the vsnprintf function. */
-#undef HAVE_VSNPRINTF
-
-/* Define if you have the vsyslog function. */
-#undef HAVE_VSYSLOG
-
-/* Define if you have the vwarn function. */
-#undef HAVE_VWARN
-
-/* Define if you have the vwarnx function. */
-#undef HAVE_VWARNX
-
-/* Define if you have the warn function. */
-#undef HAVE_WARN
-
-/* Define if you have the warnx function. */
-#undef HAVE_WARNX
-
-/* Define if you have the writev function. */
-#undef HAVE_WRITEV
-
-/* Define if you have the XauReadAuth function. */
-#undef HAVE_XAUREADAUTH
-
-/* Define if you have the XauWriteAuth function. */
-#undef HAVE_XAUWRITEAUTH
-
-/* Define if you have the yp_get_default_domain function. */
-#undef HAVE_YP_GET_DEFAULT_DOMAIN
-
-/* Define if you have the <arpa/ftp.h> header file. */
-#undef HAVE_ARPA_FTP_H
-
-/* Define if you have the <arpa/inet.h> header file. */
-#undef HAVE_ARPA_INET_H
-
-/* Define if you have the <arpa/nameser.h> header file. */
-#undef HAVE_ARPA_NAMESER_H
-
-/* Define if you have the <arpa/telnet.h> header file. */
-#undef HAVE_ARPA_TELNET_H
-
-/* Define if you have the <bsd/bsd.h> header file. */
-#undef HAVE_BSD_BSD_H
-
-/* Define if you have the <bsdsetjmp.h> header file. */
-#undef HAVE_BSDSETJMP_H
-
-/* Define if you have the <crypt.h> header file. */
-#undef HAVE_CRYPT_H
-
-/* Define if you have the <curses.h> header file. */
-#undef HAVE_CURSES_H
-
-/* Define if you have the <dbm.h> header file. */
-#undef HAVE_DBM_H
-
-/* Define if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
-
-/* Define if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
-/* Define if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
-/* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define if you have the <fnmatch.h> header file. */
-#undef HAVE_FNMATCH_H
-
-/* Define if you have the <grp.h> header file. */
-#undef HAVE_GRP_H
-
-/* Define if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define if you have the <io.h> header file. */
-#define HAVE_IO_H 1
-
-/* Define if you have the <lastlog.h> header file. */
-#undef HAVE_LASTLOG_H
-
-/* Define if you have the <libutil.h> header file. */
-#undef HAVE_LIBUTIL_H
-
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define if you have the <login.h> header file. */
-#undef HAVE_LOGIN_H
-
-/* Define if you have the <maillock.h> header file. */
-#undef HAVE_MAILLOCK_H
-
-/* Define if you have the <ndbm.h> header file. */
-#undef HAVE_NDBM_H
-
-/* Define if you have the <net/if.h> header file. */
-#undef HAVE_NET_IF_H
-
-/* Define if you have the <net/if_tun.h> header file. */
-#undef HAVE_NET_IF_TUN_H
-
-/* Define if you have the <net/if_var.h> header file. */
-#undef HAVE_NET_IF_VAR_H
-
-/* Define if you have the <netdb.h> header file. */
-#undef HAVE_NETDB_H
-
-/* Define if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
-
-/* Define if you have the <netinet/in6_machtypes.h> header file. */
-#undef HAVE_NETINET_IN6_MACHTYPES_H
-
-/* Define if you have the <netinet/in_systm.h> header file. */
-#undef HAVE_NETINET_IN_SYSTM_H
-
-/* Define if you have the <netinet/ip.h> header file. */
-#undef HAVE_NETINET_IP_H
-
-/* Define if you have the <netinet/tcp.h> header file. */
-#undef HAVE_NETINET_TCP_H
-
-/* Define if you have the <paths.h> header file. */
-#undef HAVE_PATHS_H
-
-/* Define if you have the <pty.h> header file. */
-#undef HAVE_PTY_H
-
-/* Define if you have the <pwd.h> header file. */
-#undef HAVE_PWD_H
-
-/* Define if you have the <resolv.h> header file. */
-#undef HAVE_RESOLV_H
-
-/* Define if you have the <rpcsvc/dbm.h> header file. */
-#undef HAVE_RPCSVC_DBM_H
-
-/* Define if you have the <rpcsvc/ypclnt.h> header file. */
-#undef HAVE_RPCSVC_YPCLNT_H
-
-/* Define if you have the <sac.h> header file. */
-#undef HAVE_SAC_H
-
-/* Define if you have the <security/pam_modules.h> header file. */
-#undef HAVE_SECURITY_PAM_MODULES_H
-
-/* Define if you have the <shadow.h> header file. */
-#undef HAVE_SHADOW_H
-
-/* Define if you have the <siad.h> header file. */
-#undef HAVE_SIAD_H
-
-/* Define if you have the <signal.h> header file. */
-#define HAVE_SIGNAL_H 1
-
-/* Define if you have the <stropts.h> header file. */
-#undef HAVE_STROPTS_H
-
-/* Define if you have the <sys/bitypes.h> header file. */
-#undef HAVE_SYS_BITYPES_H
-
-/* Define if you have the <sys/category.h> header file. */
-#undef HAVE_SYS_CATEGORY_H
-
-/* Define if you have the <sys/file.h> header file. */
-#undef HAVE_SYS_FILE_H
-
-/* Define if you have the <sys/filio.h> header file. */
-#undef HAVE_SYS_FILIO_H
-
-/* Define if you have the <sys/ioccom.h> header file. */
-#undef HAVE_SYS_IOCCOM_H
-
-/* Define if you have the <sys/ioctl.h> header file. */
-#undef HAVE_SYS_IOCTL_H
-
-/* Define if you have the <sys/locking.h> header file. */
-#define HAVE_SYS_LOCKING_H 1
-
-/* Define if you have the <sys/mman.h> header file. */
-#undef HAVE_SYS_MMAN_H
-
-/* Define if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define if you have the <sys/proc.h> header file. */
-#undef HAVE_SYS_PROC_H
-
-/* Define if you have the <sys/pty.h> header file. */
-#undef HAVE_SYS_PTY_H
-
-/* Define if you have the <sys/ptyio.h> header file. */
-#undef HAVE_SYS_PTYIO_H
-
-/* Define if you have the <sys/ptyvar.h> header file. */
-#undef HAVE_SYS_PTYVAR_H
-
-/* Define if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define if you have the <sys/sockio.h> header file. */
-#undef HAVE_SYS_SOCKIO_H
-
-/* Define if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define if you have the <sys/str_tty.h> header file. */
-#undef HAVE_SYS_STR_TTY_H
-
-/* Define if you have the <sys/stream.h> header file. */
-#undef HAVE_SYS_STREAM_H
-
-/* Define if you have the <sys/stropts.h> header file. */
-#undef HAVE_SYS_STROPTS_H
-
-/* Define if you have the <sys/strtty.h> header file. */
-#undef HAVE_SYS_STRTTY_H
-
-/* Define if you have the <sys/syscall.h> header file. */
-#undef HAVE_SYS_SYSCALL_H
-
-/* Define if you have the <sys/sysctl.h> header file. */
-#undef HAVE_SYS_SYSCTL_H
-
-/* Define if you have the <sys/termio.h> header file. */
-#undef HAVE_SYS_TERMIO_H
-
-/* Define if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define if you have the <sys/timeb.h> header file. */
-#define HAVE_SYS_TIMEB_H 1
-
-/* Define if you have the <sys/times.h> header file. */
-#undef HAVE_SYS_TIMES_H
-
-/* Define if you have the <sys/tty.h> header file. */
-#undef HAVE_SYS_TTY_H
-
-/* Define if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define if you have the <sys/uio.h> header file. */
-#undef HAVE_SYS_UIO_H
-
-/* Define if you have the <sys/un.h> header file. */
-#undef HAVE_SYS_UN_H
-
-/* Define if you have the <sys/utsname.h> header file. */
-#undef HAVE_SYS_UTSNAME_H
-
-/* Define if you have the <sys/wait.h> header file. */
-#undef HAVE_SYS_WAIT_H
-
-/* Define if you have the <syslog.h> header file. */
-#undef HAVE_SYSLOG_H
-
-/* Define if you have the <term.h> header file. */
-#undef HAVE_TERM_H
-
-/* Define if you have the <termcap.h> header file. */
-#undef HAVE_TERMCAP_H
-
-/* Define if you have the <termio.h> header file. */
-#undef HAVE_TERMIO_H
-
-/* Define if you have the <termios.h> header file. */
-#undef HAVE_TERMIOS_H
-
-/* Define if you have the <tmpdir.h> header file. */
-#undef HAVE_TMPDIR_H
-
-/* Define if you have the <ttyent.h> header file. */
-#undef HAVE_TTYENT_H
-
-/* Define if you have the <udb.h> header file. */
-#undef HAVE_UDB_H
-
-/* Define if you have the <ulimit.h> header file. */
-#undef HAVE_ULIMIT_H
-
-/* Define if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the <userpw.h> header file. */
-#undef HAVE_USERPW_H
-
-/* Define if you have the <usersec.h> header file. */
-#undef HAVE_USERSEC_H
-
-/* Define if you have the <util.h> header file. */
-#undef HAVE_UTIL_H
-
-/* Define if you have the <utime.h> header file. */
-#undef HAVE_UTIME_H
-
-/* Define if you have the <utmp.h> header file. */
-#undef HAVE_UTMP_H
-
-/* Define if you have the <utmpx.h> header file. */
-#undef HAVE_UTMPX_H
-
-/* Define if you have the <wait.h> header file. */
-#undef HAVE_WAIT_H
-
-/* Define if you have the c_r library (-lc_r). */
-#undef HAVE_LIBC_R
-
-/* Define if you have the cfg library (-lcfg). */
-#undef HAVE_LIBCFG
-
-/* Define if you have the crypt library (-lcrypt). */
-#undef HAVE_LIBCRYPT
-
-/* Define if you have the curses library (-lcurses). */
-#undef HAVE_LIBCURSES
-
-/* Define if you have the dl library (-ldl). */
-#undef HAVE_LIBDL
-
-/* Define if you have the edit library (-ledit). */
-#undef HAVE_LIBEDIT
-
-/* Define if you have the ncurses library (-lncurses). */
-#undef HAVE_LIBNCURSES
-
-/* Define if you have the nsl library (-lnsl). */
-#undef HAVE_LIBNSL
-
-/* Define if you have the odm library (-lodm). */
-#undef HAVE_LIBODM
-
-/* Define if you have the readline library (-lreadline). */
-#undef HAVE_LIBREADLINE
-
-/* Define if you have the resolv library (-lresolv). */
-#undef HAVE_LIBRESOLV
-
-/* Define if you have the s library (-ls). */
-#undef HAVE_LIBS
-
-/* Define if you have the socket library (-lsocket). */
-#undef HAVE_LIBSOCKET
-
-/* Define if you have the syslog library (-lsyslog). */
-#undef HAVE_LIBSYSLOG
-
-/* Define if you have the termcap library (-ltermcap). */
-#undef HAVE_LIBTERMCAP
-
-/* Define if you have the util library (-lutil). */
-#undef HAVE_LIBUTIL
-
-/* Define if you have the X11 library (-lX11). */
-#undef HAVE_LIBX11
-
-/* Define if you have the Xau library (-lXau). */
-#undef HAVE_LIBXAU
-
-/* Name of package */
-#undef PACKAGE
-
-/* Version number of package */
-#undef VERSION
-
-/* Define if you have the socks package */
-#undef SOCKS
-
-/* Define to enable old kdestroy behavior. */
-#undef LEGACY_KDESTROY
-
-/* Define if you want to match subdomains. */
-#undef MATCH_SUBDOMAINS
-
-/* Define this to be the directory where the
- dictionary for cracklib resides. */
-#undef DICTPATH
-
-/* Define this to the path of the mail spool directory. */
-#undef KRB4_MAILDIR
-
-/* Define this to the kerberos database directory. */
-#undef DB_DIR
-
-/* Define to enable new master key code. */
-#undef RANDOM_MKEY
-
-/* Define this to the location of the master key. */
-#undef MKEYFILE
-
-/* Define to enable basic OSF C2 support. */
-#undef HAVE_OSFC2
-
-/* Define if you don't want to use mmap. */
-#undef NO_MMAP
-
-/* Define if you don't wan't support for AFS. */
-#undef NO_AFS
-
-/* Set this to the type of des-quad-cheksum to use. */
-#define DES_QUAD_DEFAULT DES_QUAD_GUESS
-
-/* Define if you have the readline package */
-#undef READLINE
-
-/* Define if you have the hesiod package */
-#undef HESIOD
-
-/* define if your compiler has __attribute__ */
-#undef HAVE___ATTRIBUTE__
-
-/* Huh? */
-#undef HAVE_STRANGE_INT8_T
-
-/* Define if NDBM really is DB (creates files ending in .db). */
-#undef HAVE_NEW_DB
-
-/* Define if you have NDBM (and not DBM) */
-#undef NDBM
-
-/* define if you have a working snprintf */
-#undef HAVE_SNPRINTF
-
-/* define if the system is missing a prototype for snprintf() */
-#undef NEED_SNPRINTF_PROTO
-
-/* define if you have a glob() that groks
- GLOB_BRACE, GLOB_NOCHECK, GLOB_QUOTE, and GLOB_TILDE */
-#undef HAVE_GLOB
-
-/* define if the system is missing a prototype for glob() */
-#undef NEED_GLOB_PROTO
-
-/* Define if getpwnam_r has POSIX flavour. */
-#undef POSIX_GETPWNAM_R
-
-/* Define if getlogin has POSIX flavour (and not BSD). */
-#undef POSIX_GETLOGIN
-
-/* define if the system is missing a prototype for hstrerror() */
-#undef NEED_HSTRERROR_PROTO
-
-/* define if the system is missing a prototype for gethostname() */
-#undef NEED_GETHOSTNAME_PROTO
-
-/* define if the system is missing a prototype for mkstemp() */
-#undef NEED_MKSTEMP_PROTO
-
-/* define if the system is missing a prototype for inet_aton() */
-#undef NEED_INET_ATON_PROTO
-
-/* Define if realloc(NULL, X) doesn't work. */
-#undef BROKEN_REALLOC
-
-/* Define if getcwd is broken (like in SunOS 4). */
-#undef BROKEN_GETCWD
-
-/* define if prototype of gethostbyname is compatible with
- struct hostent *gethostbyname(const char *) */
-#undef GETHOSTBYNAME_PROTO_COMPATIBLE
-
-/* define if prototype of gethostbyaddr is compatible with
- struct hostent *gethostbyaddr(const void *, size_t, int) */
-#undef GETHOSTBYADDR_PROTO_COMPATIBLE
-
-/* define if prototype of getservbyname is compatible with
- struct servent *getservbyname(const char *, const char *) */
-#undef GETSERVBYNAME_PROTO_COMPATIBLE
-
-/* define if prototype of openlog is compatible with
- void openlog(const char *, int, int) */
-#undef OPENLOG_PROTO_COMPATIBLE
-
-/* define if the system is missing a prototype for crypt() */
-#undef NEED_CRYPT_PROTO
-
-/* define if the system is missing a prototype for fclose() */
-#undef NEED_FCLOSE_PROTO
-
-/* define if the system is missing a prototype for strtok_r() */
-#undef NEED_STRTOK_R_PROTO
-
-/* define if the system is missing a prototype for getusershell() */
-#undef NEED_GETUSERSHELL_PROTO
-
-/* define if the system is missing a prototype for utime() */
-#undef NEED_UTIME_PROTO
-
-/* define if you have h_errno */
-#define HAVE_H_ERRNO 1
-
-/* define if your system declares h_errno */
-#define HAVE_H_ERRNO_DECLARATION 1
-
-/* define if you have h_errlist */
-#undef HAVE_H_ERRLIST
-
-/* define if your system declares h_errlist */
-#undef HAVE_H_ERRLIST_DECLARATION
-
-/* define if you have h_nerr */
-#undef HAVE_H_NERR
-
-/* define if your system declares h_nerr */
-#undef HAVE_H_NERR_DECLARATION
-
-/* define if you have __progname */
-#undef HAVE___PROGNAME
-
-/* define if your system declares __progname */
-#undef HAVE___PROGNAME_DECLARATION
-
-/* define if your system declares optarg */
-#undef HAVE_OPTARG_DECLARATION
-
-/* define if your system declares optind */
-#undef HAVE_OPTIND_DECLARATION
-
-/* define if your system declares opterr */
-#undef HAVE_OPTERR_DECLARATION
-
-/* define if your system declares optopt */
-#undef HAVE_OPTOPT_DECLARATION
-
-/* define if your system declares environ */
-#undef HAVE_ENVIRON_DECLARATION
-
-/* Define if RETSIGTYPE == void. */
-#define VOID_RETSIGTYPE 1
-
-/* Define if struct utmp has field ut_addr. */
-#undef HAVE_STRUCT_UTMP_UT_ADDR
-
-/* Define if struct utmp has field ut_host. */
-#undef HAVE_STRUCT_UTMP_UT_HOST
-
-/* Define if struct utmp has field ut_id. */
-#undef HAVE_STRUCT_UTMP_UT_ID
-
-/* Define if struct utmp has field ut_pid. */
-#undef HAVE_STRUCT_UTMP_UT_PID
-
-/* Define if struct utmp has field ut_type. */
-#undef HAVE_STRUCT_UTMP_UT_TYPE
-
-/* Define if struct utmp has field ut_user. */
-#undef HAVE_STRUCT_UTMP_UT_USER
-
-/* Define if struct utmpx has field ut_exit. */
-#undef HAVE_STRUCT_UTMPX_UT_EXIT
-
-/* Define if struct utmpx has field ut_syslen. */
-#undef HAVE_STRUCT_UTMPX_UT_SYSLEN
-
-/* define if you have struct spwd */
-#undef HAVE_STRUCT_SPWD
-
-/* define if struct winsize is declared in sys/termios.h */
-#undef HAVE_STRUCT_WINSIZE
-
-/* define if struct winsize has ws_xpixel */
-#undef HAVE_WS_XPIXEL
-
-/* define if struct winsize has ws_ypixel */
-#undef HAVE_WS_YPIXEL
-
-/* Define this to what the type ssize_t should be. */
-#define ssize_t int
-
-/* Define if struct sockaddr has field sa_len. */
-#undef HAVE_STRUCT_SOCKADDR_SA_LEN
-
-/* Define if SIAENTITY has field ouid. */
-#undef HAVE_SIAENTITY_OUID
-
-/* Define if you have a working getmsg. */
-#undef HAVE_GETMSG
-
-/* Define if you have a readline function. */
-#undef HAVE_READLINE
-
-/* Define if you have working stream ptys. */
-#undef STREAMSPTY
-
-/* Define if /bin/ls has a `-A' flag. */
-#undef HAVE_LS_A
-
-
-#undef HAVE_INT8_T
-#undef HAVE_INT16_T
-#undef HAVE_INT32_T
-#undef HAVE_INT64_T
-#undef HAVE_U_INT8_T
-#undef HAVE_U_INT16_T
-#undef HAVE_U_INT32_T
-#undef HAVE_U_INT64_T
-
-/* This for compat with heimdal (or something) */
-#define KRB_PUT_INT(f, t, l, s) krb_put_int((f), (t), (l), (s))
-
-#define RCSID(msg) \
-static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
-
-/*
- * Set ORGANIZATION to be the desired organization string printed
- * by the 'kinit' program. It may have spaces.
- */
-#define ORGANIZATION "eBones International"
-
-#if 0
-#undef BINDIR
-#undef LIBDIR
-#undef LIBEXECDIR
-#undef SBINDIR
-#endif
-
-#if 0
-#define KRB_CNF_FILES { "/etc/krb.conf", "/etc/kerberosIV/krb.conf", 0}
-#define KRB_RLM_FILES { "/etc/krb.realms", "/etc/kerberosIV/krb.realms", 0}
-#define KRB_EQUIV "/etc/krb.equiv"
-
-#define KEYFILE "/etc/srvtab"
-
-#define KRBDIR "/var/kerberos"
-#define DBM_FILE KRBDIR "/principal"
-#define DEFAULT_ACL_DIR KRBDIR
-
-#define KRBLOG "/var/log/kerberos.log" /* master server */
-#define KRBSLAVELOG "/var/log/kerberos_slave.log" /* slave server */
-#define KADM_SYSLOG "/var/log/admin_server.syslog"
-#define K_LOGFIL "/var/log/kpropd.log"
-#endif
-
-/* Maximum values on all known systems */
-#define MaxHostNameLen (64+4)
-#define MaxPathLen (1024+4)
-
-/* ftp stuff -------------------------------------------------- */
-
-#define KERBEROS
-
-/* telnet stuff ----------------------------------------------- */
-
-/* define this for OTP support */
-#undef OTP
-
-/* define this if you have kerberos 4 */
-#define KRB4 1
-
-/* define this if you want encryption */
-#undef ENCRYPTION
-
-/* define this if you want authentication */
-#undef AUTHENTICATION
-
-#if defined(ENCRYPTION) && !defined(AUTHENTICATION)
-#define AUTHENTICATION 1
-#endif
-
-/* Set this if you want des encryption */
-#undef DES_ENCRYPTION
-
-/* Set this to the default system lead string for telnetd
- * can contain %-escapes: %s=sysname, %m=machine, %r=os-release
- * %v=os-version, %t=tty, %h=hostname, %d=date and time
- */
-#undef USE_IM
-
-/* define this if you want diagnostics in telnetd */
-#undef DIAGNOSTICS
-
-/* define this if you want support for broken ENV_{VALUE,VAR} systems */
-#undef ENV_HACK
-
-/* */
-#undef OLD_ENVIRON
-
-/* Used with login -p */
-#undef LOGIN_ARGS
-
-/* set this to a sensible login */
-#ifndef LOGIN_PATH
-#define LOGIN_PATH BINDIR "/login"
-#endif
-
-
-/* ------------------------------------------------------------ */
-
-#ifdef BROKEN_REALLOC
-#define realloc(X, Y) isoc_realloc((X), (Y))
-#define isoc_realloc(X, Y) ((X) ? realloc((X), (Y)) : malloc(Y))
-#endif
-
-#ifdef VOID_RETSIGTYPE
-#define SIGRETURN(x) return
-#else
-#define SIGRETURN(x) return (RETSIGTYPE)(x)
-#endif
-
-/* Temporary fixes for krb_{rd,mk}_safe */
-#define DES_QUAD_GUESS 0
-#define DES_QUAD_NEW 1
-#define DES_QUAD_OLD 2
-
-/*
- * All these are system-specific defines that I would rather not have at all.
- */
-
-/*
- * AIX braindamage!
- */
-#if _AIX
-#define _ALL_SOURCE
-/* XXX this is gross, but kills about a gazillion warnings */
-struct ether_addr;
-struct sockaddr;
-struct sockaddr_dl;
-struct sockaddr_in;
-#endif
-
-/*
- * SunOS braindamage! (Sun include files are generally braindead)
- */
-#if (defined(sun) || defined(__sun))
-#if defined(__svr4__) || defined(__SVR4)
-#define SunOS 5
-#else
-#define SunOS 4
-#endif
-#endif
-
-#if defined(__sgi) || defined(sgi)
-#if defined(__SYSTYPE_SVR4) || defined(_SYSTYPE_SVR4)
-#define IRIX 5
-#else
-#define IRIX 4
-#endif
-#endif
-
-/* IRIX 4 braindamage */
-#if IRIX == 4 && !defined(__STDC__)
-#define __STDC__ 0
-#endif
-
-/* some strange OS/2 stuff. From <d96-mst@nada.kth.se> */
-
-#ifdef __EMX__
-#define _EMX_TCPIP
-#define MAIL_USE_SYSTEM_LOCK
-#endif
-
-#ifdef ROKEN_RENAME
-#include "roken_rename.h"
-#endif
diff --git a/crypto/kerberosIV/include/win32/ktypes.h b/crypto/kerberosIV/include/win32/ktypes.h
deleted file mode 100644
index 3d4af11d09b7..000000000000
--- a/crypto/kerberosIV/include/win32/ktypes.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef __KTYPES_H__
-#define __KTYPES_H__
-
-typedef signed char int8_t;
-typedef unsigned char u_int8_t;
-typedef short int16_t;
-typedef unsigned short u_int16_t;
-typedef int int32_t;
-typedef unsigned int u_int32_t;
-
-#endif /* __KTYPES_H__ */
diff --git a/crypto/kerberosIV/include/win32/roken.h b/crypto/kerberosIV/include/win32/roken.h
deleted file mode 100644
index 9a3117f75cf2..000000000000
--- a/crypto/kerberosIV/include/win32/roken.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/* This is (as usual) a generated file,
- it is also machine dependent */
-
-#ifndef __ROKEN_H__
-#define __ROKEN_H__
-
-/* -*- C -*- */
-/*
- * 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: roken.h,v 1.8 1999/12/02 16:58:36 joda Exp $ */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <signal.h>
-#include <time.h>
-
-
-
-#define ROKEN_LIB_FUNCTION
-
-#include <roken-common.h>
-
-
-int putenv(const char *string);
-
-int setenv(const char *var, const char *val, int rewrite);
-
-void unsetenv(const char *name);
-
-char *getusershell(void);
-void endusershell(void);
-
-int snprintf (char *str, size_t sz, const char *format, ...)
- __attribute__ ((format (printf, 3, 4)));
-
-int vsnprintf (char *str, size_t sz, const char *format, va_list ap)
- __attribute__((format (printf, 3, 0)));
-
-int asprintf (char **ret, const char *format, ...)
- __attribute__ ((format (printf, 2, 3)));
-
-int vasprintf (char **ret, const char *format, va_list ap)
- __attribute__((format (printf, 2, 0)));
-
-int asnprintf (char **ret, size_t max_sz, const char *format, ...)
- __attribute__ ((format (printf, 3, 4)));
-
-int vasnprintf (char **ret, size_t max_sz, const char *format, va_list ap)
- __attribute__((format (printf, 3, 0)));
-
-char * strdup(const char *old);
-
-char * strlwr(char *);
-
-int strnlen(char*, int);
-
-char *strsep(char**, const char*);
-
-int strcasecmp(const char *s1, const char *s2);
-
-
-
-char * strupr(char *);
-
-size_t strlcpy (char *dst, const char *src, size_t dst_sz);
-
-size_t strlcat (char *dst, const char *src, size_t dst_sz);
-
-int getdtablesize(void);
-
-char *strerror(int eno);
-
-/* This causes a fatal error under Psoriasis */
-const char *hstrerror(int herr);
-
-extern int h_errno;
-
-int inet_aton(const char *cp, struct in_addr *adr);
-
-char* getcwd(char *path, size_t size);
-
-
-int seteuid(uid_t euid);
-
-int setegid(gid_t egid);
-
-int lstat(const char *path, struct stat *buf);
-
-int mkstemp(char *);
-
-int initgroups(const char *name, gid_t basegid);
-
-int fchown(int fd, uid_t owner, gid_t group);
-
-int daemon(int nochdir, int noclose);
-
-int innetgr(const char *netgroup, const char *machine,
- const char *user, const char *domain);
-
-int chown(const char *path, uid_t owner, gid_t group);
-
-int rcmd(char **ahost, unsigned short inport, const char *locuser,
- const char *remuser, const char *cmd, int *fd2p);
-
-int innetgr(const char*, const char*, const char*, const char*);
-
-int iruserok(unsigned raddr, int superuser, const char *ruser,
- const char *luser);
-
-int gethostname(char *name, int namelen);
-
-ssize_t
-writev(int d, const struct iovec *iov, int iovcnt);
-
-ssize_t
-readv(int d, const struct iovec *iov, int iovcnt);
-
-int
-mkstemp(char *template);
-
-#define LOCK_SH 1 /* Shared lock */
-#define LOCK_EX 2 /* Exclusive lock */
-#define LOCK_NB 4 /* Don't block when locking */
-#define LOCK_UN 8 /* Unlock */
-
-int flock(int fd, int operation);
-
-time_t tm2time (struct tm tm, int local);
-
-int unix_verify_user(char *user, char *password);
-
-void inaddr2str(struct in_addr addr, char *s, size_t len);
-
-void mini_inetd (int port);
-
-int roken_concat (char *s, size_t len, ...);
-
-size_t roken_mconcat (char **s, size_t max_len, ...);
-
-int roken_vconcat (char *s, size_t len, va_list args);
-
-size_t roken_vmconcat (char **s, size_t max_len, va_list args);
-
-ssize_t net_write (int fd, const void *buf, size_t nbytes);
-
-ssize_t net_read (int fd, void *buf, size_t nbytes);
-
-int issuid(void);
-
-struct winsize {
- unsigned short ws_row, ws_col;
- unsigned short ws_xpixel, ws_ypixel;
-};
-
-int get_window_size(int fd, struct winsize *);
-
-void vsyslog(int pri, const char *fmt, va_list ap);
-
-extern char *optarg;
-extern int optind;
-extern int opterr;
-
-extern const char *__progname;
-
-extern char **environ;
-
-/*
- * kludges and such
- */
-
-int roken_gethostby_setup(const char*, const char*);
-struct hostent* roken_gethostbyname(const char*);
-struct hostent* roken_gethostbyaddr(const void*, size_t, int);
-
-#define roken_getservbyname(x,y) getservbyname((char *)x, (char *)y)
-
-#define roken_openlog(a,b,c) openlog((char *)a,b,c)
-
-void set_progname(char *argv0);
-
-#endif /* __ROKEN_H__ */
diff --git a/crypto/kerberosIV/include/win32/version.h b/crypto/kerberosIV/include/win32/version.h
deleted file mode 100644
index 07fe2eb4641f..000000000000
--- a/crypto/kerberosIV/include/win32/version.h
+++ /dev/null
@@ -1,2 +0,0 @@
-char *krb4_long_version = "krb4-0.9.7 on Windows NT";
-char *krb4_version = "0.9.7";
diff --git a/crypto/kerberosIV/include/win32/winconf.sh b/crypto/kerberosIV/include/win32/winconf.sh
deleted file mode 100644
index a7d5f28316b6..000000000000
--- a/crypto/kerberosIV/include/win32/winconf.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-
-# $Id: winconf.sh,v 1.1 1997/11/09 14:35:15 joda Exp $
-
-cat ../config.h.in | sed '
-s%#undef gid_t$%#define gid_t int%
-s%#undef STDC_HEADERS$%#define STDC_HEADERS 1%
-s%#undef uid_t$%#define uid_t int%
-s%#undef ssize_t$%#define ssize_t int%
-s%#undef VOID_RETSIGTYPE$%#define VOID_RETSIGTYPE 1%
-s%#undef HAVE_H_ERRNO$%#define HAVE_H_ERRNO 1%
-s%#undef HAVE_H_ERRNO_DECLARATION$%#define HAVE_H_ERRNO_DECLARATION 1%
-s%#undef HAVE__STRICMP$%#define HAVE__STRICMP 1%
-s%#undef HAVE_GETHOSTBYNAME$%#define HAVE_GETHOSTBYNAME 1%
-s%#undef HAVE_GETHOSTNAME$%#define HAVE_GETHOSTNAME 1%
-s%#undef HAVE_GETSERVBYNAME$%#define HAVE_GETSERVBYNAME 1%
-s%#undef HAVE_GETSOCKOPT$%#define HAVE_GETSOCKOPT 1%
-s%#undef HAVE_MEMMOVE$%#define HAVE_MEMMOVE 1%
-s%#undef HAVE_MKTIME$%#define HAVE_MKTIME 1%
-s%#undef HAVE_RAND$%#define HAVE_RAND 1%
-s%#undef HAVE_SETSOCKOPT$%#define HAVE_SETSOCKOPT 1%
-s%#undef HAVE_SOCKET$%#define HAVE_SOCKET 1%
-s%#undef HAVE_STRDUP$%#define HAVE_STRDUP 1%
-s%#undef HAVE_STRFTIME$%#define HAVE_STRFTIME 1%
-s%#undef HAVE_STRLWR$%#define HAVE_STRLWR 1%
-s%#undef HAVE_STRUPR$%#define HAVE_STRUPR 1%
-s%#undef HAVE_SWAB$%#define HAVE_SWAB 1%
-s%#undef HAVE_FCNTL_H$%#define HAVE_FCNTL_H 1%
-s%#undef HAVE_IO_H$%#define HAVE_IO_H 1%
-s%#undef HAVE_SIGNAL_H$%#define HAVE_SIGNAL_H 1%
-s%#undef HAVE_SYS_LOCKING_H$%#define HAVE_SYS_LOCKING_H 1%
-s%#undef HAVE_SYS_STAT_H$%#define HAVE_SYS_STAT_H 1%
-s%#undef HAVE_SYS_TIMEB_H$%#define HAVE_SYS_TIMEB_H 1%
-s%#undef HAVE_SYS_TYPES_H$%#define HAVE_SYS_TYPES_H 1%
-s%#undef HAVE_WINSOCK_H$%#define HAVE_WINSOCK_H 1%
-s%#undef KRB4$%#define KRB4 1%
-s%#undef DES_QUAD_DEFAULT$%#define DES_QUAD_DEFAULT DES_QUAD_GUESS%' > config.h
diff --git a/crypto/kerberosIV/kadmin/random_password.c b/crypto/kerberosIV/kadmin/random_password.c
deleted file mode 100644
index ec8309ecaf5c..000000000000
--- a/crypto/kerberosIV/kadmin/random_password.c
+++ /dev/null
@@ -1,160 +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. 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 "kadm_locl.h"
-
-RCSID("$Id: random_password.c,v 1.4 1999/12/02 16:58:36 joda Exp $");
-
-/* This file defines some a function that generates a random password,
- that can be used when creating a large amount of principals (such
- as for a batch of students). Since this is a political matter, you
- should think about how secure generated passwords has to be.
-
- Both methods defined here will give you at least 55 bits of
- entropy.
- */
-
-/* If you want OTP-style passwords, define OTP_STYLE */
-
-#ifdef OTP_STYLE
-#include <otp.h>
-#else
-static void generate_password(char **pw, int num_classes, ...);
-#endif
-
-void
-random_password(char *pw, size_t len, u_int32_t *low, u_int32_t *high)
-{
- des_cblock newkey;
-#ifdef OTP_STYLE
- des_new_random_key(&newkey);
- otp_print_stddict (newkey, pw, len);
- strlwr(pw);
-#else
- char *pass;
- generate_password(&pass, 3,
- "abcdefghijklmnopqrstuvwxyz", 7,
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 2,
- "@$%&*()-+=:,/<>1234567890", 1);
- strlcpy(pw, pass, len);
- memset(pass, 0, strlen(pass));
- free(pass);
-#endif
- des_string_to_key(pw, &newkey);
- memcpy(low, newkey, 4);
- memcpy(high, ((char *)newkey) + 4, 4);
- memset(newkey, 0, sizeof(newkey));
-
- *low = htonl(*low);
- *high = htonl(*high);
-}
-
-/* some helper functions */
-
-#ifndef OTP_STYLE
-/* return a random value in range 0-127 */
-static int
-RND(des_cblock *key, int *left)
-{
- if(*left == 0){
- des_new_random_key(key);
- *left = 8;
- }
- (*left)--;
- return ((unsigned char*)key)[*left];
-}
-
-/* This a helper function that generates a random password with a
- number of characters from a set of character classes.
-
- If there are n classes, and the size of each class is Pi, and the
- number of characters from each class is Ni, the number of possible
- passwords are (given that the character classes are disjoint):
-
- n n
- ----- / ---- \
- | | Ni | \ |
- | | Pi | \ Ni| !
- | | ---- * | / |
- | | Ni! | /___ |
- i=1 \ i=1 /
-
- Since it uses the RND function above, neither the size of each
- class, nor the total length of the generated password should be
- larger than 127 (without fixing RND).
-
- */
-static void
-generate_password(char **pw, int num_classes, ...)
-{
- struct {
- const char *str;
- int len;
- int freq;
- } *classes;
- va_list ap;
- int len, i;
- des_cblock rbuf; /* random buffer */
- int rleft = 0;
-
- classes = malloc(num_classes * sizeof(*classes));
- va_start(ap, num_classes);
- len = 0;
- for(i = 0; i < num_classes; i++){
- classes[i].str = va_arg(ap, const char*);
- classes[i].len = strlen(classes[i].str);
- classes[i].freq = va_arg(ap, int);
- len += classes[i].freq;
- }
- va_end(ap);
- *pw = malloc(len + 1);
- if(*pw == NULL)
- return;
- for(i = 0; i < len; i++) {
- int j;
- int x = RND(&rbuf, &rleft) % (len - i);
- int t = 0;
- for(j = 0; j < num_classes; j++) {
- if(x < t + classes[j].freq) {
- (*pw)[i] = classes[j].str[RND(&rbuf, &rleft) % classes[j].len];
- classes[j].freq--;
- break;
- }
- t += classes[j].freq;
- }
- }
- (*pw)[len] = '\0';
- memset(rbuf, 0, sizeof(rbuf));
- free(classes);
-}
-#endif
diff --git a/crypto/kerberosIV/lib/auth/ChangeLog b/crypto/kerberosIV/lib/auth/ChangeLog
deleted file mode 100644
index f9c948ca7146..000000000000
--- a/crypto/kerberosIV/lib/auth/ChangeLog
+++ /dev/null
@@ -1,65 +0,0 @@
-1999-11-15 Assar Westerlund <assar@sics.se>
-
- * */lib/Makefile.in: set LIBNAME. From Enrico Scholz
- <Enrico.Scholz@informatik.tu-chemnitz.de>
-
-1999-10-17 Assar Westerlund <assar@sics.se>
-
- * afskauthlib/verify.c (verify_krb5): need realm for v5 -> v4
-
-1999-10-03 Assar Westerlund <assar@sics.se>
-
- * afskauthlib/verify.c (verify_krb5): update to new
- krb524_convert_creds_kdc
-
-1999-09-28 Assar Westerlund <assar@sics.se>
-
- * sia/sia.c (doauth): use krb5_get_local_realms and
- krb5_verify_user_lrealm
-
- * afskauthlib/verify.c (verify_krb5): remove krb5_kuserok. use
- krb5_verify_user_lrealm
-
-1999-08-11 Johan Danielsson <joda@pdc.kth.se>
-
- * afskauthlib/verify.c: make this compile w/o krb4
-
-1999-08-04 Assar Westerlund <assar@sics.se>
-
- * afskauthlib/verify.c: incorporate patches from Miroslav Ruda
- <ruda@ics.muni.cz>
-
-Thu Apr 8 14:35:34 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * sia/sia.c: remove definition of KRB_VERIFY_USER (moved to
- config.h)
-
- * sia/Makefile.am: make it build w/o krb4
-
- * afskauthlib/verify.c: add krb5 support
-
- * afskauthlib/Makefile.am: build afskauthlib.so
-
-Wed Apr 7 14:06:22 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * sia/sia.c: make it compile w/o krb4
-
- * sia/Makefile.am: make it compile w/o krb4
-
-Thu Apr 1 18:09:23 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * sia/sia_locl.h: POSIX_GETPWNAM_R is defined in config.h
-
-Sun Mar 21 14:08:30 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * sia/Makefile.in: add posix_getpw.c
-
- * sia/Makefile.am: makefile for sia
-
- * sia/posix_getpw.c: move from sia.c
-
- * sia/sia_locl.h: merge with krb5 version
-
- * sia/sia.c: merge with krb5 version
-
- * sia/sia5.c: remove unused variables
diff --git a/crypto/kerberosIV/lib/auth/Makefile.am b/crypto/kerberosIV/lib/auth/Makefile.am
deleted file mode 100644
index 0310dc36d6cc..000000000000
--- a/crypto/kerberosIV/lib/auth/Makefile.am
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/lib/auth/Makefile.in b/crypto/kerberosIV/lib/auth/Makefile.in
deleted file mode 100644
index 53fde5fc16a9..000000000000
--- a/crypto/kerberosIV/lib/auth/Makefile.in
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/lib/auth/afskauthlib/Makefile.am b/crypto/kerberosIV/lib/auth/afskauthlib/Makefile.am
deleted file mode 100644
index 7dd6d5283fe9..000000000000
--- a/crypto/kerberosIV/lib/auth/afskauthlib/Makefile.am
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/lib/auth/afskauthlib/Makefile.in b/crypto/kerberosIV/lib/auth/afskauthlib/Makefile.in
deleted file mode 100644
index 2eb2576fe384..000000000000
--- a/crypto/kerberosIV/lib/auth/afskauthlib/Makefile.in
+++ /dev/null
@@ -1,87 +0,0 @@
-#
-# $Id: Makefile.in,v 1.25 1999/11/15 10:20:46 assar Exp $
-#
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-CC = @CC@
-LINK = @LINK@
-AR = ar
-LN_S = @LN_S@
-RANLIB = @RANLIB@
-DEFS = @DEFS@
-CFLAGS = @CFLAGS@ $(WFLAGS)
-WFLAGS = @WFLAGS@
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = @top_srcdir@/mkinstalldirs
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-libdir = @libdir@
-
-@lib_deps_yes@LIB_DEPS = -L../../kafs -lkafs \
-@lib_deps_yes@ -L../../krb -lkrb \
-@lib_deps_yes@ -L../../des -ldes \
-@lib_deps_yes@ -L../../roken -lroken \
-@lib_deps_yes@ -lc
-@lib_deps_no@LIB_DEPS =
-
-PICFLAGS = @REAL_PICFLAGS@
-LDSHARED = @LDSHARED@
-SHLIBEXT = @REAL_SHLIBEXT@
-LD_FLAGS = @REAL_LD_FLAGS@
-
-LIBNAME = afskauthlib
-LIB = $(LIBNAME).$(SHLIBEXT)
-
-SOURCES = verify.c
-
-OBJECTS = verify.o
-
-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) $(CFLAGS) $(CPPFLAGS) $(PICFLAGS) $<
-
-install: all
- $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
- -if test "$(LIB)" != ""; then \
- $(INSTALL_DATA) -m 0555 $(LIB) $(DESTDIR)$(libdir)/$(LIB) ; \
- fi
-
-uninstall:
- -if test "$(LIB)" != ""; then \
- rm -f $(DESTDIR)$(libdir)/$(LIB) ; \
- fi
-
-TAGS: $(SOURCES)
- etags $(SOURCES)
-
-check:
-
-clean:
- rm -f $(LIB) *.o
-
-mostlyclean: clean
-
-distclean: clean
- rm -f Makefile *.tab.c *~
-
-realclean: distclean
- rm -f TAGS
-
-$(OBJECTS): ../../../include/config.h
-
-$(LIB): $(OBJECTS)
- rm -f $@
- $(LDSHARED) $(CFLAGS) -o $@ $(OBJECTS) $(LD_FLAGS) $(LIB_DEPS)
-
-.PHONY: all Wall install uninstall check clean mostlyclean distclean realclean
diff --git a/crypto/kerberosIV/lib/auth/afskauthlib/README b/crypto/kerberosIV/lib/auth/afskauthlib/README
deleted file mode 100644
index 6052a261a1a5..000000000000
--- a/crypto/kerberosIV/lib/auth/afskauthlib/README
+++ /dev/null
@@ -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.
-
diff --git a/crypto/kerberosIV/lib/auth/afskauthlib/verify.c b/crypto/kerberosIV/lib/auth/afskauthlib/verify.c
deleted file mode 100644
index 1c23119f9fc7..000000000000
--- a/crypto/kerberosIV/lib/auth/afskauthlib/verify.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright (c) 1995-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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: verify.c,v 1.20 1999/12/02 16:58:37 joda Exp $");
-#endif
-#include <unistd.h>
-#include <sys/types.h>
-#include <pwd.h>
-#ifdef KRB5
-#include <krb5.h>
-#endif
-#ifdef KRB4
-#include <krb.h>
-#include <kafs.h>
-#endif
-#include <roken.h>
-
-#ifdef KRB5
-static char krb5ccname[128];
-#endif
-#ifdef KRB4
-static char krbtkfile[128];
-#endif
-
-/*
- In some cases is afs_gettktstring called twice (once before
- afs_verify and once after afs_verify).
- In some cases (rlogin with access allowed via .rhosts)
- afs_verify is not called!
- So we can't rely on correct value in krbtkfile in some
- cases!
-*/
-
-static int correct_tkfilename=0;
-static int pag_set=0;
-
-#ifdef KRB4
-static void
-set_krbtkfile(uid_t uid)
-{
- snprintf (krbtkfile, sizeof(krbtkfile), "%s%d", TKT_ROOT, (unsigned)uid);
- krb_set_tkt_string (krbtkfile);
- correct_tkfilename = 1;
-}
-#endif
-
-/* XXX this has to be the default cache name, since the KRB5CCNAME
- * environment variable isn't exported by login/xdm
- */
-
-#ifdef KRB5
-static void
-set_krb5ccname(uid_t uid)
-{
- snprintf (krb5ccname, sizeof(krb5ccname), "FILE:/tmp/krb5cc_%d", uid);
-#ifdef KRB4
- snprintf (krbtkfile, sizeof(krbtkfile), "%s%d", TKT_ROOT, (unsigned)uid);
-#endif
- correct_tkfilename = 1;
-}
-#endif
-
-static void
-set_spec_krbtkfile(void)
-{
- int fd;
-#ifdef KRB4
- snprintf (krbtkfile, sizeof(krbtkfile), "%s_XXXXXX", TKT_ROOT);
- fd = mkstemp(krbtkfile);
- close(fd);
- unlink(krbtkfile);
- krb_set_tkt_string (krbtkfile);
-#endif
-#ifdef KRB5
- snprintf(krb5ccname, sizeof(krb5ccname),"FILE:/tmp/krb5cc_XXXXXX");
- fd=mkstemp(krb5ccname+5);
- close(fd);
- unlink(krb5ccname+5);
-#endif
-}
-
-#ifdef KRB5
-static int
-verify_krb5(struct passwd *pwd,
- char *password,
- int32_t *exp,
- int quiet)
-{
- krb5_context context;
- krb5_error_code ret;
- krb5_ccache ccache;
- krb5_principal principal;
-
- krb5_init_context(&context);
-
- ret = krb5_parse_name (context, pwd->pw_name, &principal);
- if (ret) {
- syslog(LOG_AUTH|LOG_DEBUG, "krb5_parse_name: %s",
- krb5_get_err_text(context, ret));
- goto out;
- }
-
- set_krb5ccname(pwd->pw_uid);
- ret = krb5_cc_resolve(context, krb5ccname, &ccache);
- if(ret) {
- syslog(LOG_AUTH|LOG_DEBUG, "krb5_cc_resolve: %s",
- krb5_get_err_text(context, ret));
- goto out;
- }
-
- ret = krb5_verify_user_lrealm(context,
- principal,
- ccache,
- password,
- TRUE,
- NULL);
- if(ret) {
- syslog(LOG_AUTH|LOG_DEBUG, "krb5_verify_user: %s",
- krb5_get_err_text(context, ret));
- goto out;
- }
-
- if(chown(krb5_cc_get_name(context, ccache), pwd->pw_uid, pwd->pw_gid)) {
- syslog(LOG_AUTH|LOG_DEBUG, "chown: %s",
- krb5_get_err_text(context, errno));
- goto out;
- }
-
-#ifdef KRB4
- if (krb5_config_get_bool(context, NULL,
- "libdefaults",
- "krb4_get_tickets",
- NULL)) {
- CREDENTIALS c;
- krb5_creds mcred, cred;
- krb5_realm realm;
-
- krb5_get_default_realm(context, &realm);
- krb5_make_principal(context, &mcred.server, realm,
- "krbtgt",
- realm,
- NULL);
- free (realm);
- ret = krb5_cc_retrieve_cred(context, ccache, 0, &mcred, &cred);
- if(ret == 0) {
- ret = krb524_convert_creds_kdc(context, ccache, &cred, &c);
- if(ret)
- krb5_warn(context, ret, "converting creds");
- else {
- set_krbtkfile(pwd->pw_uid);
- tf_setup(&c, c.pname, c.pinst);
- }
- memset(&c, 0, sizeof(c));
- krb5_free_creds_contents(context, &cred);
- } else
- syslog(LOG_AUTH|LOG_DEBUG, "krb5_cc_retrieve_cred: %s",
- krb5_get_err_text(context, ret));
-
- krb5_free_principal(context, mcred.server);
- }
- if (!pag_set && k_hasafs()) {
- k_setpag();
- pag_set = 1;
- krb5_afslog_uid_home(context, ccache, NULL, NULL,
- pwd->pw_uid, pwd->pw_dir);
- }
-#endif
-out:
- if(ret && !quiet)
- printf ("%s\n", krb5_get_err_text (context, ret));
- return ret;
-}
-#endif
-
-#ifdef KRB4
-static int
-verify_krb4(struct passwd *pwd,
- char *password,
- int32_t *exp,
- int quiet)
-{
- int ret = 1;
- char lrealm[REALM_SZ];
-
- if (krb_get_lrealm (lrealm, 1) != KFAILURE) {
- set_krbtkfile(pwd->pw_uid);
- ret = krb_verify_user (pwd->pw_name, "", lrealm, password,
- KRB_VERIFY_SECURE, NULL);
- if (ret == KSUCCESS) {
- if (!pag_set && k_hasafs()) {
- k_setpag ();
- pag_set = 1;
- krb_afslog_uid_home (0, 0, pwd->pw_uid, pwd->pw_dir);
- }
- } else if (!quiet)
- printf ("%s\n", krb_get_err_text (ret));
- }
- return ret;
-}
-#endif
-
-int
-afs_verify(char *name,
- char *password,
- int32_t *exp,
- int quiet)
-{
- int ret = 1;
- struct passwd *pwd = k_getpwnam (name);
-
- if(pwd == NULL)
- return 1;
- if (ret)
- ret = unix_verify_user (name, password);
-#ifdef KRB5
- if (ret)
- ret = verify_krb5(pwd, password, exp, quiet);
-#endif
-#ifdef KRB4
- if(ret)
- ret = verify_krb4(pwd, password, exp, quiet);
-#endif
- return ret;
-}
-
-char *
-afs_gettktstring (void)
-{
- char *ptr;
- struct passwd *pwd;
-
- if (!correct_tkfilename) {
- ptr = getenv("LOGNAME");
- if (ptr != NULL && ((pwd = getpwnam(ptr)) != NULL)) {
- set_krb5ccname(pwd->pw_uid);
-#ifdef KRB4
- set_krbtkfile(pwd->pw_uid);
- if (!pag_set && k_hasafs()) {
- k_setpag();
- pag_set=1;
- }
-#endif
- } else {
- set_spec_krbtkfile();
- }
- }
-#ifdef KRB5
- setenv("KRB5CCNAME",krb5ccname,1);
-#endif
-#ifdef KRB4
- setenv("KRBTKFILE",krbtkfile,1);
- return krbtkfile;
-#else
- return "";
-#endif
-}
diff --git a/crypto/kerberosIV/lib/auth/pam/Makefile.am b/crypto/kerberosIV/lib/auth/pam/Makefile.am
deleted file mode 100644
index abde2d9a4938..000000000000
--- a/crypto/kerberosIV/lib/auth/pam/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id: Makefile.am,v 1.2 1999/04/01 14:57:04 joda Exp $
-
-include $(top_srcdir)/Makefile.am.common
diff --git a/crypto/kerberosIV/lib/auth/pam/Makefile.in b/crypto/kerberosIV/lib/auth/pam/Makefile.in
deleted file mode 100644
index b012fcd63ecf..000000000000
--- a/crypto/kerberosIV/lib/auth/pam/Makefile.in
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# $Id: Makefile.in,v 1.25 1999/11/15 10:20:48 assar Exp $
-#
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-CC = @CC@
-LINK = @LINK@
-AR = ar
-RANLIB = @RANLIB@
-DEFS = @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 = @REAL_PICFLAGS@
-LDSHARED = @LDSHARED@
-SHLIBEXT = @REAL_SHLIBEXT@
-LD_FLAGS = @REAL_LD_FLAGS@
-
-LIB_res_search = @LIB_res_search@
-LIB_dn_expand = @LIB_dn_expand@
-
-@lib_deps_yes@LIB_DEPS = -L../../kafs -L../../krb -L../../des \
-@lib_deps_yes@ -lkafs -lkrb -ldes \
-@lib_deps_yes@ $(LIB_res_search) $(LIB_dn_expand) -lpam -lc
-@lib_deps_no@LIB_DEPS =
-
-LIBNAME = pam_krb4
-LIB = $(LIBNAME).$(SHLIBEXT)
-
-SOURCES = pam.c
-
-OBJECTS = pam.o
-
-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) $(CFLAGS) $(CPPFLAGS) $(PICFLAGS) $<
-
-install: all
- $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
- -if test "$(LIB)" != ""; then \
- $(INSTALL_DATA) -m 0555 $(LIB) $(DESTDIR)$(libdir)/$(LIB) ; \
- fi
-
-uninstall:
- -if test "$(LIB)" != ""; then \
- rm -f $(DESTDIR)$(libdir)/$(LIB) ; \
- fi
-
-TAGS: $(SOURCES)
- etags $(SOURCES)
-
-check:
-
-clean:
- rm -f $(LIB) *.o
-
-mostlyclean: clean
-
-distclean: clean
- rm -f Makefile *.tab.c *~
-
-realclean: distclean
- rm -f TAGS
-
-$(OBJECTS): ../../../include/config.h
-
-$(LIB): $(OBJECTS)
- rm -f $@
- $(LDSHARED) -o $@ $(OBJECTS) $(LD_FLAGS) $(LIB_DEPS)
-# $(LINK) -shared -Wl,-x -o $(LIB) $(OBJECTS) ../../kafs/libkafs.a ../../krb/libkrb.a ../../des/libdes.a
-
-.PHONY: all Wall install uninstall check clean mostlyclean distclean realclean
diff --git a/crypto/kerberosIV/lib/auth/pam/README b/crypto/kerberosIV/lib/auth/pam/README
deleted file mode 100644
index 2c45a53db5ed..000000000000
--- a/crypto/kerberosIV/lib/auth/pam/README
+++ /dev/null
@@ -1,25 +0,0 @@
-
-PAM
----
-
-The PAM module was written more out of curiosity that anything else. It
-has not been updated for quite a while, but it seems to mostly work on
-both Linux and Solaris.
-
-To use this module you should:
-
- * Make sure `pam_krb4.so' is available in `/usr/athena/lib'. You
- might actually want it on local disk, so `/lib/security' might be a
- better place if `/usr/athena' is not local.
-
- * Look at `pam.conf.add' for examples of what to add to
- `/etc/pam.conf'.
-
-There is currently no support for changing kerberos passwords. Use
-kpasswd instead.
-
-See also Derrick J Brashear's `<shadow@dementia.org>' Kerberos PAM
-module at
-<ftp://ftp.dementia.org/pub/pam>. It has a lot more features, and it is
-also more in line with other PAM modules.
-
diff --git a/crypto/kerberosIV/lib/auth/pam/pam.c b/crypto/kerberosIV/lib/auth/pam/pam.c
deleted file mode 100644
index d919bf8f83b8..000000000000
--- a/crypto/kerberosIV/lib/auth/pam/pam.c
+++ /dev/null
@@ -1,243 +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.
- */
-
-/* This code is extremely ugly, and would probably be better off
- beeing completely rewritten */
-
-
-#ifdef HAVE_CONFIG_H
-#include<config.h>
-RCSID("$Id: pam.c,v 1.22 1999/12/02 16:58:37 joda Exp $");
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <pwd.h>
-#include <unistd.h>
-#include <sys/types.h>
-
-#define PAM_SM_AUTH
-#define PAM_SM_SESSION
-#include <security/pam_appl.h>
-#include <security/pam_modules.h>
-
-#include <netinet/in.h>
-#include <krb.h>
-#include <kafs.h>
-
-static int
-cleanup(pam_handle_t *pamh, void *data, int error_code)
-{
- if(error_code != PAM_SUCCESS)
- dest_tkt();
- free(data);
- return PAM_SUCCESS;
-}
-
-static int
-doit(pam_handle_t *pamh, char *name, char *inst, char *pwd, char *tkt)
-{
- char realm[REALM_SZ];
- int ret;
-
- pam_set_data(pamh, "KRBTKFILE", strdup(tkt), cleanup);
- krb_set_tkt_string(tkt);
-
- krb_get_lrealm(realm, 1);
- ret = krb_verify_user(name, inst, realm, pwd, KRB_VERIFY_SECURE, NULL);
- memset(pwd, 0, strlen(pwd));
- switch(ret){
- case KSUCCESS:
- return PAM_SUCCESS;
- case KDC_PR_UNKNOWN:
- return PAM_USER_UNKNOWN;
- case SKDC_CANT:
- case SKDC_RETRY:
- case RD_AP_TIME:
- return PAM_AUTHINFO_UNAVAIL;
- default:
- return PAM_AUTH_ERR;
- }
-}
-
-static int
-auth_login(pam_handle_t *pamh, int flags, char *user, struct pam_conv *conv)
-{
- int ret;
- struct pam_message msg, *pmsg;
- struct pam_response *resp;
- char prompt[128];
-
- pmsg = &msg;
- msg.msg_style = PAM_PROMPT_ECHO_OFF;
- snprintf(prompt, sizeof(prompt), "%s's Password: ", user);
- msg.msg = prompt;
-
- ret = conv->conv(1, (const struct pam_message**)&pmsg,
- &resp, conv->appdata_ptr);
- if(ret != PAM_SUCCESS)
- return ret;
-
- {
- char tkt[1024];
- struct passwd *pw = getpwnam(user);
-
- if(pw){
- snprintf(tkt, sizeof(tkt),
- "%s%u", TKT_ROOT, (unsigned)pw->pw_uid);
- ret = doit(pamh, user, "", resp->resp, tkt);
- if(ret == PAM_SUCCESS)
- chown(tkt, pw->pw_uid, pw->pw_gid);
- }else
- ret = PAM_USER_UNKNOWN;
- memset(resp->resp, 0, strlen(resp->resp));
- free(resp->resp);
- free(resp);
- }
- return ret;
-}
-
-static int
-auth_su(pam_handle_t *pamh, int flags, char *user, struct pam_conv *conv)
-{
- int ret;
- struct passwd *pw;
- struct pam_message msg, *pmsg;
- struct pam_response *resp;
- char prompt[128];
- krb_principal pr;
-
- pr.realm[0] = 0;
- ret = pam_get_user(pamh, &user, "login: ");
- if(ret != PAM_SUCCESS)
- return ret;
-
- pw = getpwuid(getuid());
- if(strcmp(user, "root") == 0){
- strlcpy(pr.name, pw->pw_name, sizeof(pr.name));
- strlcpy(pr.instance, "root", sizeof(pr.instance));
- }else{
- strlcpy(pr.name, user, sizeof(pr.name));
- pr.instance[0] = 0;
- }
- pmsg = &msg;
- msg.msg_style = PAM_PROMPT_ECHO_OFF;
- snprintf(prompt, sizeof(prompt), "%s's Password: ", krb_unparse_name(&pr));
- msg.msg = prompt;
-
- ret = conv->conv(1, (const struct pam_message**)&pmsg,
- &resp, conv->appdata_ptr);
- if(ret != PAM_SUCCESS)
- return ret;
-
- {
- char tkt[1024];
-
- snprintf(tkt, sizeof(tkt),"%s_%s_to_%s",
- TKT_ROOT, pw->pw_name, user);
- ret = doit(pamh, pr.name, pr.instance, resp->resp, tkt);
- if(ret == PAM_SUCCESS)
- chown(tkt, pw->pw_uid, pw->pw_gid);
- memset(resp->resp, 0, strlen(resp->resp));
- free(resp->resp);
- free(resp);
- }
- return ret;
-}
-
-int
-pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv)
-{
- char *user;
- int ret;
- struct pam_conv *conv;
- ret = pam_get_user(pamh, &user, "login: ");
- if(ret != PAM_SUCCESS)
- return ret;
-
- ret = pam_get_item(pamh, PAM_CONV, (void*)&conv);
- if(ret != PAM_SUCCESS)
- return ret;
-
-
- if(getuid() != geteuid())
- return auth_su(pamh, flags, user, conv);
- else
- return auth_login(pamh, flags, user, conv);
-}
-
-int
-pam_sm_setcred(pam_handle_t *pamh, int flags, int argc, const char **argv)
-{
- return PAM_SUCCESS;
-}
-
-
-int
-pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv)
-{
- char *tkt, *var;
- void *user;
- const char *homedir = NULL;
-
- if(pam_get_item (pamh, PAM_USER, &user) == PAM_SUCCESS) {
- struct passwd *pwd;
-
- pwd = getpwnam ((char *)user);
- if (pwd != NULL)
- homedir = pwd->pw_dir;
- }
-
- pam_get_data(pamh, "KRBTKFILE", (const void**)&tkt);
- var = malloc(strlen("KRBTKFILE=") + strlen(tkt) + 1);
- strcpy(var, "KRBTKFILE=");
- strcat(var, tkt);
- putenv(var);
- pam_putenv(pamh, var);
- if(k_hasafs()){
- k_setpag();
- krb_afslog_home(0, 0, homedir);
- }
- return PAM_SUCCESS;
-}
-
-
-int
-pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, const char **argv)
-{
- dest_tkt();
- if(k_hasafs())
- k_unlog();
- return PAM_SUCCESS;
-}
diff --git a/crypto/kerberosIV/lib/auth/pam/pam.conf.add b/crypto/kerberosIV/lib/auth/pam/pam.conf.add
deleted file mode 100644
index 42497d2b44a0..000000000000
--- a/crypto/kerberosIV/lib/auth/pam/pam.conf.add
+++ /dev/null
@@ -1,76 +0,0 @@
-To enable PAM in dtlogin and /bin/login under SunOS 5.6 apply this patch:
-
---- /etc/pam.conf.DIST Mon Jul 20 15:37:46 1998
-+++ /etc/pam.conf Tue Nov 30 18:47:22 1999
-@@ -4,12 +4,14 @@
- #
- # Authentication management
- #
-+login auth sufficient /usr/athena/lib/pam_krb4.so
- login auth required /usr/lib/security/pam_unix.so.1
- login auth required /usr/lib/security/pam_dial_auth.so.1
- #
- rlogin auth sufficient /usr/lib/security/pam_rhosts_auth.so.1
- rlogin auth required /usr/lib/security/pam_unix.so.1
- #
-+dtlogin auth sufficient /usr/athena/lib/pam_krb4.so
- dtlogin auth required /usr/lib/security/pam_unix.so.1
- #
- rsh auth required /usr/lib/security/pam_rhosts_auth.so.1
-@@ -24,6 +26,8 @@
- #
- # Session management
- #
-+dtlogin session required /usr/athena/lib/pam_krb4.so
-+login session required /usr/athena/lib/pam_krb4.so
- other session required /usr/lib/security/pam_unix.so.1
- #
- # Password management
----------------------------------------------------------------------------
-To enable PAM in /bin/login and xdm under Red Hat 6.1 apply these patches:
-
---- /etc/pam.d/login~ Thu Jul 8 00:14:02 1999
-+++ /etc/pam.d/login Mon Aug 30 14:33:12 1999
-@@ -1,9 +1,12 @@
- #%PAM-1.0
-+# Updated to work with kerberos
-+auth sufficient /lib/security/pam_krb4.so
- auth required /lib/security/pam_securetty.so
- auth required /lib/security/pam_pwdb.so shadow nullok
- auth required /lib/security/pam_nologin.so
- account required /lib/security/pam_pwdb.so
- password required /lib/security/pam_cracklib.so
- password required /lib/security/pam_pwdb.so nullok use_authtok shadow
-+session required /lib/security/pam_krb4.so
- session required /lib/security/pam_pwdb.so
- session optional /lib/security/pam_console.so
---- /etc/pam.d/xdm~ Mon Jun 14 17:39:05 1999
-+++ /etc/pam.d/xdm Mon Aug 30 14:54:51 1999
-@@ -1,8 +1,10 @@
- #%PAM-1.0
-+auth sufficient /lib/security/pam_krb4.so
- auth required /lib/security/pam_pwdb.so shadow nullok
- auth required /lib/security/pam_nologin.so
- account required /lib/security/pam_pwdb.so
- password required /lib/security/pam_cracklib.so
- password required /lib/security/pam_pwdb.so shadow nullok use_authtok
-+session required /lib/security/pam_krb4.so
- session required /lib/security/pam_pwdb.so
- session optional /lib/security/pam_console.so
---------------------------------------------------------------------------
-
-This stuff may work under some other system.
-
-# To get this to work, you will have to add entries to /etc/pam.conf
-#
-# To make login kerberos-aware, you might change pam.conf to look
-# like:
-
-# login authorization
-login auth sufficient /lib/security/pam_krb4.so
-login auth required /lib/security/pam_securetty.so
-login auth required /lib/security/pam_unix_auth.so
-login account required /lib/security/pam_unix_acct.so
-login password required /lib/security/pam_unix_passwd.so
-login session required /lib/security/pam_krb4.so
-login session required /lib/security/pam_unix_session.so
diff --git a/crypto/kerberosIV/lib/auth/sia/Makefile.am b/crypto/kerberosIV/lib/auth/sia/Makefile.am
deleted file mode 100644
index 5a58cb72d359..000000000000
--- a/crypto/kerberosIV/lib/auth/sia/Makefile.am
+++ /dev/null
@@ -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 $<
diff --git a/crypto/kerberosIV/lib/auth/sia/Makefile.in b/crypto/kerberosIV/lib/auth/sia/Makefile.in
deleted file mode 100644
index 69858bd60257..000000000000
--- a/crypto/kerberosIV/lib/auth/sia/Makefile.in
+++ /dev/null
@@ -1,90 +0,0 @@
-#
-# $Id: Makefile.in,v 1.30 1999/11/15 10:20:50 assar Exp $
-#
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-CC = @CC@
-LINK = @LINK@
-AR = ar
-RANLIB = @RANLIB@
-DEFS = @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 = @REAL_PICFLAGS@
-SHARED = @SHARED@
-LDSHARED = @LDSHARED@
-SHLIBEXT = @REAL_SHLIBEXT@
-LD_FLAGS = @REAL_LD_FLAGS@
-
-@lib_deps_yes@LIB_DEPS = -L../../kafs -lkafs \
-@lib_deps_yes@ -L../../kadm -lkadm \
-@lib_deps_yes@ -L../../krb -lkrb \
-@lib_deps_yes@ -L../../des -ldes \
-@lib_deps_yes@ -L../../com_err -lcom_err \
-@lib_deps_yes@ -L../../roken -lroken \
-@lib_deps_yes@ @LIB_getpwnam_r@ \
-@lib_deps_yes@ -lc
-@lib_deps_no@LIB_DEPS =
-
-LIBNAME = libsia_krb4
-LIB = $(LIBNAME).$(SHLIBEXT)
-
-SOURCES = sia.c posix_getpw.c
-
-OBJECTS = sia.o posix_getpw.o
-
-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) $(CFLAGS) $(CPPFLAGS) $(PICFLAGS) $<
-
-install: all
- $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
- -if test "$(LIB)" != ""; then \
- $(INSTALL_DATA) -m 0555 $(LIB) $(DESTDIR)$(libdir)/$(LIB) ; \
- fi
-
-uninstall:
- -if test "$(LIB)" != ""; then \
- rm -f $(DESTDIR)$(libdir)/$(LIB) ; \
- fi
-
-TAGS: $(SOURCES)
- etags $(SOURCES)
-
-check:
-
-clean:
- rm -f $(LIB) *.o
-
-mostlyclean: clean
-
-distclean: clean
- rm -f Makefile *.tab.c *~
-
-realclean: distclean
- rm -f TAGS
-
-$(OBJECTS): ../../../include/config.h
-
-$(LIB): $(OBJECTS)
- rm -f $@
- $(LDSHARED) -shared -o $@ -rpath $(libdir) -hidden -exported_symbol siad_\* $(OBJECTS) $(LIB_DEPS)
-
-.PHONY: all Wall install uninstall check clean mostlyclean distclean realclean
diff --git a/crypto/kerberosIV/lib/auth/sia/README b/crypto/kerberosIV/lib/auth/sia/README
deleted file mode 100644
index 65957345dad1..000000000000
--- a/crypto/kerberosIV/lib/auth/sia/README
+++ /dev/null
@@ -1,87 +0,0 @@
-
-Digital SIA
------------
-
-To install the SIA module you will have to do the following:
-
- * Make sure `libsia_krb4.so' is available in `/usr/athena/lib'. If
- `/usr/athena' is not on local disk, you might want to put it in
- `/usr/shlib' or someplace else. If you do, you'll have to edit
- `krb4_matrix.conf' to reflect the new location (you will also have
- to do this if you installed in some other directory than
- `/usr/athena'). If you built with shared libraries, you will have
- to copy the shared `libkrb.so', `libdes.so', `libkadm.so', and
- `libkafs.so' to a place where the loader can find them (such as
- `/usr/shlib').
-
- * Copy (your possibly edited) `krb4_matrix.conf' to `/etc/sia'.
-
- * Apply `security.patch' to `/sbin/init.d/security'.
-
- * Turn on KRB4 security by issuing `rcmgr set SECURITY KRB4' and
- `rcmgr set KRB4_MATRIX_CONF krb4_matrix.conf'.
-
- * Digital thinks you should reboot your machine, but that really
- shouldn't be necessary. It's usually sufficient just to run
- `/sbin/init.d/security start' (and restart any applications that
- use SIA, like `xdm'.)
-
-Users with local passwords (like `root') should be able to login safely.
-
-When using Digital's xdm the `KRBTKFILE' environment variable isn't
-passed along as it should (since xdm zaps the environment). Instead you
-have to set `KRBTKFILE' to the correct value in
-`/usr/lib/X11/xdm/Xsession'. Add a line similar to
- KRBTKFILE=/tmp/tkt`id -u`_`ps -o ppid= -p $$`; export KRBTKFILE
-If you use CDE, `dtlogin' allows you to specify which additional
-environment variables it should export. To add `KRBTKFILE' to this
-list, edit `/usr/dt/config/Xconfig', and look for the definition of
-`exportList'. You want to add something like:
- Dtlogin.exportList: KRBTKFILE
-
-Notes to users with Enhanced security
-.....................................
-
-Digital's `ENHANCED' (C2) security, and Kerberos solves two different
-problems. C2 deals with local security, adds better control of who can
-do what, auditing, and similar things. Kerberos deals with network
-security.
-
-To make C2 security work with Kerberos you will have to do the
-following.
-
- * Replace all occurencies of `krb4_matrix.conf' with
- `krb4+c2_matrix.conf' in the directions above.
-
- * You must enable "vouching" in the `default' database. This will
- make the OSFC2 module trust other SIA modules, so you can login
- without giving your C2 password. To do this use `edauth' to edit
- the default entry `/usr/tcb/bin/edauth -dd default', and add a
- `d_accept_alternate_vouching' capability, if not already present.
-
- * For each user that does _not_ have a local C2 password, you should
- set the password expiration field to zero. You can do this for each
- user, or in the `default' table. To do this use `edauth' to set
- (or change) the `u_exp' capability to `u_exp#0'.
-
- * You also need to be aware that the shipped `login', `rcp', and
- `rshd', doesn't do any particular C2 magic (such as checking to
- various forms of disabled accounts), so if you rely on those
- features, you shouldn't use those programs. If you configure with
- `--enable-osfc2', these programs will, however, set the login UID.
- Still: use at your own risk.
-
-At present `su' does not accept the vouching flag, so it will not work
-as expected.
-
-Also, kerberised ftp will not work with C2 passwords. You can solve this
-by using both Digital's ftpd and our on different ports.
-
-*Remember*, if you do these changes you will get a system that most
-certainly does _not_ fulfill the requirements of a C2 system. If C2 is
-what you want, for instance if someone else is forcing you to use it,
-you're out of luck. If you use enhanced security because you want a
-system that is more secure than it would otherwise be, you probably got
-an even more secure system. Passwords will not be sent in the clear,
-for instance.
-
diff --git a/crypto/kerberosIV/lib/auth/sia/krb4+c2_matrix.conf b/crypto/kerberosIV/lib/auth/sia/krb4+c2_matrix.conf
deleted file mode 100644
index 4b90e0264a37..000000000000
--- a/crypto/kerberosIV/lib/auth/sia/krb4+c2_matrix.conf
+++ /dev/null
@@ -1,58 +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. 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: krb4+c2_matrix.conf,v 1.4 1999/12/02 16:58:37 joda Exp $
-
-# sia matrix configuration file (Kerberos 4 + C2)
-
-siad_init=(KRB4,/usr/athena/lib/libsia_krb4.so)(BSD,libc.so)
-siad_chk_invoker=(KRB4,/usr/athena/lib/libsia_krb4.so)(OSFC2,/usr/shlib/libsecurity.so)
-siad_ses_init=(KRB4,/usr/athena/lib/libsia_krb4.so)(OSFC2,/usr/shlib/libsecurity.so)
-siad_ses_authent=(KRB4,/usr/athena/lib/libsia_krb4.so)(OSFC2,/usr/shlib/libsecurity.so)
-siad_ses_estab=(KRB4,/usr/athena/lib/libsia_krb4.so)(OSFC2,/usr/shlib/libsecurity.so)
-siad_ses_launch=(KRB4,/usr/athena/lib/libsia_krb4.so)(OSFC2,/usr/shlib/libsecurity.so)
-siad_ses_suauthent=(KRB4,/usr/athena/lib/libsia_krb4.so)(OSFC2,/usr/shlib/libsecurity.so)
-siad_ses_reauthent=(KRB4,/usr/athena/lib/libsia_krb4.so)(OSFC2,/usr/shlib/libsecurity.so)
-siad_chg_finger=(KRB4,/usr/athena/lib/libsia_krb4.so)(OSFC2,/usr/shlib/libsecurity.so)
-siad_chg_password=(KRB4,/usr/athena/lib/libsia_krb4.so)(OSFC2,/usr/shlib/libsecurity.so)
-siad_chg_shell=(KRB4,/usr/athena/lib/libsia_krb4.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=(KRB4,/usr/athena/lib/libsia_krb4.so)(OSFC2,/usr/shlib/libsecurity.so)
-siad_chk_user=(KRB4,/usr/athena/lib/libsia_krb4.so)(OSFC2,/usr/shlib/libsecurity.so)
diff --git a/crypto/kerberosIV/lib/auth/sia/krb4_matrix.conf b/crypto/kerberosIV/lib/auth/sia/krb4_matrix.conf
deleted file mode 100644
index 4f55a810ce71..000000000000
--- a/crypto/kerberosIV/lib/auth/sia/krb4_matrix.conf
+++ /dev/null
@@ -1,59 +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. 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: krb4_matrix.conf,v 1.6 1999/12/02 16:58:37 joda Exp $
-
-# sia matrix configuration file (Kerberos 4 + BSD)
-
-siad_init=(KRB4,/usr/athena/lib/libsia_krb4.so)(BSD,libc.so)
-siad_chk_invoker=(BSD,libc.so)
-siad_ses_init=(KRB4,/usr/athena/lib/libsia_krb4.so)
-siad_ses_authent=(KRB4,/usr/athena/lib/libsia_krb4.so)(BSD,libc.so)
-siad_ses_estab=(BSD,libc.so)
-siad_ses_launch=(KRB4,/usr/athena/lib/libsia_krb4.so)(BSD,libc.so)
-siad_ses_suauthent=(KRB4,/usr/athena/lib/libsia_krb4.so)(BSD,libc.so)
-siad_ses_reauthent=(KRB4,/usr/athena/lib/libsia_krb4.so)(BSD,libc.so)
-siad_chg_finger=(BSD,libc.so)
-siad_chg_password=(KRB4,/usr/athena/lib/libsia_krb4.so)(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=(KRB4,/usr/athena/lib/libsia_krb4.so)(BSD,libc.so)
-siad_chk_user=(KRB4,/usr/athena/lib/libsia_krb4.so)(BSD,libc.so)
-
diff --git a/crypto/kerberosIV/lib/auth/sia/krb5+c2_matrix.conf b/crypto/kerberosIV/lib/auth/sia/krb5+c2_matrix.conf
deleted file mode 100644
index c2952e2db8f6..000000000000
--- a/crypto/kerberosIV/lib/auth/sia/krb5+c2_matrix.conf
+++ /dev/null
@@ -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)
diff --git a/crypto/kerberosIV/lib/auth/sia/krb5_matrix.conf b/crypto/kerberosIV/lib/auth/sia/krb5_matrix.conf
deleted file mode 100644
index e49366aefc67..000000000000
--- a/crypto/kerberosIV/lib/auth/sia/krb5_matrix.conf
+++ /dev/null
@@ -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)
diff --git a/crypto/kerberosIV/lib/auth/sia/posix_getpw.c b/crypto/kerberosIV/lib/auth/sia/posix_getpw.c
deleted file mode 100644
index c5961dcd2c5b..000000000000
--- a/crypto/kerberosIV/lib/auth/sia/posix_getpw.c
+++ /dev/null
@@ -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 */
diff --git a/crypto/kerberosIV/lib/auth/sia/security.patch b/crypto/kerberosIV/lib/auth/sia/security.patch
deleted file mode 100644
index c407876d6362..000000000000
--- a/crypto/kerberosIV/lib/auth/sia/security.patch
+++ /dev/null
@@ -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)."
diff --git a/crypto/kerberosIV/lib/auth/sia/sia.c b/crypto/kerberosIV/lib/auth/sia/sia.c
deleted file mode 100644
index 73cd53e7dced..000000000000
--- a/crypto/kerberosIV/lib/auth/sia/sia.c
+++ /dev/null
@@ -1,672 +0,0 @@
-/*
- * Copyright (c) 1995-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 "sia_locl.h"
-
-RCSID("$Id: sia.c,v 1.32 1999/10/03 15:49:36 joda Exp $");
-
-int
-siad_init(void)
-{
- return SIADSUCCESS;
-}
-
-int
-siad_chk_invoker(void)
-{
- SIA_DEBUG(("DEBUG", "siad_chk_invoker"));
- return SIADFAIL;
-}
-
-int
-siad_ses_init(SIAENTITY *entity, int pkgind)
-{
- struct state *s = malloc(sizeof(*s));
- SIA_DEBUG(("DEBUG", "siad_ses_init"));
- if(s == NULL)
- return SIADFAIL;
- memset(s, 0, sizeof(*s));
-#ifdef SIA_KRB5
- krb5_init_context(&s->context);
-#endif
- entity->mech[pkgind] = (int*)s;
- return SIADSUCCESS;
-}
-
-static int
-setup_name(SIAENTITY *e, prompt_t *p)
-{
- SIA_DEBUG(("DEBUG", "setup_name"));
- e->name = malloc(SIANAMEMIN + 1);
- if(e->name == NULL){
- SIA_DEBUG(("DEBUG", "failed to malloc %u bytes", SIANAMEMIN+1));
- return SIADFAIL;
- }
- p->prompt = (unsigned char*)"login: ";
- p->result = (unsigned char*)e->name;
- p->min_result_length = 1;
- p->max_result_length = SIANAMEMIN;
- p->control_flags = 0;
- return SIADSUCCESS;
-}
-
-static int
-setup_password(SIAENTITY *e, prompt_t *p)
-{
- SIA_DEBUG(("DEBUG", "setup_password"));
- e->password = malloc(SIAMXPASSWORD + 1);
- if(e->password == NULL){
- SIA_DEBUG(("DEBUG", "failed to malloc %u bytes", SIAMXPASSWORD+1));
- return SIADFAIL;
- }
- p->prompt = (unsigned char*)"Password: ";
- p->result = (unsigned char*)e->password;
- p->min_result_length = 0;
- p->max_result_length = SIAMXPASSWORD;
- p->control_flags = SIARESINVIS;
- return SIADSUCCESS;
-}
-
-
-static int
-doauth(SIAENTITY *entity, int pkgind, char *name)
-{
- struct passwd pw, *pwd;
- char pwbuf[1024];
- struct state *s = (struct state*)entity->mech[pkgind];
-#ifdef SIA_KRB5
- krb5_realm *realms, *r;
- krb5_principal principal;
- krb5_ccache ccache;
- krb5_error_code ret;
-#endif
-#ifdef SIA_KRB4
- char realm[REALM_SZ];
- char *toname, *toinst;
- int ret;
- struct passwd fpw, *fpwd;
- char fpwbuf[1024];
- int secure;
-#endif
-
- if(getpwnam_r(name, &pw, pwbuf, sizeof(pwbuf), &pwd) != 0){
- SIA_DEBUG(("DEBUG", "failed to getpwnam(%s)", name));
- return SIADFAIL;
- }
-
-#ifdef SIA_KRB5
- ret = krb5_get_default_realms(s->context, &realms);
-
- for (r = realms; *r != NULL; ++r) {
- krb5_make_principal (s->context, &principal, *r, entity->name, NULL);
-
- if(krb5_kuserok(s->context, principal, entity->name))
- break;
- }
- krb5_free_host_realm (s->context, realms);
- if (*r == NULL)
- return SIADFAIL;
-
- sprintf(s->ticket, "FILE:/tmp/krb5_cc%d_%d", pwd->pw_uid, getpid());
- ret = krb5_cc_resolve(s->context, s->ticket, &ccache);
- if(ret)
- return SIADFAIL;
-#endif
-
-#ifdef SIA_KRB4
- snprintf(s->ticket, sizeof(s->ticket),
- TKT_ROOT "%u_%u", (unsigned)pwd->pw_uid, (unsigned)getpid());
- krb_get_lrealm(realm, 1);
- toname = name;
- toinst = "";
- if(entity->authtype == SIA_A_SUAUTH){
- uid_t ouid;
-#ifdef HAVE_SIAENTITY_OUID
- ouid = entity->ouid;
-#else
- ouid = getuid();
-#endif
- if(getpwuid_r(ouid, &fpw, fpwbuf, sizeof(fpwbuf), &fpwd) != 0){
- SIA_DEBUG(("DEBUG", "failed to getpwuid(%u)", ouid));
- return SIADFAIL;
- }
- snprintf(s->ticket, sizeof(s->ticket), TKT_ROOT "_%s_to_%s_%d",
- fpwd->pw_name, pwd->pw_name, getpid());
- if(strcmp(pwd->pw_name, "root") == 0){
- toname = fpwd->pw_name;
- toinst = pwd->pw_name;
- }
- }
- if(entity->authtype == SIA_A_REAUTH)
- snprintf(s->ticket, sizeof(s->ticket), "%s", tkt_string());
-
- krb_set_tkt_string(s->ticket);
-
- setuid(0); /* XXX fix for fix in tf_util.c */
- if(krb_kuserok(toname, toinst, realm, name)){
- SIA_DEBUG(("DEBUG", "%s.%s@%s is not allowed to login as %s",
- toname, toinst, realm, name));
- return SIADFAIL;
- }
-#endif
-#ifdef SIA_KRB5
- ret = krb5_verify_user_lrealm(s->context, principal, ccache,
- entity->password, 1, NULL);
- if(ret){
- /* if this is most likely a local user (such as
- root), just silently return failure when the
- principal doesn't exist */
- if(ret != KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN &&
- ret != KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN)
- SIALOG("WARNING", "krb5_verify_user(%s): %s",
- entity->name, error_message(ret));
- return SIADFAIL;
- }
-#endif
-#ifdef SIA_KRB4
- if (getuid () == 0)
- secure = KRB_VERIFY_SECURE;
- else
- secure = KRB_VERIFY_NOT_SECURE;
-
- ret = krb_verify_user(toname, toinst, realm,
- entity->password, secure, NULL);
- if(ret){
- SIA_DEBUG(("DEBUG", "krb_verify_user: %s", krb_get_err_text(ret)));
- if(ret != KDC_PR_UNKNOWN)
- /* since this is most likely a local user (such as
- root), just silently return failure when the
- principal doesn't exist */
- SIALOG("WARNING", "krb_verify_user(%s.%s): %s",
- toname, toinst, krb_get_err_text(ret));
- return SIADFAIL;
- }
-#endif
- if(sia_make_entity_pwd(pwd, entity) == SIAFAIL)
- return SIADFAIL;
- s->valid = 1;
- return SIADSUCCESS;
-}
-
-
-static int
-common_auth(sia_collect_func_t *collect,
- SIAENTITY *entity,
- int siastat,
- int pkgind)
-{
- prompt_t prompts[2], *pr;
- char *name;
-
- SIA_DEBUG(("DEBUG", "common_auth"));
- if((siastat == SIADSUCCESS) && (geteuid() == 0))
- return SIADSUCCESS;
- if(entity == NULL) {
- SIA_DEBUG(("DEBUG", "entity == NULL"));
- return SIADFAIL | SIADSTOP;
- }
- name = entity->name;
- if(entity->acctname)
- name = entity->acctname;
-
- if((collect != NULL) && entity->colinput) {
- int num;
- pr = prompts;
- if(name == NULL){
- if(setup_name(entity, pr) != SIADSUCCESS)
- return SIADFAIL;
- pr++;
- }
- if(entity->password == NULL){
- if(setup_password(entity, pr) != SIADSUCCESS)
- return SIADFAIL;
- pr++;
- }
- num = pr - prompts;
- if(num == 1){
- if((*collect)(240, SIAONELINER, (unsigned char*)"", num,
- prompts) != SIACOLSUCCESS){
- SIA_DEBUG(("DEBUG", "collect failed"));
- return SIADFAIL | SIADSTOP;
- }
- } else if(num > 0){
- if((*collect)(0, SIAFORM, (unsigned char*)"", num,
- prompts) != SIACOLSUCCESS){
- SIA_DEBUG(("DEBUG", "collect failed"));
- return SIADFAIL | SIADSTOP;
- }
- }
- }
- if(name == NULL)
- name = entity->name;
- if(name == NULL || name[0] == '\0'){
- SIA_DEBUG(("DEBUG", "name is null"));
- return SIADFAIL;
- }
-
- if(entity->password == NULL || strlen(entity->password) > SIAMXPASSWORD){
- SIA_DEBUG(("DEBUG", "entity->password is null"));
- return SIADFAIL;
- }
-
- return doauth(entity, pkgind, name);
-}
-
-
-int
-siad_ses_authent(sia_collect_func_t *collect,
- SIAENTITY *entity,
- int siastat,
- int pkgind)
-{
- SIA_DEBUG(("DEBUG", "siad_ses_authent"));
- return common_auth(collect, entity, siastat, pkgind);
-}
-
-int
-siad_ses_estab(sia_collect_func_t *collect,
- SIAENTITY *entity, int pkgind)
-{
- SIA_DEBUG(("DEBUG", "siad_ses_estab"));
- return SIADFAIL;
-}
-
-int
-siad_ses_launch(sia_collect_func_t *collect,
- SIAENTITY *entity,
- int pkgind)
-{
- static char env[MaxPathLen];
- struct state *s = (struct state*)entity->mech[pkgind];
- SIA_DEBUG(("DEBUG", "siad_ses_launch"));
- if(s->valid){
-#ifdef SIA_KRB5
- chown(s->ticket + sizeof("FILE:") - 1,
- entity->pwd->pw_uid,
- entity->pwd->pw_gid);
- snprintf(env, sizeof(env), "KRB5CCNAME=%s", s->ticket);
-#endif
-#ifdef SIA_KRB4
- chown(s->ticket, entity->pwd->pw_uid, entity->pwd->pw_gid);
- snprintf(env, sizeof(env), "KRBTKFILE=%s", s->ticket);
-#endif
- putenv(env);
- }
-#ifdef KRB4
- if (k_hasafs()) {
- char cell[64];
- k_setpag();
- if(k_afs_cell_of_file(entity->pwd->pw_dir, cell, sizeof(cell)) == 0)
- krb_afslog(cell, 0);
- krb_afslog_home(0, 0, entity->pwd->pw_dir);
- }
-#endif
- return SIADSUCCESS;
-}
-
-int
-siad_ses_release(SIAENTITY *entity, int pkgind)
-{
- SIA_DEBUG(("DEBUG", "siad_ses_release"));
- if(entity->mech[pkgind]){
-#ifdef SIA_KRB5
- struct state *s = (struct state*)entity->mech[pkgind];
- krb5_free_context(s->context);
-#endif
- free(entity->mech[pkgind]);
- }
- return SIADSUCCESS;
-}
-
-int
-siad_ses_suauthent(sia_collect_func_t *collect,
- SIAENTITY *entity,
- int siastat,
- int pkgind)
-{
- SIA_DEBUG(("DEBUG", "siad_ses_suauth"));
- if(geteuid() != 0)
- return SIADFAIL;
- if(entity->name == NULL)
- return SIADFAIL;
- if(entity->name[0] == '\0') {
- free(entity->name);
- entity->name = strdup("root");
- if (entity->name == NULL)
- return SIADFAIL;
- }
- return common_auth(collect, entity, siastat, pkgind);
-}
-
-int
-siad_ses_reauthent (sia_collect_func_t *collect,
- SIAENTITY *entity,
- int siastat,
- int pkgind)
-{
- int ret;
- SIA_DEBUG(("DEBUG", "siad_ses_reauthent"));
- if(entity == NULL || entity->name == NULL)
- return SIADFAIL;
- ret = common_auth(collect, entity, siastat, pkgind);
- if((ret & SIADSUCCESS)){
- /* launch isn't (always?) called when doing reauth, so we must
- duplicate some code here... */
- struct state *s = (struct state*)entity->mech[pkgind];
- chown(s->ticket, entity->pwd->pw_uid, entity->pwd->pw_gid);
-#ifdef KRB4
- if(k_hasafs()) {
- char cell[64];
- if(k_afs_cell_of_file(entity->pwd->pw_dir,
- cell, sizeof(cell)) == 0)
- krb_afslog(cell, 0);
- krb_afslog_home(0, 0, entity->pwd->pw_dir);
- }
-#endif
- }
- return ret;
-}
-
-int
-siad_chg_finger (sia_collect_func_t *collect,
- const char *username,
- int argc,
- char *argv[])
-{
- SIA_DEBUG(("DEBUG", "siad_chg_finger"));
- return SIADFAIL;
-}
-
-#ifdef SIA_KRB5
-int
-siad_chg_password (sia_collect_func_t *collect,
- const char *username,
- int argc,
- char *argv[])
-{
- return SIADFAIL;
-}
-#endif
-
-#ifdef SIA_KRB4
-static void
-sia_message(sia_collect_func_t *collect, int rendition,
- const char *title, const char *message)
-{
- prompt_t prompt;
- prompt.prompt = (unsigned char*)message;
- (*collect)(0, rendition, (unsigned char*)title, 1, &prompt);
-}
-
-static int
-init_change(sia_collect_func_t *collect, krb_principal *princ)
-{
- prompt_t prompt;
- char old_pw[MAX_KPW_LEN+1];
- char *msg;
- char tktstring[128];
- int ret;
-
- SIA_DEBUG(("DEBUG", "init_change"));
- prompt.prompt = (unsigned char*)"Old password: ";
- prompt.result = (unsigned char*)old_pw;
- prompt.min_result_length = 0;
- prompt.max_result_length = sizeof(old_pw) - 1;
- prompt.control_flags = SIARESINVIS;
- asprintf(&msg, "Changing password for %s", krb_unparse_name(princ));
- if(msg == NULL){
- SIA_DEBUG(("DEBUG", "out of memory"));
- return SIADFAIL;
- }
- ret = (*collect)(60, SIAONELINER, (unsigned char*)msg, 1, &prompt);
- free(msg);
- SIA_DEBUG(("DEBUG", "ret = %d", ret));
- if(ret != SIACOLSUCCESS)
- return SIADFAIL;
- snprintf(tktstring, sizeof(tktstring),
- TKT_ROOT "_cpw_%u", (unsigned)getpid());
- krb_set_tkt_string(tktstring);
-
- ret = krb_get_pw_in_tkt(princ->name, princ->instance, princ->realm,
- PWSERV_NAME, KADM_SINST, 1, old_pw);
- if (ret != KSUCCESS) {
- SIA_DEBUG(("DEBUG", "krb_get_pw_in_tkt: %s", krb_get_err_text(ret)));
- if (ret == INTK_BADPW)
- sia_message(collect, SIAWARNING, "", "Incorrect old password.");
- else
- sia_message(collect, SIAWARNING, "", "Kerberos error.");
- memset(old_pw, 0, sizeof(old_pw));
- return SIADFAIL;
- }
- if(chown(tktstring, getuid(), -1) < 0){
- dest_tkt();
- return SIADFAIL;
- }
- memset(old_pw, 0, sizeof(old_pw));
- return SIADSUCCESS;
-}
-
-int
-siad_chg_password (sia_collect_func_t *collect,
- const char *username,
- int argc,
- char *argv[])
-{
- prompt_t prompts[2];
- krb_principal princ;
- int ret;
- char new_pw1[MAX_KPW_LEN+1];
- char new_pw2[MAX_KPW_LEN+1];
- static struct et_list *et_list;
-
- set_progname(argv[0]);
-
- SIA_DEBUG(("DEBUG", "siad_chg_password"));
- if(collect == NULL)
- return SIADFAIL;
-
- if(username == NULL)
- username = getlogin();
-
- ret = krb_parse_name(username, &princ);
- if(ret)
- return SIADFAIL;
- if(princ.realm[0] == '\0')
- krb_get_lrealm(princ.realm, 1);
-
- if(et_list == NULL) {
- initialize_kadm_error_table_r(&et_list);
- initialize_krb_error_table_r(&et_list);
- }
-
- ret = init_change(collect, &princ);
- if(ret != SIADSUCCESS)
- return ret;
-
-again:
- prompts[0].prompt = (unsigned char*)"New password: ";
- prompts[0].result = (unsigned char*)new_pw1;
- prompts[0].min_result_length = MIN_KPW_LEN;
- prompts[0].max_result_length = sizeof(new_pw1) - 1;
- prompts[0].control_flags = SIARESINVIS;
- prompts[1].prompt = (unsigned char*)"Verify new password: ";
- prompts[1].result = (unsigned char*)new_pw2;
- prompts[1].min_result_length = MIN_KPW_LEN;
- prompts[1].max_result_length = sizeof(new_pw2) - 1;
- prompts[1].control_flags = SIARESINVIS;
- if((*collect)(120, SIAFORM, (unsigned char*)"", 2, prompts) !=
- SIACOLSUCCESS) {
- dest_tkt();
- return SIADFAIL;
- }
- if(strcmp(new_pw1, new_pw2) != 0){
- sia_message(collect, SIAWARNING, "", "Password mismatch.");
- goto again;
- }
- ret = kadm_check_pw(new_pw1);
- if(ret) {
- sia_message(collect, SIAWARNING, "", com_right(et_list, ret));
- goto again;
- }
-
- memset(new_pw2, 0, sizeof(new_pw2));
- ret = kadm_init_link (PWSERV_NAME, KRB_MASTER, princ.realm);
- if (ret != KADM_SUCCESS)
- sia_message(collect, SIAWARNING, "Error initing kadmin connection",
- com_right(et_list, ret));
- else {
- des_cblock newkey;
- char *pw_msg; /* message from server */
-
- des_string_to_key(new_pw1, &newkey);
- ret = kadm_change_pw_plain((unsigned char*)&newkey, new_pw1, &pw_msg);
- memset(newkey, 0, sizeof(newkey));
-
- if (ret == KADM_INSECURE_PW)
- sia_message(collect, SIAWARNING, "Insecure password", pw_msg);
- else if (ret != KADM_SUCCESS)
- sia_message(collect, SIAWARNING, "Error changing password",
- com_right(et_list, ret));
- }
- memset(new_pw1, 0, sizeof(new_pw1));
-
- if (ret != KADM_SUCCESS)
- sia_message(collect, SIAWARNING, "", "Password NOT changed.");
- else
- sia_message(collect, SIAINFO, "", "Password changed.");
-
- dest_tkt();
- if(ret)
- return SIADFAIL;
- return SIADSUCCESS;
-}
-#endif
-
-int
-siad_chg_shell (sia_collect_func_t *collect,
- const char *username,
- int argc,
- char *argv[])
-{
- return SIADFAIL;
-}
-
-int
-siad_getpwent(struct passwd *result,
- char *buf,
- int bufsize,
- struct sia_context *context)
-{
- return SIADFAIL;
-}
-
-int
-siad_getpwuid (uid_t uid,
- struct passwd *result,
- char *buf,
- int bufsize,
- struct sia_context *context)
-{
- return SIADFAIL;
-}
-
-int
-siad_getpwnam (const char *name,
- struct passwd *result,
- char *buf,
- int bufsize,
- struct sia_context *context)
-{
- return SIADFAIL;
-}
-
-int
-siad_setpwent (struct sia_context *context)
-{
- return SIADFAIL;
-}
-
-int
-siad_endpwent (struct sia_context *context)
-{
- return SIADFAIL;
-}
-
-int
-siad_getgrent(struct group *result,
- char *buf,
- int bufsize,
- struct sia_context *context)
-{
- return SIADFAIL;
-}
-
-int
-siad_getgrgid (gid_t gid,
- struct group *result,
- char *buf,
- int bufsize,
- struct sia_context *context)
-{
- return SIADFAIL;
-}
-
-int
-siad_getgrnam (const char *name,
- struct group *result,
- char *buf,
- int bufsize,
- struct sia_context *context)
-{
- return SIADFAIL;
-}
-
-int
-siad_setgrent (struct sia_context *context)
-{
- return SIADFAIL;
-}
-
-int
-siad_endgrent (struct sia_context *context)
-{
- return SIADFAIL;
-}
-
-int
-siad_chk_user (const char *logname, int checkflag)
-{
- if(checkflag != CHGPASSWD)
- return SIADFAIL;
- return SIADSUCCESS;
-}
diff --git a/crypto/kerberosIV/lib/auth/sia/sia_locl.h b/crypto/kerberosIV/lib/auth/sia/sia_locl.h
deleted file mode 100644
index 0f3f74d98d3b..000000000000
--- a/crypto/kerberosIV/lib/auth/sia/sia_locl.h
+++ /dev/null
@@ -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__ */
diff --git a/crypto/kerberosIV/lib/kadm/check_password.c b/crypto/kerberosIV/lib/kadm/check_password.c
deleted file mode 100644
index ba6ba4879a27..000000000000
--- a/crypto/kerberosIV/lib/kadm/check_password.c
+++ /dev/null
@@ -1,55 +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. 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 "kadm_locl.h"
-RCSID("$Id: check_password.c,v 1.3 1999/12/02 16:58:39 joda Exp $");
-
-/* This is a client side password check. Should perhaps be merged with
- kadmind version that lives in pw_check.c */
-
-int
-kadm_check_pw (const char *password)
-{
- const char *t;
- if (strlen(password) == 0)
- return KADM_PASS_Q_NULL;
- if (strlen(password) < MIN_KPW_LEN)
- return KADM_PASS_Q_TOOSHORT;
-
- /* Don't allow all lower case passwords regardless of length */
- for (t = password; *t && islower((unsigned char)*t); t++)
- ;
- if (*t == '\0')
- return KADM_PASS_Q_CLASS;
- return 0;
-}
diff --git a/crypto/kerberosIV/lib/kafs/ChangeLog b/crypto/kerberosIV/lib/kafs/ChangeLog
deleted file mode 100644
index c9cd032deb4b..000000000000
--- a/crypto/kerberosIV/lib/kafs/ChangeLog
+++ /dev/null
@@ -1,165 +0,0 @@
-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 2333221958fa..000000000000
--- 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/README.dlfcn b/crypto/kerberosIV/lib/kafs/README.dlfcn
deleted file mode 100644
index cee1b751939e..000000000000
--- 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/afskrb5.c b/crypto/kerberosIV/lib/kafs/afskrb5.c
deleted file mode 100644
index 4c35ea7382f2..000000000000
--- 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/common.c b/crypto/kerberosIV/lib/kafs/common.c
deleted file mode 100644
index 207b9b643de7..000000000000
--- 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/kclient/KClient.c b/crypto/kerberosIV/lib/kclient/KClient.c
deleted file mode 100644
index 6d4ed60ca182..000000000000
--- a/crypto/kerberosIV/lib/kclient/KClient.c
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 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. 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.
- */
-
-/* KClient.c - KClient glue to krb4.dll
- * Author: Jörgen Karlsson - d93-jka@nada.kth.se
- * Date: June 1996
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: KClient.c,v 1.14 1999/12/02 16:58:40 joda Exp $");
-#endif
-
-#ifdef WIN32 /* Visual C++ 4.0 (Windows95/NT) */
-#include <Windows.h>
-#endif /* WIN32 */
-
-//#include <string.h>
-#include <winsock.h>
-#include "passwd_dlg.h"
-#include "KClient.h"
-#include "krb.h"
-
-char guser[64];
-
-void
-msg(char *text)
-{
- HWND wnd = GetActiveWindow();
- MessageBox(wnd, text, "KClient message", MB_OK|MB_APPLMODAL);
-}
-
-BOOL
-SendTicketForService(LPSTR service, LPSTR version, int fd)
-{
- KTEXT_ST ticket;
- MSG_DAT mdat;
- CREDENTIALS cred;
- des_key_schedule schedule;
- char name[SNAME_SZ], inst[INST_SZ], realm[REALM_SZ];
- int ret;
- static KClientSessionInfo foo;
- KClientKey key;
-
- kname_parse(name, inst, realm, service);
- strlcpy(foo.realm, realm, sizeof(foo.realm));
-
- if(KClientStatus(&foo) == KClientNotLoggedIn)
- KClientLogin(&foo, &key);
-
- ret = krb_sendauth (0, fd, &ticket,
- name, inst, realm, 17, &mdat,
- &cred, &schedule, NULL, NULL, version);
- if(ret)
- return FALSE;
- return TRUE;
-}
-
-BOOL WINAPI
-DllMain(HANDLE hInst, ULONG reason, LPVOID lpReserved)
-{
- WORD wVersionRequested;
- WSADATA wsaData;
- int err;
-
- switch(reason){
- case DLL_PROCESS_ATTACH:
- wVersionRequested = MAKEWORD(1, 1);
-
- err = WSAStartup(wVersionRequested, &wsaData);
-
- if (err != 0)
- {
- /* Tell the user that we couldn't find a useable */
- /* winsock.dll. */
- msg("Cannot find winsock.dll");
- return FALSE;
- }
- break;
- case DLL_PROCESS_DETACH:
- WSACleanup();
- }
-
- return TRUE;
-}
-
-Kerr
-KClientMessage(char *text, Kerr error)
-{
- msg(text);
- return error;
-}
-
-/* KClientInitSession
- * You need to call this routine before calling most other routines.
- * It initializes a KClientSessionInfo structure.
- * The local and remote addresses are for use in KClientEncrypt,
- * KClientDecrypt, KClientMakeSendAuth and KClientVerifySendAuth.
- * If you don't use any of these routines it's perfectly OK to do the following...
- * err = KClientInitSession(session,0,0,0,0);
- */
-Kerr
-KClientInitSession(KClientSessionInfo *session,
- unsigned long lAddr,
- unsigned short lPort,
- unsigned long fAddr,
- unsigned short fPort)
-{
- session->lAddr = lAddr;
- session->lPort = lPort;
- session->fAddr = fAddr;
- session->fPort = fPort;
- if(tf_get_pname(session->user) != KSUCCESS)
- *(session->user) = '\0';
- if(tf_get_pinst(session->inst) != KSUCCESS)
- *(session->inst) = '\0';
- krb_get_lrealm (session->realm, 1);
- if(*(session->user))
- strlcpy(guser, session->user, sizeof(guser));
- else
- *guser ='\0';
-
- return 0;
-}
-
-
-/* KClientGetTicketForService
- * This routine gets an authenticator to be passed to a service.
- * If the user isn't already logged in the user is prompted for a password.
- */
-Kerr
-KClientGetTicketForService(KClientSessionInfo *session,
- char *service,
- void *buf,
- unsigned long *buflen)
-{
- CREDENTIALS c;
- KClientKey k;
- KTEXT_ST ticket;
- char serv[255], inst[255], realm[255];
- Kerr err;
-
- // KClientSetUserName(session->user);
- err = kname_parse(serv,inst,realm,service);
- if(*realm)
- strlcpy(session->realm, realm, sizeof(session->realm));
- else
- strlcpy(realm, session->realm, sizeof(realm));
- if(KClientStatus(session) == KClientNotLoggedIn)
- if((err = KClientLogin(session, &k)) != KSUCCESS)
- return err;
-
- if((err = krb_mk_req(&ticket, serv, inst, realm, 0)) != KSUCCESS)
- return KClientMessage(KClientErrorText(err,0),err);
- if((err = krb_get_cred(serv, inst, realm, &c)) != KSUCCESS)
- return KClientMessage(KClientErrorText(err,0),err);
-
- if(*buflen >= ticket.length)
- {
- *buflen = ticket.length + sizeof(unsigned long);
- CopyMemory(buf, &ticket, *buflen);
- CopyMemory(session->key, c.session, sizeof(session->key));
- }
- else
- err = -1;
- return err;
-}
-
-
-/* KClientLogin
- * This routine "logs in" by getting a ticket granting ticket from kerberos.
- * It returns the user's private key which can be used to automate login at
- * a later time with KClientKeyLogin.
- */
-
-Kerr
-KClientLogin(KClientSessionInfo *session,
- KClientKey *privateKey)
-{
- CREDENTIALS c;
- Kerr err;
- char passwd[100];
-
- if((err = pwd_dialog(guser, passwd)))
- return err;
- if(KClientStatus(session) == KClientNotLoggedIn)
- {
-
- if((err = krb_get_pw_in_tkt(guser, session->inst, session->realm,
- "krbtgt", session->realm,
- DEFAULT_TKT_LIFE, passwd)) != KSUCCESS)
- return KClientMessage(KClientErrorText(err,0),err);
- }
- if((err = krb_get_cred("krbtgt", session->realm,
- session->realm, &c)) == KSUCCESS)
- CopyMemory(privateKey, c.session, sizeof(*privateKey));
- return err;
-}
-
-
-/* KClientPasswordLogin
- * This routine is similiar to KClientLogin but instead of prompting the user
- * for a password it uses the password supplied to establish login.
- */
-Kerr
-KClientPasswordLogin(KClientSessionInfo *session,
- char *password,
- KClientKey *privateKey)
-{
- return krb_get_pw_in_tkt(guser, session->inst, session->realm,
- "krbtgt",
- session->realm,
- DEFAULT_TKT_LIFE,
- password);
-}
-
-
-static key_proc_t
-key_proc(void *arg)
-{
- return arg;
-}
-
-/* KClientKeyLogin
- * This routine is similiar to KClientLogin but instead of prompting the user
- * for a password it uses the private key supplied to establish login.
- */
-Kerr
-KClientKeyLogin(KClientSessionInfo *session,
- KClientKey *privateKey)
-{
- return krb_get_in_tkt(guser, session->inst, session->realm,
- "krbtgt",
- session->realm,
- DEFAULT_TKT_LIFE,
- key_proc,
- 0,
- privateKey);
-}
-
-/* KClientLogout
- * This routine destroys all credentials stored in the credential cache
- * effectively logging the user out.
- */
-Kerr
-KClientLogout(void)
-{
- return 0;
-}
-
-
-/* KClientStatus
- * This routine returns the user's login status which can be
- * KClientLoggedIn or KClientNotLoggedIn.
- */
-short
-KClientStatus(KClientSessionInfo *session)
-{
- CREDENTIALS c;
- if(krb_get_cred("krbtgt",
- session->realm,
- session->realm, &c) == KSUCCESS)
- return KClientLoggedIn;
- else
- return KClientNotLoggedIn;
-}
-
-
-/* KClientGetUserName
- * This routine returns the name the user supplied in the login dialog.
- * No name is returned if the user is not logged in.
- */
-Kerr
-KClientGetUserName(char *user)
-{
- strcpy(user, guser);
- return 0;
-}
-
-
-/* KClientSetUserName
- * This routine sets the name that will come up in the login dialog
- * the next time the user is prompted for a password.
- */
-Kerr
-KClientSetUserName(char *user)
-{
- strlcpy(guser, user, sizeof(guser));
- return 0;
-}
-
-
-/* KClientCacheInitialTicket
- * This routine is used to obtain a ticket for the password changing service.
- */
-Kerr
-KClientCacheInitialTicket(KClientSessionInfo *session,
- char *service)
-{
- return 0;
-}
-
-
-/* KClientGetSessionKey
- * This routine can be used to obtain the session key which is stored
- * in the KClientSessionInfo record. The session key has no usefullness
- * with any KClient calls but it can be used to with the MIT kerberos API.
- */
-Kerr
-KClientGetSessionKey(KClientSessionInfo *session,
- KClientKey *sessionKey)
-{
- CopyMemory(sessionKey, session->key, sizeof(*sessionKey));
- return 0;
-}
-
-
-/* KClientMakeSendAuth
- * This routine is used to create an authenticator that is the same as those
- * created by the kerberos routine SendAuth.
- */
-Kerr
-KClientMakeSendAuth(KClientSessionInfo *session,
- char *service,
- void *buf,
- unsigned long *buflen,
- long checksum,
- char *applicationVersion)
-{
- return 0;
-}
-
-
-/* KClientVerifySendAuth
- * This routine is used to verify a response made by a server doing RecvAuth.
- * The two routines KClientMakeSendAuth and KClientVerifySendAuth together
- * provide the functionality of SendAuth minus the transmission of authenticators
- * between client->server->client.
- */
-Kerr
-KClientVerifySendAuth(KClientSessionInfo *session,
- void *buf,
- unsigned long *buflen)
-{
- return 0;
-}
-
-
-/* KClientEncrypt
- * This routine encrypts a series a bytes for transmission to the remote host.
- * For this to work properly you must be logged in and you must have specified
- * the remote and local addresses in KClientInitSession. The unencrypted
- * message pointed to by buf and of length buflen is returned encrypted
- * in encryptBuf of length encryptLength.
- * The encrypted buffer must be at least 26 bytes longer the buf.
- */
-Kerr
-KClientEncrypt(KClientSessionInfo *session,
- void *buf,
- unsigned long buflen,
- void *encryptBuf,
- unsigned long *encryptLength)
-{
- int num = 64;
- des_cfb64_encrypt(buf, encryptBuf, buflen,
- (struct des_ks_struct*) session->key,
- 0, &num, 1);
- return 0;
-}
-
-
-/* KClientDecrypt
- * This routine decrypts a series of bytes received from the remote host.
-
- * NOTE: this routine will not reverse a KClientEncrypt call.
- * It can only decrypt messages sent from the remote host.
-
- * Instead of copying the decrypted message to an out buffer,
- * the message is decrypted in place and you are returned
- * an offset into the buffer where the decrypted message begins.
- */
-Kerr
-KClientDecrypt(KClientSessionInfo *session,
- void *buf,
- unsigned long buflen,
- unsigned long *decryptOffset,
- unsigned long *decryptLength)
-{
- int num;
- des_cfb64_encrypt(buf, buf, buflen,
- (struct des_ks_struct*)session->key, 0, &num, 0);
- *decryptOffset = 0;
- *decryptLength = buflen;
- return 0;
-}
-
-
-/* KClientErrorText
- * This routine returns a text description of errors returned by any of
- * the calls in this library.
- */
-char *
-KClientErrorText(Kerr err,
- char *text)
-{
- char *t = krb_get_err_text(err);
- if(text)
- strcpy(text, t);
- return t;
-}
diff --git a/crypto/kerberosIV/lib/kclient/KClient.def b/crypto/kerberosIV/lib/kclient/KClient.def
deleted file mode 100644
index 9b55b2c21332..000000000000
--- a/crypto/kerberosIV/lib/kclient/KClient.def
+++ /dev/null
@@ -1,19 +0,0 @@
-LIBRARY kclnt32
-EXPORTS
- KClientInitSession
- KClientGetTicketForService
- KClientLogin
- KClientPasswordLogin
- KClientKeyLogin
- KClientLogout
- KClientStatus
- KClientGetUserName
- KClientSetUserName
- KClientCacheInitialTicket
- KClientGetSessionKey
- KClientMakeSendAuth
- KClientVerifySendAuth
- KClientEncrypt
- KClientDecrypt
- KClientErrorText
- SendTicketForService
diff --git a/crypto/kerberosIV/lib/kclient/KClient.dsp b/crypto/kerberosIV/lib/kclient/KClient.dsp
deleted file mode 100644
index de4dde2af9f7..000000000000
--- a/crypto/kerberosIV/lib/kclient/KClient.dsp
+++ /dev/null
@@ -1,127 +0,0 @@
-# Microsoft Developer Studio Project File - Name="kclient" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=kclient - 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 "KClient.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 "KClient.mak" CFG="kclient - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "kclient - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "kclient - 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)" == "kclient - 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 "..\krb" /I "..\..\include" /I "..\..\include\win32" /I "..\des" /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 ..\krb\Release\krb.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 /base:"0x1320000" /subsystem:windows /dll /machine:I386 /out:".\Release/kclnt32.dll"
-
-!ELSEIF "$(CFG)" == "kclient - 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 "..\krb" /I "..\..\include" /I "..\..\include\win32" /I "..\des" /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 ..\krb\Debug\krb.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 /base:"0x1320000" /subsystem:windows /dll /debug /machine:I386 /out:".\Debug/kclnt32.dll"
-
-!ENDIF
-
-# Begin Target
-
-# Name "kclient - Win32 Release"
-# Name "kclient - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\KClient.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\KClient.def
-# End Source File
-# Begin Source File
-
-SOURCE=.\passwd_dialog.rc
-# End Source File
-# Begin Source File
-
-SOURCE=.\passwd_dlg.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\KClient.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\passwd_dlg.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"
-# End Group
-# End Target
-# End Project
diff --git a/crypto/kerberosIV/lib/kclient/KClient.h b/crypto/kerberosIV/lib/kclient/KClient.h
deleted file mode 100644
index d8916c5fbb1d..000000000000
--- a/crypto/kerberosIV/lib/kclient/KClient.h
+++ /dev/null
@@ -1,160 +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.
- */
-
-/* KClient.h - KClient glue to krb4.dll
- * Author: Jörgen Karlsson - d93-jka@nada.kth.se
- * Date: June 1996
- */
-
-/* $Id: KClient.h,v 1.8 1999/12/02 16:58:40 joda Exp $ */
-
-#ifndef KCLIENT_H
-#define KCLIENT_H
-
-#ifdef MacOS
-#include <Types.h>
-typedef OSerr Kerr;
-#endif /* MacOS */
-
-#ifdef WIN32 /* Visual C++ 4.0 (Windows95/NT) */
-typedef int Kerr;
-#endif /* WIN32 */
-
-enum { KClientLoggedIn, KClientNotLoggedIn };
-
-struct _KClientKey
-{
- unsigned char keyBytes[8];
-};
-typedef struct _KClientKey KClientKey;
-
-struct _KClientSessionInfo
-{
- unsigned long lAddr;
- unsigned short lPort;
- unsigned long fAddr;
- unsigned short fPort;
- char user[32];
- char inst[32];
- char realm[32];
- char key[8];
-};
-typedef struct _KClientSessionInfo KClientSessionInfo;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-Kerr KClientMessage(char *text, Kerr error);
-
-/* KClientInitSession */
-Kerr KClientInitSession(KClientSessionInfo *session,
- unsigned long lAddr,
- unsigned short lPort,
- unsigned long fAddr,
- unsigned short fPort);
-
-/* KClientGetTicketForService */
-Kerr KClientGetTicketForService(KClientSessionInfo *session,
- char *service,
- void *buf,
- unsigned long *buflen);
-
-
-/* KClientLogin */
-Kerr KClientLogin(KClientSessionInfo *session,
- KClientKey *privateKey );
-
-/* KClientPasswordLogin */
-Kerr KClientPasswordLogin(KClientSessionInfo *session,
- char *password,
- KClientKey *privateKey);
-
-/* KClientKeyLogin */
-Kerr KClientKeyLogin(KClientSessionInfo *session, KClientKey *privateKey);
-
-/* KClientLogout */
-Kerr KClientLogout(void);
-
-/* KClientStatus */
-short KClientStatus(KClientSessionInfo *session);
-
-/* KClientGetUserName */
-Kerr KClientGetUserName(char *user);
-
-/* KClientSetUserName */
-Kerr KClientSetUserName(char *user);
-
-/* KClientCacheInitialTicket */
-Kerr KClientCacheInitialTicket(KClientSessionInfo *session,
- char *service);
-
-/* KClientGetSessionKey */
-Kerr KClientGetSessionKey(KClientSessionInfo *session,
- KClientKey *sessionKey);
-
-/* KClientMakeSendAuth */
-Kerr KClientMakeSendAuth(KClientSessionInfo *session,
- char *service,
- void *buf,
- unsigned long *buflen,
- long checksum,
- char *applicationVersion);
-
-/* KClientVerifySendAuth */
-Kerr KClientVerifySendAuth(KClientSessionInfo *session,
- void *buf,
- unsigned long *buflen);
-
-/* KClientEncrypt */
-Kerr KClientEncrypt(KClientSessionInfo *session,
- void *buf,
- unsigned long buflen,
- void *encryptBuf,
- unsigned long *encryptLength);
-
-/* KClientDecrypt */
-Kerr KClientDecrypt(KClientSessionInfo *session,
- void *buf,
- unsigned long buflen,
- unsigned long *decryptOffset,
- unsigned long *decryptLength);
-
-/* KClientErrorText */
-char *KClientErrorText(Kerr err, char *text);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* KCLIENT_H */
diff --git a/crypto/kerberosIV/lib/kclient/KClient.mak b/crypto/kerberosIV/lib/kclient/KClient.mak
deleted file mode 100644
index 40d4ab860398..000000000000
--- a/crypto/kerberosIV/lib/kclient/KClient.mak
+++ /dev/null
@@ -1,297 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Based on KClient.dsp
-!IF "$(CFG)" == ""
-CFG=kclient - Win32 Release
-!MESSAGE No configuration specified. Defaulting to kclient - Win32 Release.
-!ENDIF
-
-!IF "$(CFG)" != "kclient - Win32 Release" && "$(CFG)" !=\
- "kclient - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!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 "KClient.mak" CFG="kclient - Win32 Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "kclient - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "kclient - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-!IF "$(CFG)" == "kclient - Win32 Release"
-
-OUTDIR=.\Release
-INTDIR=.\Release
-# Begin Custom Macros
-OutDir=.\.\Release
-# End Custom Macros
-
-!IF "$(RECURSE)" == "0"
-
-ALL : "$(OUTDIR)\kclnt32.dll"
-
-!ELSE
-
-ALL : "krb - Win32 Release" "$(OUTDIR)\kclnt32.dll"
-
-!ENDIF
-
-!IF "$(RECURSE)" == "1"
-CLEAN :"krb - Win32 ReleaseCLEAN"
-!ELSE
-CLEAN :
-!ENDIF
- -@erase "$(INTDIR)\KClient.obj"
- -@erase "$(INTDIR)\passwd_dialog.res"
- -@erase "$(INTDIR)\passwd_dlg.obj"
- -@erase "$(INTDIR)\vc50.idb"
- -@erase "$(OUTDIR)\kclnt32.dll"
- -@erase "$(OUTDIR)\kclnt32.exp"
- -@erase "$(OUTDIR)\kclnt32.lib"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP=cl.exe
-CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "." /I "..\krb" /I "..\..\include" /I\
- "..\..\include\win32" /I "..\des" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D\
- "HAVE_CONFIG_H" /Fp"$(INTDIR)\KClient.pch" /YX /Fo"$(INTDIR)\\"\
- /Fd"$(INTDIR)\\" /FD /c
-CPP_OBJS=.\Release/
-CPP_SBRS=.
-
-.c{$(CPP_OBJS)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(CPP_OBJS)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(CPP_OBJS)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(CPP_SBRS)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(CPP_SBRS)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(CPP_SBRS)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-MTL=midl.exe
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-RSC_PROJ=/l 0x409 /fo"$(INTDIR)\passwd_dialog.res" /d "NDEBUG"
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\KClient.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=..\krb\Release\krb.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 /base:"0x1320000"\
- /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\kclnt32.pdb"\
- /machine:I386 /def:".\KClient.def" /out:"$(OUTDIR)\kclnt32.dll"\
- /implib:"$(OUTDIR)\kclnt32.lib"
-DEF_FILE= \
- ".\KClient.def"
-LINK32_OBJS= \
- "$(INTDIR)\KClient.obj" \
- "$(INTDIR)\passwd_dialog.res" \
- "$(INTDIR)\passwd_dlg.obj" \
- "..\krb\Release\krb.lib"
-
-"$(OUTDIR)\kclnt32.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "kclient - Win32 Debug"
-
-OUTDIR=.\Debug
-INTDIR=.\Debug
-# Begin Custom Macros
-OutDir=.\.\Debug
-# End Custom Macros
-
-!IF "$(RECURSE)" == "0"
-
-ALL : "$(OUTDIR)\kclnt32.dll"
-
-!ELSE
-
-ALL : "krb - Win32 Debug" "$(OUTDIR)\kclnt32.dll"
-
-!ENDIF
-
-!IF "$(RECURSE)" == "1"
-CLEAN :"krb - Win32 DebugCLEAN"
-!ELSE
-CLEAN :
-!ENDIF
- -@erase "$(INTDIR)\KClient.obj"
- -@erase "$(INTDIR)\passwd_dialog.res"
- -@erase "$(INTDIR)\passwd_dlg.obj"
- -@erase "$(INTDIR)\vc50.idb"
- -@erase "$(INTDIR)\vc50.pdb"
- -@erase "$(OUTDIR)\kclnt32.dll"
- -@erase "$(OUTDIR)\kclnt32.exp"
- -@erase "$(OUTDIR)\kclnt32.ilk"
- -@erase "$(OUTDIR)\kclnt32.lib"
- -@erase "$(OUTDIR)\kclnt32.pdb"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP=cl.exe
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I "..\krb" /I "..\..\include"\
- /I "..\..\include\win32" /I "..\des" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D\
- "HAVE_CONFIG_H" /Fp"$(INTDIR)\KClient.pch" /YX /Fo"$(INTDIR)\\"\
- /Fd"$(INTDIR)\\" /FD /c
-CPP_OBJS=.\Debug/
-CPP_SBRS=.
-
-.c{$(CPP_OBJS)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(CPP_OBJS)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(CPP_OBJS)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(CPP_SBRS)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(CPP_SBRS)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(CPP_SBRS)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-MTL=midl.exe
-MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-RSC_PROJ=/l 0x409 /fo"$(INTDIR)\passwd_dialog.res" /d "_DEBUG"
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\KClient.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=..\krb\Debug\krb.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 /base:"0x1320000" /subsystem:windows\
- /dll /incremental:yes /pdb:"$(OUTDIR)\kclnt32.pdb" /debug /machine:I386\
- /def:".\KClient.def" /out:"$(OUTDIR)\kclnt32.dll"\
- /implib:"$(OUTDIR)\kclnt32.lib"
-DEF_FILE= \
- ".\KClient.def"
-LINK32_OBJS= \
- "$(INTDIR)\KClient.obj" \
- "$(INTDIR)\passwd_dialog.res" \
- "$(INTDIR)\passwd_dlg.obj" \
- "..\krb\Debug\krb.lib"
-
-"$(OUTDIR)\kclnt32.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF
-
-
-!IF "$(CFG)" == "kclient - Win32 Release" || "$(CFG)" ==\
- "kclient - Win32 Debug"
-SOURCE=.\KClient.c
-DEP_CPP_KCLIE=\
- "..\..\include\win32\config.h"\
- "..\..\include\win32\ktypes.h"\
- "..\des\des.h"\
- "..\krb\krb-protos.h"\
- "..\krb\krb.h"\
- ".\KClient.h"\
- ".\passwd_dlg.h"\
-
-
-"$(INTDIR)\KClient.obj" : $(SOURCE) $(DEP_CPP_KCLIE) "$(INTDIR)"
-
-
-SOURCE=.\passwd_dialog.rc
-
-"$(INTDIR)\passwd_dialog.res" : $(SOURCE) "$(INTDIR)"
- $(RSC) $(RSC_PROJ) $(SOURCE)
-
-
-SOURCE=.\passwd_dlg.c
-DEP_CPP_PASSW=\
- "..\..\include\win32\config.h"\
- ".\passwd_dlg.h"\
-
-
-"$(INTDIR)\passwd_dlg.obj" : $(SOURCE) $(DEP_CPP_PASSW) "$(INTDIR)"
-
-
-!IF "$(CFG)" == "kclient - Win32 Release"
-
-"krb - Win32 Release" :
- cd "\tmp\wirus-krb\krb4-pre-0.9.9\lib\krb"
- $(MAKE) /$(MAKEFLAGS) /F ".\krb.mak" CFG="krb - Win32 Release"
- cd "..\kclient"
-
-"krb - Win32 ReleaseCLEAN" :
- cd "\tmp\wirus-krb\krb4-pre-0.9.9\lib\krb"
- $(MAKE) /$(MAKEFLAGS) CLEAN /F ".\krb.mak" CFG="krb - Win32 Release"\
- RECURSE=1
- cd "..\kclient"
-
-!ELSEIF "$(CFG)" == "kclient - Win32 Debug"
-
-"krb - Win32 Debug" :
- cd "\tmp\wirus-krb\krb4-pre-0.9.9\lib\krb"
- $(MAKE) /$(MAKEFLAGS) /F ".\krb.mak" CFG="krb - Win32 Debug"
- cd "..\kclient"
-
-"krb - Win32 DebugCLEAN" :
- cd "\tmp\wirus-krb\krb4-pre-0.9.9\lib\krb"
- $(MAKE) /$(MAKEFLAGS) CLEAN /F ".\krb.mak" CFG="krb - Win32 Debug" RECURSE=1\
-
- cd "..\kclient"
-
-!ENDIF
-
-
-!ENDIF
-
diff --git a/crypto/kerberosIV/lib/kclient/passwd_dialog.rc b/crypto/kerberosIV/lib/kclient/passwd_dialog.rc
deleted file mode 100644
index 6478e5f24e62..000000000000
--- a/crypto/kerberosIV/lib/kclient/passwd_dialog.rc
+++ /dev/null
@@ -1,143 +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
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 95
-STYLE DS_ABSALIGN | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION
-CAPTION "User data"
-FONT 8, "MS Sans Serif"
-BEGIN
- EDITTEXT IDC_EDIT1,71,19,40,14,ES_AUTOHSCROLL
- EDITTEXT IDC_EDIT2,71,36,40,14,ES_PASSWORD | ES_AUTOHSCROLL
- DEFPUSHBUTTON "OK",IDOK,31,74,50,14
- PUSHBUTTON "Cancel",IDCANCEL,105,74,50,14
- LTEXT "User name:",IDC_STATIC,27,23,37,8,NOT WS_GROUP
- LTEXT "Password:",IDC_STATIC,27,39,34,8,NOT WS_GROUP
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
-BEGIN
- IDD_DIALOG1, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 179
- TOPMARGIN, 7
- BOTTOMMARGIN, 88
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-#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", "kclient\0"
- VALUE "FileVersion", "4, 0, 9, 9\0"
- VALUE "InternalName", "kclient\0"
- VALUE "LegalCopyright", "Copyright © 1996 - 1998 Royal Institute of Technology (KTH)\0"
- VALUE "OriginalFilename", "kclnt32.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
-
diff --git a/crypto/kerberosIV/lib/kclient/passwd_dlg.c b/crypto/kerberosIV/lib/kclient/passwd_dlg.c
deleted file mode 100644
index fb2f46803dec..000000000000
--- a/crypto/kerberosIV/lib/kclient/passwd_dlg.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 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. 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.
- */
-
-/* passwd_dlg.c - Dialog boxes for Windows95/NT
- * Author: Jörgen Karlsson - d93-jka@nada.kth.se
- * Date: June 1996
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: passwd_dlg.c,v 1.11 1999/12/02 16:58:40 joda Exp $");
-#endif
-
-#ifdef WIN32 /* Visual C++ 4.0 (Windows95/NT) */
-#include <Windows.h>
-#include "passwd_dlg.h"
-#include "Resource.h"
-#define passwdBufSZ 64
-#define usr_nameSZ 64
-
-static char user_name[usr_nameSZ];
-static char passwd[passwdBufSZ];
-
-BOOL CALLBACK
-pwd_dialog_proc(HWND hwndDlg,
- UINT uMsg,
- WPARAM wParam,
- LPARAM lParam)
-{
- switch(uMsg)
- {
- case WM_INITDIALOG:
- SetDlgItemText(hwndDlg, IDC_EDIT1, user_name);
- return TRUE;
- break;
-
- case WM_COMMAND:
- switch(wParam)
- {
- case IDOK:
- if(!GetDlgItemText(hwndDlg,IDC_EDIT1, user_name, usr_nameSZ))
- EndDialog(hwndDlg, IDCANCEL);
- if(!GetDlgItemText(hwndDlg,IDC_EDIT2, passwd, passwdBufSZ))
- EndDialog(hwndDlg, IDCANCEL);
- case IDCANCEL:
- EndDialog(hwndDlg, wParam);
- return TRUE;
- }
- break;
- }
- return FALSE;
-}
-
-
-/* return 0 if ok, 1 otherwise */
-int
-pwd_dialog(char *user, size_t user_sz,
- char *password, size_t password_sz)
-{
- int i;
- HWND wnd = GetActiveWindow();
- HANDLE hInst = GetModuleHandle("kclnt32");
-
- strlcpy(user_name, user, sizeof(user_name));
- switch(DialogBox(hInst,MAKEINTRESOURCE(IDD_DIALOG1),wnd,pwd_dialog_proc))
- {
- case IDOK:
- strlcpy(user, user_name, user_sz);
- strlcpy(password, passwd, password_sz);
- memset (passwd, 0, sizeof(passwd));
- return 0;
- case IDCANCEL:
- default:
- memset (passwd, 0, sizeof(passwd));
- return 1;
- }
-}
-
-#endif /* WIN32 */
diff --git a/crypto/kerberosIV/lib/kclient/passwd_dlg.h b/crypto/kerberosIV/lib/kclient/passwd_dlg.h
deleted file mode 100644
index 543a560ca971..000000000000
--- a/crypto/kerberosIV/lib/kclient/passwd_dlg.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 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. 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.
- */
-
-/* passwd_dlg.h - Dialog boxes for Windows95/NT
- * Author: Jörgen Karlsson - d93-jka@nada.kth.se
- * Date: June 1996
- */
-
-/* $Id: passwd_dlg.h,v 1.7 1999/12/02 16:58:40 joda Exp $ */
-
-#ifndef PASSWD_DLG_H
-#define PASSWD_DLG_H
-
-int pwd_dialog(char *user, size_t user_sz,
- char *password, size_t password_sz);
-
-#endif /* PASSWD_DLG_H */
diff --git a/crypto/kerberosIV/lib/kclient/resource.h b/crypto/kerberosIV/lib/kclient/resource.h
deleted file mode 100644
index 76a6eb5e3e9c..000000000000
--- a/crypto/kerberosIV/lib/kclient/resource.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by passwd_dialog.rc
-//
-#define IDD_DIALOG1 101
-#define IDC_EDIT1 1000
-#define IDC_EDIT2 1001
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 103
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1002
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/crypto/kerberosIV/lib/krb/defaults.c b/crypto/kerberosIV/lib/krb/defaults.c
deleted file mode 100644
index e4fe027f9a04..000000000000
--- a/crypto/kerberosIV/lib/krb/defaults.c
+++ /dev/null
@@ -1,58 +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 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 "krb_locl.h"
-
-RCSID("$Id: defaults.c,v 1.3 1999/12/02 16:58:41 joda Exp $");
-
-const
-char *
-krb_get_default_tkt_root(void)
-{
- const char *t = krb_get_config_string("krb_default_tkt_root");
- if (t)
- return t;
- else
- return "/tmp/tkt";
-}
-
-const
-char *
-krb_get_default_keyfile(void)
-{
- const char *t = krb_get_config_string("krb_default_keyfile");
- if (t)
- return t;
- else
- return "/etc/srvtab";
-}
diff --git a/crypto/kerberosIV/lib/krb/extra.c b/crypto/kerberosIV/lib/krb/extra.c
deleted file mode 100644
index c90767e87a68..000000000000
--- a/crypto/kerberosIV/lib/krb/extra.c
+++ /dev/null
@@ -1,202 +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. 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 "krb_locl.h"
-
-RCSID("$Id: extra.c,v 1.7 1999/12/02 16:58:41 joda Exp $");
-
-struct value {
- char *variable;
- char *value;
- struct value *next;
-};
-
-static struct value *_extra_values;
-
-static int _krb_extra_read = 0;
-
-static int
-define_variable(const char *variable, const char *value)
-{
- struct value *e;
- e = malloc(sizeof(*e));
- if(e == NULL)
- return ENOMEM;
- e->variable = strdup(variable);
- if(e->variable == NULL) {
- free(e);
- return ENOMEM;
- }
- e->value = strdup(value);
- if(e->value == NULL) {
- free(e->variable);
- free(e);
- return ENOMEM;
- }
- e->next = _extra_values;
- _extra_values = e;
- return 0;
-}
-
-#ifndef WIN32
-
-struct obsolete {
- const char *from;
- const char *to;
-} obsolete [] = {
- { "KDC_TIMESYNC", "kdc_timesync" },
- { "KRB_REVERSE_DIRECTION", "reverse_lsb_test"},
- { "krb4_proxy", "krb4_proxy"},
- { NULL, NULL }
-};
-
-static void
-check_obsolete(void)
-{
- struct obsolete *r;
- for(r = obsolete; r->from; r++) {
- if(getenv(r->from)) {
- krb_warning("The environment variable `%s' is obsolete;\n"
- "set `%s' in your `krb.extra' file instead\n",
- r->from, r->to);
- define_variable(r->to, getenv(r->from));
- }
- }
-}
-
-static int
-read_extra_file(void)
-{
- int i = 0;
- char file[128];
- char line[1024];
- if(_krb_extra_read)
- return 0;
- _krb_extra_read = 1;
- check_obsolete();
- while(krb_get_krbextra(i++, file, sizeof(file)) == 0) {
- FILE *f = fopen(file, "r");
- if(f == NULL)
- continue;
- while(fgets(line, sizeof(line), f)) {
- char *var, *tmp, *val;
-
- /* skip initial whitespace */
- var = line + strspn(line, " \t");
- /* skip non-whitespace */
- tmp = var + strcspn(var, " \t=");
- /* skip whitespace */
- val = tmp + strspn(tmp, " \t=");
- *tmp = '\0';
- tmp = val + strcspn(val, " \t\n");
- *tmp = '\0';
- if(*var == '\0' || *var == '#' || *val == '\0')
- continue;
- if(krb_debug)
- krb_warning("%s: setting `%s' to `%s'\n", file, var, val);
- define_variable(var, val);
- }
- fclose(f);
- return 0;
- }
- return ENOENT;
-}
-
-#else /* WIN32 */
-
-static int
-read_extra_file(void)
-{
- char name[1024], data[1024];
- DWORD name_sz, data_sz;
- DWORD type;
- int num = 0;
- HKEY reg_key;
-
- if(_krb_extra_read)
- return 0;
- _krb_extra_read = 1;
-
- if(RegCreateKey(HKEY_CURRENT_USER, "krb4", &reg_key) != 0)
- return -1;
-
-
- while(1) {
- name_sz = sizeof(name);
- data_sz = sizeof(data);
- if(RegEnumValue(reg_key,
- num++,
- name,
- &name_sz,
- NULL,
- &type,
- data,
- &data_sz) != 0)
- break;
- if(type == REG_SZ)
- define_variable(name, data);
- }
- RegCloseKey(reg_key);
- return 0;
-}
-
-#endif
-
-static const char*
-find_variable(const char *variable)
-{
- struct value *e;
- for(e = _extra_values; e; e = e->next) {
- if(strcasecmp(variable, e->variable) == 0)
- return e->value;
- }
- return NULL;
-}
-
-const char *
-krb_get_config_string(const char *variable)
-{
- read_extra_file();
- return find_variable(variable);
-}
-
-int
-krb_get_config_bool(const char *variable)
-{
- const char *value = krb_get_config_string(variable);
- if(value == NULL)
- return 0;
- return strcasecmp(value, "yes") == 0 ||
- strcasecmp(value, "true") == 0 ||
- atoi(value);
-}
diff --git a/crypto/kerberosIV/lib/krb/getfile.c b/crypto/kerberosIV/lib/krb/getfile.c
deleted file mode 100644
index 99d0c3f5502b..000000000000
--- a/crypto/kerberosIV/lib/krb/getfile.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 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. 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 "krb_locl.h"
-
-RCSID("$Id: getfile.c,v 1.5 1999/12/02 16:58:42 joda Exp $");
-
-static int
-is_suid(void)
-{
- int ret = 0;
-#ifdef HAVE_GETUID
- ret |= getuid() != geteuid();
-#endif
-#ifdef HAVE_GETGID
- ret |= getgid() != getegid();
-#endif
- return ret;
-}
-
-static int
-get_file(const char **files, int num, const char *file, char *buf, size_t len)
-{
- const char *p, **q;
- int i = 0;
- if(!is_suid() && (p = getenv("KRBCONFDIR"))){
- if(num == i){
- snprintf(buf, len, "%s/%s", p, file);
- return 0;
- }
- i++;
- }
- for(q = files; *q; q++, i++){
- if(num == i){
- snprintf(buf, len, "%s", *q);
- return 0;
- }
- }
- return -1;
-}
-
-int
-krb_get_krbconf(int num, char *buf, size_t len)
-{
- const char *files[] = KRB_CNF_FILES;
- return get_file(files, num, "krb.conf", buf, len);
-}
-
-int
-krb_get_krbrealms(int num, char *buf, size_t len)
-{
- const char *files[] = KRB_RLM_FILES;
- return get_file(files, num, "krb.realms", buf, len);
-}
-
-int
-krb_get_krbextra(int num, char *buf, size_t len)
-{
- const char *files[] = { "/etc/krb.extra", NULL };
- return get_file(files, num, "krb.extra", buf, len);
-}
diff --git a/crypto/kerberosIV/lib/krb/krb-archaeology.h b/crypto/kerberosIV/lib/krb/krb-archaeology.h
deleted file mode 100644
index 0757996eeb37..000000000000
--- a/crypto/kerberosIV/lib/krb/krb-archaeology.h
+++ /dev/null
@@ -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__ */
diff --git a/crypto/kerberosIV/lib/krb/krb-protos.h b/crypto/kerberosIV/lib/krb/krb-protos.h
deleted file mode 100644
index bb385d64a4d9..000000000000
--- a/crypto/kerberosIV/lib/krb/krb-protos.h
+++ /dev/null
@@ -1,789 +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.
- */
-
-/* $Id: krb-protos.h,v 1.24 1999/12/02 16:58:42 joda Exp $ */
-
-#ifndef __krb_protos_h__
-#define __krb_protos_h__
-
-#if defined (__STDC__) || defined (_MSC_VER)
-#include <stdarg.h>
-#ifndef __P
-#define __P(x) x
-#endif
-#else
-#ifndef __P
-#define __P(x) ()
-#endif
-#endif
-
-#ifdef __STDC__
-struct in_addr;
-struct sockaddr_in;
-struct timeval;
-#endif
-
-#ifndef KRB_LIB_FUNCTION
-#if defined(__BORLANDC__)
-#define KRB_LIB_FUNCTION /* not-ready-definition-yet */
-#elif defined(_MSC_VER)
-#define KRB_LIB_FUNCTION /* not-ready-definition-yet2 */
-#else
-#define KRB_LIB_FUNCTION
-#endif
-#endif
-
-void KRB_LIB_FUNCTION
-afs_string_to_key __P((
- const char *str,
- const char *cell,
- des_cblock *key));
-
-int KRB_LIB_FUNCTION
-create_ciph __P((
- KTEXT c,
- unsigned char *session,
- char *service,
- char *instance,
- char *realm,
- u_int32_t life,
- int kvno,
- KTEXT tkt,
- u_int32_t kdc_time,
- des_cblock *key));
-
-int KRB_LIB_FUNCTION
-cr_err_reply __P((
- KTEXT pkt,
- char *pname,
- char *pinst,
- char *prealm,
- u_int32_t time_ws,
- u_int32_t e,
- char *e_string));
-
-int KRB_LIB_FUNCTION
-decomp_ticket __P((
- KTEXT tkt,
- unsigned char *flags,
- char *pname,
- char *pinstance,
- char *prealm,
- u_int32_t *paddress,
- unsigned char *session,
- int *life,
- u_int32_t *time_sec,
- char *sname,
- char *sinstance,
- des_cblock *key,
- des_key_schedule schedule));
-
-int KRB_LIB_FUNCTION
-dest_tkt __P((void));
-
-int KRB_LIB_FUNCTION
-get_ad_tkt __P((
- char *service,
- char *sinstance,
- char *realm,
- int lifetime));
-
-int KRB_LIB_FUNCTION
-getst __P((
- int fd,
- char *s,
- int n));
-
-int KRB_LIB_FUNCTION
-in_tkt __P((
- char *pname,
- char *pinst));
-
-int KRB_LIB_FUNCTION
-k_get_all_addrs __P((struct in_addr **l));
-
-int KRB_LIB_FUNCTION
-k_gethostname __P((
- char *name,
- int namelen));
-
-int KRB_LIB_FUNCTION
-k_getportbyname __P((
- const char *service,
- const char *proto,
- int default_port));
-
-int KRB_LIB_FUNCTION
-k_getsockinst __P((
- int fd,
- char *inst,
- size_t inst_size));
-
-int KRB_LIB_FUNCTION
-k_isinst __P((char *s));
-
-int KRB_LIB_FUNCTION
-k_isname __P((char *s));
-
-int KRB_LIB_FUNCTION
-k_isrealm __P((char *s));
-
-struct tm * KRB_LIB_FUNCTION
-k_localtime __P((u_int32_t *tp));
-
-int KRB_LIB_FUNCTION
-kname_parse __P((
- char *np,
- char *ip,
- char *rp,
- char *fullname));
-
-int KRB_LIB_FUNCTION
-krb_atime_to_life __P((char *atime));
-
-int KRB_LIB_FUNCTION
-krb_check_auth __P((
- KTEXT packet,
- u_int32_t checksum,
- MSG_DAT *msg_data,
- des_cblock *session,
- struct des_ks_struct *schedule,
- struct sockaddr_in *laddr,
- struct sockaddr_in *faddr));
-
-int KRB_LIB_FUNCTION
-krb_check_tm __P((struct tm tm));
-
-KTEXT KRB_LIB_FUNCTION
-krb_create_death_packet __P((char *a_name));
-
-int KRB_LIB_FUNCTION
-krb_create_ticket __P((
- KTEXT tkt,
- unsigned char flags,
- char *pname,
- char *pinstance,
- char *prealm,
- int32_t paddress,
- void *session,
- int16_t life,
- int32_t time_sec,
- char *sname,
- char *sinstance,
- des_cblock *key));
-
-int KRB_LIB_FUNCTION
-krb_decode_as_rep __P((
- const char *user,
- char *instance, /* INOUT parameter */
- const char *realm,
- const char *service,
- const char *sinstance,
- key_proc_t key_proc,
- decrypt_proc_t decrypt_proc,
- const void *arg,
- KTEXT as_rep,
- CREDENTIALS *cred));
-
-int KRB_LIB_FUNCTION
-krb_disable_debug __P((void));
-
-int KRB_LIB_FUNCTION
-krb_enable_debug __P((void));
-
-int KRB_LIB_FUNCTION
-krb_equiv __P((
- u_int32_t a,
- u_int32_t b));
-
-int KRB_LIB_FUNCTION
-krb_get_address __P((
- void *from,
- u_int32_t *to));
-
-int KRB_LIB_FUNCTION
-krb_get_admhst __P((
- char *host,
- char *realm,
- int nth));
-
-int KRB_LIB_FUNCTION
-krb_get_config_bool __P((const char *variable));
-
-const char * KRB_LIB_FUNCTION
-krb_get_config_string __P((const char *variable));
-
-int KRB_LIB_FUNCTION
-krb_get_cred __P((
- char *service,
- char *instance,
- char *realm,
- CREDENTIALS *c));
-
-int KRB_LIB_FUNCTION
-krb_get_default_principal __P((
- char *name,
- char *instance,
- char *realm));
-
-char * KRB_LIB_FUNCTION
-krb_get_default_realm __P((void));
-
-const char * KRB_LIB_FUNCTION
-krb_get_default_tkt_root __P((void));
-
-const char * KRB_LIB_FUNCTION
-krb_get_default_keyfile __P((void));
-
-const char * KRB_LIB_FUNCTION
-krb_get_err_text __P((int code));
-
-struct krb_host* KRB_LIB_FUNCTION
-krb_get_host __P((
- int nth,
- const char *realm,
- int admin));
-
-int KRB_LIB_FUNCTION
-krb_get_in_tkt __P((
- char *user,
- char *instance,
- char *realm,
- char *service,
- char *sinstance,
- int life,
- key_proc_t key_proc,
- decrypt_proc_t decrypt_proc,
- void *arg));
-
-int KRB_LIB_FUNCTION
-krb_get_int __P((
- void *f,
- u_int32_t *to,
- int size,
- int lsb));
-
-int KRB_LIB_FUNCTION
-krb_get_kdc_time_diff __P((void));
-
-int KRB_LIB_FUNCTION
-krb_get_krbconf __P((
- int num,
- char *buf,
- size_t len));
-
-int KRB_LIB_FUNCTION
-krb_get_krbextra __P((
- int num,
- char *buf,
- size_t len));
-
-int KRB_LIB_FUNCTION
-krb_get_krbhst __P((
- char *host,
- char *realm,
- int nth));
-
-int KRB_LIB_FUNCTION
-krb_get_krbrealms __P((
- int num,
- char *buf,
- size_t len));
-
-int KRB_LIB_FUNCTION
-krb_get_lrealm __P((
- char *r,
- int n));
-
-int KRB_LIB_FUNCTION
-krb_get_nir __P((
- void *from,
- char *name,
- char *instance,
- char *realm));
-
-char * KRB_LIB_FUNCTION
-krb_get_phost __P((const char *alias));
-
-int KRB_LIB_FUNCTION
-krb_get_pw_in_tkt __P((
- const char *user,
- const char *instance,
- const char *realm,
- const char *service,
- const char *sinstance,
- int life,
- const char *password));
-
-int KRB_LIB_FUNCTION
-krb_get_pw_in_tkt2 __P((
- const char *user,
- const char *instance,
- const char *realm,
- const char *service,
- const char *sinstance,
- int life,
- const char *password,
- des_cblock *key));
-
-int KRB_LIB_FUNCTION
-krb_get_string __P((
- void *from,
- char *to,
- size_t to_size));
-
-int KRB_LIB_FUNCTION
-krb_get_svc_in_tkt __P((
- char *user,
- char *instance,
- char *realm,
- char *service,
- char *sinstance,
- int life,
- char *srvtab));
-
-int KRB_LIB_FUNCTION
-krb_get_tf_fullname __P((
- char *ticket_file,
- char *name,
- char *instance,
- char *realm));
-
-int KRB_LIB_FUNCTION
-krb_get_tf_realm __P((
- char *ticket_file,
- char *realm));
-
-void KRB_LIB_FUNCTION
-krb_kdctimeofday __P((struct timeval *tv));
-
-int KRB_LIB_FUNCTION
-krb_kntoln __P((
- AUTH_DAT *ad,
- char *lname));
-
-int KRB_LIB_FUNCTION
-krb_kuserok __P((
- char *name,
- char *instance,
- char *realm,
- char *luser));
-
-char * KRB_LIB_FUNCTION
-krb_life_to_atime __P((int life));
-
-u_int32_t KRB_LIB_FUNCTION
-krb_life_to_time __P((
- u_int32_t start,
- int life_));
-
-int KRB_LIB_FUNCTION
-krb_lsb_antinet_ulong_cmp __P((
- u_int32_t x,
- u_int32_t y));
-
-int KRB_LIB_FUNCTION
-krb_lsb_antinet_ushort_cmp __P((
- u_int16_t x,
- u_int16_t y));
-
-int KRB_LIB_FUNCTION
-krb_mk_as_req __P((
- const char *user,
- const char *instance,
- const char *realm,
- const char *service,
- const char *sinstance,
- int life,
- KTEXT cip));
-
-int KRB_LIB_FUNCTION
-krb_mk_auth __P((
- int32_t options,
- KTEXT ticket,
- char *service,
- char *instance,
- char *realm,
- u_int32_t checksum,
- char *version,
- KTEXT buf));
-
-int32_t KRB_LIB_FUNCTION
-krb_mk_err __P((
- u_char *p,
- int32_t e,
- char *e_string));
-
-int32_t KRB_LIB_FUNCTION
-krb_mk_priv __P((
- void *in,
- void *out,
- u_int32_t length,
- struct des_ks_struct *schedule,
- des_cblock *key,
- struct sockaddr_in *sender,
- struct sockaddr_in *receiver));
-
-int KRB_LIB_FUNCTION
-krb_mk_req __P((
- KTEXT authent,
- char *service,
- char *instance,
- char *realm,
- int32_t checksum));
-
-int32_t KRB_LIB_FUNCTION
-krb_mk_safe __P((
- void *in,
- void *out,
- u_int32_t length,
- des_cblock *key,
- struct sockaddr_in *sender,
- struct sockaddr_in *receiver));
-
-int KRB_LIB_FUNCTION
-krb_net_read __P((
- int fd,
- void *v,
- size_t len));
-
-int KRB_LIB_FUNCTION
-krb_net_write __P((
- int fd,
- const void *v,
- size_t len));
-
-int KRB_LIB_FUNCTION
-krb_parse_name __P((
- const char *fullname,
- krb_principal *principal));
-
-int KRB_LIB_FUNCTION
-krb_put_address __P((
- u_int32_t addr,
- void *to,
- size_t rem));
-
-int KRB_LIB_FUNCTION
-krb_put_int __P((
- u_int32_t from,
- void *to,
- size_t rem,
- int size));
-
-int KRB_LIB_FUNCTION
-krb_put_nir __P((
- const char *name,
- const char *instance,
- const char *realm,
- void *to,
- size_t rem));
-
-int KRB_LIB_FUNCTION
-krb_put_string __P((
- const char *from,
- void *to,
- size_t rem));
-
-int KRB_LIB_FUNCTION
-krb_rd_err __P((
- u_char *in,
- u_int32_t in_length,
- int32_t *code,
- MSG_DAT *m_data));
-
-int32_t KRB_LIB_FUNCTION
-krb_rd_priv __P((
- void *in,
- u_int32_t in_length,
- struct des_ks_struct *schedule,
- des_cblock *key,
- struct sockaddr_in *sender,
- struct sockaddr_in *receiver,
- MSG_DAT *m_data));
-
-int KRB_LIB_FUNCTION
-krb_rd_req __P((
- KTEXT authent,
- char *service,
- char *instance,
- int32_t from_addr,
- AUTH_DAT *ad,
- char *fn));
-
-int32_t KRB_LIB_FUNCTION
-krb_rd_safe __P((
- void *in,
- u_int32_t in_length,
- des_cblock *key,
- struct sockaddr_in *sender,
- struct sockaddr_in *receiver,
- MSG_DAT *m_data));
-
-int KRB_LIB_FUNCTION
-krb_realm_parse __P((
- char *realm,
- int length));
-
-char * KRB_LIB_FUNCTION
-krb_realmofhost __P((const char *host));
-
-int KRB_LIB_FUNCTION
-krb_recvauth __P((
- int32_t options,
- int fd,
- KTEXT ticket,
- char *service,
- char *instance,
- struct sockaddr_in *faddr,
- struct sockaddr_in *laddr,
- AUTH_DAT *kdata,
- char *filename,
- struct des_ks_struct *schedule,
- char *version));
-
-int KRB_LIB_FUNCTION
-krb_sendauth __P((
- int32_t options,
- int fd,
- KTEXT ticket,
- char *service,
- char *instance,
- char *realm,
- u_int32_t checksum,
- MSG_DAT *msg_data,
- CREDENTIALS *cred,
- struct des_ks_struct *schedule,
- struct sockaddr_in *laddr,
- struct sockaddr_in *faddr,
- char *version));
-
-void KRB_LIB_FUNCTION
-krb_set_kdc_time_diff __P((int diff));
-
-int KRB_LIB_FUNCTION
-krb_set_key __P((
- void *key,
- int cvt));
-
-int KRB_LIB_FUNCTION
-krb_set_lifetime __P((int newval));
-
-void KRB_LIB_FUNCTION
-krb_set_tkt_string __P((const char *val));
-
-const char * KRB_LIB_FUNCTION
-krb_stime __P((time_t *t));
-
-int KRB_LIB_FUNCTION
-krb_time_to_life __P((
- u_int32_t start,
- u_int32_t end));
-
-char * KRB_LIB_FUNCTION
-krb_unparse_name __P((krb_principal *pr));
-
-char * KRB_LIB_FUNCTION
-krb_unparse_name_long __P((
- char *name,
- char *instance,
- char *realm));
-
-char * KRB_LIB_FUNCTION
-krb_unparse_name_long_r __P((
- char *name,
- char *instance,
- char *realm,
- char *fullname));
-
-char * KRB_LIB_FUNCTION
-krb_unparse_name_r __P((
- krb_principal *pr,
- char *fullname));
-
-int KRB_LIB_FUNCTION
-krb_use_admin_server __P((int flag));
-
-int KRB_LIB_FUNCTION
-krb_verify_user __P((
- char *name,
- char *instance,
- char *realm,
- char *password,
- int secure,
- char *linstance));
-
-int KRB_LIB_FUNCTION
-krb_verify_user_srvtab __P((
- char *name,
- char *instance,
- char *realm,
- char *password,
- int secure,
- char *linstance,
- char *srvtab));
-
-int KRB_LIB_FUNCTION
-kuserok __P((
- AUTH_DAT *auth,
- char *luser));
-
-u_int32_t KRB_LIB_FUNCTION
-lsb_time __P((
- time_t t,
- struct sockaddr_in *src,
- struct sockaddr_in *dst));
-
-const char * KRB_LIB_FUNCTION
-month_sname __P((int n));
-
-int KRB_LIB_FUNCTION
-passwd_to_5key __P((
- const char *user,
- const char *instance,
- const char *realm,
- const void *passwd,
- des_cblock *key));
-
-int KRB_LIB_FUNCTION
-passwd_to_afskey __P((
- const char *user,
- const char *instance,
- const char *realm,
- const void *passwd,
- des_cblock *key));
-
-int KRB_LIB_FUNCTION
-passwd_to_key __P((
- const char *user,
- const char *instance,
- const char *realm,
- const void *passwd,
- des_cblock *key));
-
-int KRB_LIB_FUNCTION
-read_service_key __P((
- const char *service,
- char *instance,
- const char *realm,
- int kvno,
- const char *file,
- void *key));
-
-int KRB_LIB_FUNCTION
-save_credentials __P((
- char *service,
- char *instance,
- char *realm,
- unsigned char *session,
- int lifetime,
- int kvno,
- KTEXT ticket,
- int32_t issue_date));
-
-int KRB_LIB_FUNCTION
-send_to_kdc __P((
- KTEXT pkt,
- KTEXT rpkt,
- const char *realm));
-
-int KRB_LIB_FUNCTION
-srvtab_to_key __P((
- const char *user,
- char *instance, /* INOUT parameter */
- const char *realm,
- const void *srvtab,
- des_cblock *key));
-
-void KRB_LIB_FUNCTION
-tf_close __P((void));
-
-int KRB_LIB_FUNCTION
-tf_create __P((char *tf_name));
-
-int KRB_LIB_FUNCTION
-tf_get_cred __P((CREDENTIALS *c));
-
-int KRB_LIB_FUNCTION
-tf_get_cred_addr __P((char *realm, size_t realm_sz, struct in_addr *addr));
-
-int KRB_LIB_FUNCTION
-tf_get_pinst __P((char *inst));
-
-int KRB_LIB_FUNCTION
-tf_get_pname __P((char *p));
-
-int KRB_LIB_FUNCTION
-tf_init __P((
- char *tf_name,
- int rw));
-
-int KRB_LIB_FUNCTION
-tf_put_pinst __P((const char *inst));
-
-int KRB_LIB_FUNCTION
-tf_put_pname __P((const char *p));
-
-int KRB_LIB_FUNCTION
-tf_save_cred __P((
- char *service,
- char *instance,
- char *realm,
- unsigned char *session,
- int lifetime,
- int kvno,
- KTEXT ticket,
- u_int32_t issue_date));
-
-int KRB_LIB_FUNCTION
-tf_setup __P((
- CREDENTIALS *cred,
- const char *pname,
- const char *pinst));
-
-int KRB_LIB_FUNCTION
-tf_get_addr __P((
- const char *realm,
- struct in_addr *addr));
-
-int KRB_LIB_FUNCTION
-tf_store_addr __P((const char *realm, struct in_addr *addr));
-
-char * KRB_LIB_FUNCTION
-tkt_string __P((void));
-
-int KRB_LIB_FUNCTION
-krb_add_our_ip_for_realm __P((const char *user, const char *instance,
- const char *realm, const char *password));
-
-#endif /* __krb_protos_h__ */
diff --git a/crypto/kerberosIV/lib/krb/krb.dsp b/crypto/kerberosIV/lib/krb/krb.dsp
deleted file mode 100644
index efec3b2d46dc..000000000000
--- a/crypto/kerberosIV/lib/krb/krb.dsp
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/lib/krb/krb.rc b/crypto/kerberosIV/lib/krb/krb.rc
deleted file mode 100644
index 413e706bbede..000000000000
--- a/crypto/kerberosIV/lib/krb/krb.rc
+++ /dev/null
@@ -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
-
diff --git a/crypto/kerberosIV/lib/krb/krb_ip_realm.c b/crypto/kerberosIV/lib/krb/krb_ip_realm.c
deleted file mode 100644
index a9581f1304a8..000000000000
--- a/crypto/kerberosIV/lib/krb/krb_ip_realm.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1999 Thomas Nyström and Stacken Computer Club
- * (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 "krb_locl.h"
-
-RCSID("$Id: krb_ip_realm.c,v 1.2.2.1 1999/12/06 23:01:12 assar Exp $");
-
-/*
- * Obtain a ticket for ourselves (`user.instance') in REALM and decrypt
- * it using `password' to verify the address that the KDC got our
- * request from.
- * Store in the ticket cache.
- */
-
-int
-krb_add_our_ip_for_realm(const char *user, const char *instance,
- const char *realm, const char *password)
-{
- des_cblock newkey;
- des_key_schedule schedule;
- char scrapbuf[1024];
- struct in_addr myAddr;
- KTEXT_ST ticket;
- CREDENTIALS c;
- int err;
- u_int32_t addr;
-
- if ((err = krb_mk_req(&ticket, (char *)user, (char *)instance,
- (char *)realm, 0)) != KSUCCESS)
- return err;
-
- if ((err = krb_get_cred((char *)user, (char *)instance, (char *)realm,
- &c)) != KSUCCESS)
- return err;
-
- des_string_to_key((char *)password, &newkey);
- des_set_key(&newkey, schedule);
- err = decomp_ticket(&c.ticket_st,
- (unsigned char *)scrapbuf, /* Flags */
- scrapbuf, /* Authentication name */
- scrapbuf, /* Principal's instance */
- scrapbuf, /* Principal's authentication domain */
- /* The Address Of Me That Servers Sees */
- (u_int32_t *)&addr,
- (unsigned char *)scrapbuf, /* Session key in ticket */
- (int *)scrapbuf, /* Lifetime of ticket */
- (u_int32_t *)scrapbuf, /* Issue time and date */
- scrapbuf, /* Service name */
- scrapbuf, /* Service instance */
- &newkey, /* Secret key */
- schedule /* Precomp. key schedule */
- );
-
- if (err != KSUCCESS) {
- memset(newkey, 0, sizeof(newkey));
- memset(schedule, 0, sizeof(schedule));
- return err;
- }
-
- myAddr.s_addr = addr;
-
- err = tf_store_addr(realm, &myAddr);
-
- memset(newkey, 0, sizeof(newkey));
- memset(schedule, 0, sizeof(schedule));
-
- return err;
-}
-
-int
-krb_get_our_ip_for_realm(const char *realm, struct in_addr *ip_addr)
-{
- return tf_get_addr(realm, ip_addr);
-}
diff --git a/crypto/kerberosIV/lib/krb/krb_log.h b/crypto/kerberosIV/lib/krb/krb_log.h
deleted file mode 100644
index 5155bc73c28a..000000000000
--- a/crypto/kerberosIV/lib/krb/krb_log.h
+++ /dev/null
@@ -1,74 +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.
- */
-
-/* $Id: krb_log.h,v 1.3 1999/12/02 16:58:42 joda Exp $ */
-
-#include <krb.h>
-
-#ifndef __KRB_LOG_H__
-#define __KRB_LOG_H__
-
-#if !defined(__GNUC__) && !defined(__attribute__)
-#define __attribute__(X)
-#endif
-
-__BEGIN_DECLS
-
-/* logging.c */
-
-typedef int (*krb_log_func_t) __P((FILE *, const char *, va_list));
-
-typedef krb_log_func_t krb_warnfn_t;
-
-struct krb_log_facility;
-
-int krb_vlogger __P((struct krb_log_facility*, const char *, va_list))
- __attribute__ ((format (printf, 2, 0)));
-int krb_logger __P((struct krb_log_facility*, const char *, ...))
- __attribute__ ((format (printf, 2, 3)));
-int krb_openlog __P((struct krb_log_facility*, char*, FILE*, krb_log_func_t));
-
-void krb_set_warnfn __P((krb_warnfn_t));
-krb_warnfn_t krb_get_warnfn __P((void));
-void krb_warning __P((const char*, ...))
- __attribute__ ((format (printf, 1, 2)));
-
-void kset_logfile __P((char*));
-void krb_log __P((const char*, ...))
- __attribute__ ((format (printf, 1, 2)));
-char *klog __P((int, const char*, ...))
- __attribute__ ((format (printf, 2, 3)));
-
-__END_DECLS
-
-#endif /* __KRB_LOG_H__ */
diff --git a/crypto/kerberosIV/lib/krb/krb_net_read.c b/crypto/kerberosIV/lib/krb/krb_net_read.c
deleted file mode 100644
index 3830cf94a525..000000000000
--- a/crypto/kerberosIV/lib/krb/krb_net_read.c
+++ /dev/null
@@ -1,42 +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. 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 "krb_locl.h"
-
-RCSID("$Id: krb_net_read.c,v 1.3 1999/12/02 16:58:42 joda Exp $");
-
-int
-krb_net_read (int fd, void *buf, size_t nbytes)
-{
- return net_read (fd, buf, nbytes);
-}
diff --git a/crypto/kerberosIV/lib/krb/krb_net_write.c b/crypto/kerberosIV/lib/krb/krb_net_write.c
deleted file mode 100644
index 04736857a1a7..000000000000
--- a/crypto/kerberosIV/lib/krb/krb_net_write.c
+++ /dev/null
@@ -1,42 +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. 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 "krb_locl.h"
-
-RCSID("$Id: krb_net_write.c,v 1.3 1999/12/02 16:58:42 joda Exp $");
-
-int
-krb_net_write (int fd, const void *buf, size_t nbytes)
-{
- return net_write (fd, buf, nbytes);
-}
diff --git a/crypto/kerberosIV/lib/krb/resource.h b/crypto/kerberosIV/lib/krb/resource.h
deleted file mode 100644
index d50551f2920a..000000000000
--- a/crypto/kerberosIV/lib/krb/resource.h
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/lib/krb/roken_rename.h b/crypto/kerberosIV/lib/krb/roken_rename.h
deleted file mode 100644
index bae10983f3a7..000000000000
--- a/crypto/kerberosIV/lib/krb/roken_rename.h
+++ /dev/null
@@ -1,98 +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. 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.8 1999/12/02 16:58:44 joda Exp $ */
-
-#ifndef __roken_rename_h__
-#define __roken_rename_h__
-
-/*
- * Libroken routines that are added libkrb
- */
-
-#define base64_decode _krb_base64_decode
-#define base64_encode _krb_base64_encode
-
-#define net_write roken_net_write
-#define net_read roken_net_read
-
-#ifndef HAVE_FLOCK
-#define flock _krb_flock
-#endif
-#ifndef HAVE_GETHOSTNAME
-#define gethostname _krb_gethostname
-#endif
-#ifndef HAVE_GETTIMEOFDAY
-#define gettimeofday _krb_gettimeofday
-#endif
-#ifndef HAVE_GETUID
-#define getuid _krb_getuid
-#endif
-#ifndef HAVE_SNPRINTF
-#define snprintf _krb_snprintf
-#endif
-#ifndef HAVE_ASPRINTF
-#define asprintf _krb_asprintf
-#endif
-#ifndef HAVE_ASNPRINTF
-#define asnprintf _krb_asnprintf
-#endif
-#ifndef HAVE_VASPRINTF
-#define vasprintf _krb_vasprintf
-#endif
-#ifndef HAVE_VASNPRINTF
-#define vasnprintf _krb_vasnprintf
-#endif
-#ifndef HAVE_VSNPRINTF
-#define vsnprintf _krb_vsnprintf
-#endif
-#ifndef HAVE_STRCASECMP
-#define strcasecmp _krb_strcasecmp
-#endif
-#ifndef HAVE_STRNCASECMP
-#define strncasecmp _krb_strncasecmp
-#endif
-#ifndef HAVE_STRDUP
-#define strdup _krb_strdup
-#endif
-#ifndef HAVE_STRNLEN
-#define strnlen _krb_strnlen
-#endif
-#ifndef HAVE_SWAB
-#define swab _krb_swab
-#endif
-#ifndef HAVE_STRTOK_R
-#define strtok_r _krb_strtok_r
-#endif
-
-#endif /* __roken_rename_h__ */
diff --git a/crypto/kerberosIV/lib/krb/solaris_compat.c b/crypto/kerberosIV/lib/krb/solaris_compat.c
deleted file mode 100644
index ff31e4b1ff35..000000000000
--- a/crypto/kerberosIV/lib/krb/solaris_compat.c
+++ /dev/null
@@ -1,89 +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 "krb_locl.h"
-
-RCSID("$Id: solaris_compat.c,v 1.4 1999/12/02 16:58:44 joda Exp $");
-
-#if (SunOS + 0) >= 50
-/*
- * Compatibility with solaris' libkrb.
- */
-
-int32_t
-_C0095C2A(void *in, void *out, u_int32_t length,
- struct des_ks_struct *schedule, des_cblock *key,
- struct sockaddr_in *sender, struct sockaddr_in *receiver)
-{
- return krb_mk_priv (in, out, length, schedule, key, sender, receiver);
-}
-
-int32_t
-_C0095C2B(void *in, u_int32_t in_length,
- struct des_ks_struct *schedule, des_cblock *key,
- struct sockaddr_in *sender, struct sockaddr_in *receiver,
- MSG_DAT *m_data)
-{
- return krb_rd_priv (in, in_length, schedule, key,
- sender, receiver, m_data);
-}
-
-void
-_C0095B2B(des_cblock *input,des_cblock *output,
- des_key_schedule ks,int enc)
-{
- des_ecb_encrypt(input, output, ks, enc);
-}
-
-void
-_C0095B2A(des_cblock (*input),
- des_cblock (*output),
- long length,
- des_key_schedule schedule,
- des_cblock (*ivec),
- int encrypt)
-{
- des_cbc_encrypt(input, output, length, schedule, ivec, encrypt);
-}
-
-void
-_C0095B2C(des_cblock (*input),
- des_cblock (*output),
- long length,
- des_key_schedule schedule,
- des_cblock (*ivec),
- int encrypt)
-{
- des_pcbc_encrypt(input, output, length, schedule, ivec, encrypt);
-}
-#endif /* (SunOS-0) >= 50 */
diff --git a/crypto/kerberosIV/lib/krb/time.c b/crypto/kerberosIV/lib/krb/time.c
deleted file mode 100644
index 015259bcfca0..000000000000
--- a/crypto/kerberosIV/lib/krb/time.c
+++ /dev/null
@@ -1,71 +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. 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 "krb_locl.h"
-
-RCSID("$Id: time.c,v 1.4 1999/12/02 16:58:44 joda Exp $");
-
-/* number of seconds the kdc clock is ahead of us */
-static int time_diff;
-
-void
-krb_set_kdc_time_diff(int diff)
-{
- time_diff = diff;
- if(krb_debug)
- krb_warning("Setting time diff to %d\n", diff);
-}
-
-int
-krb_get_kdc_time_diff(void)
-{
- return time_diff;
-}
-
-/* return the time at the kdc (local time corrected with a time
- differential) */
-void
-krb_kdctimeofday(struct timeval *tv)
-{
- time_t t;
-
- gettimeofday(tv, NULL);
- t = tv->tv_sec;
-
- if(krb_debug)
- krb_warning("Machine time: %s", ctime(&t));
- t += krb_get_kdc_time_diff();
- if(krb_debug)
- krb_warning("Correcting to %s", ctime(&t));
- tv->tv_sec = t;
-}
diff --git a/crypto/kerberosIV/lib/roken/ChangeLog b/crypto/kerberosIV/lib/roken/ChangeLog
deleted file mode 100644
index 116fdbdc1a58..000000000000
--- a/crypto/kerberosIV/lib/roken/ChangeLog
+++ /dev/null
@@ -1,614 +0,0 @@
-1999-11-25 Assar Westerlund <assar@sics.se>
-
- * getopt.c (getopt): return -1 instead of EOF. From
- <art@stacken.kth.se>
-
-1999-11-13 Assar Westerlund <assar@sics.se>
-
- * strftime.c (strftime): handle `%z' and `%Z' in a tm_gmtoff-less
- world
-
- * getcap.c: make sure to use db only if we have both the library
- and the header file
-
-1999-11-12 Assar Westerlund <assar@sics.se>
-
- * getarg.h: add arg_counter
- * getarg.c: add a new type of argument: `arg_counter' re-organize
- the code somewhat
-
- * Makefile.am: add strptime and strpftime-test
-
- * snprintf.c (xyzprintf): try to do the right thing with an % at
- the end of the format string
-
- * strptime.c (strptime): implement '%U', '%V', '%W'
- * strftime.c (strftime): implement '%U', '%V', '%W', '%z'
-
- * strftime.c (strftime): correct %E and %O handling. do something
- reasonable with "...%"
-
- * strftime.c: replace the BSD implementation by one of our own
- coding
-
- * strptime.c : new file
- * strpftime-test.c: new file
-
-1999-11-07 Assar Westerlund <assar@sics.se>
-
- * parse_bytes-test.c: new file
-
- * Makefile.am: add parse_bytes-test
-
- * parse_units.c (parse_something): try to handle the case of no
- value specified a little bit better
-
-1999-11-04 Assar Westerlund <assar@sics.se>
-
- * Makefile.am: bump version to 3:2:0
-
-1999-10-30 Assar Westerlund <assar@sics.se>
-
- * snprintf.c (PARSE_INT_FORMAT): add redundant casts to work
- around a gcc-bug that manifests itself on Linux-PPC. From Tom
- Rini <trini@kernel.crashing.org>
-
-1999-10-28 Assar Westerlund <assar@sics.se>
-
- * Makefile.am: bump version to 3:1:0
-
- * roken.h.in: use `unsigned char' instead of `u_int8_t' to avoid
- having to have that definition. this is the easy way out instead
- of getting the definition here where it's needed. flame me.
-
-Fri Oct 22 15:39:31 1999 Bjoern Groenvall <bg@sics.se>
-
- * k_getpwuid.c (k_getpwuid): getspuid() does not exist (even
- though it should), use getspnam().
-
-1999-10-20 Assar Westerlund <assar@sics.se>
-
- * Makefile.am: set version to 3:0:0
-
-1999-10-18 Johan Danielsson <joda@pdc.kth.se>
-
- * getarg.3: document arg_collect
-
- * getarg.c: change the way arg_collect works; it's still quite
- horrible though
-
- * getarg.h: change type of the collect function
-
-1999-10-17 Assar Westerlund <assar@sics.se>
-
- * xdbm.h: undo last commit
-
- * xdbm.h: reorder db includes
-
-1999-10-10 Assar Westerlund <assar@sics.se>
-
- * socket.c: const-ize and comment
-
- * net_write.c: const-ize
-
- * base64.c: const-ize
-
-1999-10-06 Assar Westerlund <assar@sics.se>
-
- * getarg.c (getarg): also set optind when returning error
-
-1999-09-26 Assar Westerlund <assar@sics.se>
-
- * Makefile.am: add parse_bytes.[ch]
-
-1999-09-24 Johan Danielsson <joda@pdc.kth.se>
-
- * getarg.3: getarg manpage
-
- * getarg.{c,h}: add a callback type to do more complicated processing
-
- * getarg.{c,h}: add floating point support
-
-1999-09-16 Assar Westerlund <assar@sics.se>
-
- * strlcat.c (strlcat): call strlcpy
-
- * strlcpy.c: update name and prototype
-
- * strlcat.c: update name and prototype
-
- * roken.h.in: rename strc{py,at}_truncate to strlc{py,at}
-
- * Makefile.am: rename strc{py,at}_truncate -> strlc{py,at}
-
- * Makefile.in: rename strc{py,at}_truncate -> strlc{py,at}
-
- * strcpy_truncate.c (strcpy_truncate): change return value to be
- the length of `src'
-
-1999-08-16 Assar Westerlund <assar@sics.se>
-
- * getcap.c: try to make this work on systems with DB
-
-1999-08-16 Johan Danielsson <joda@pdc.kth.se>
-
- * getcap.c: protect from db-less systems
-
-1999-08-09 Johan Danielsson <joda@pdc.kth.se>
-
- * simple_exec.c: add simple_exec{ve,le}
-
- * getcap.c: getcap from NetBSD
-
-1999-08-06 Assar Westerlund <assar@sics.se>
-
- * roken.h.in (sockaddr_storage): cater for those that have
- v6-support also
-
-1999-08-05 Assar Westerlund <assar@sics.se>
-
- * inet_ntop.c (inet_ntop_v4): remember to call ntohl
-
-1999-08-04 Assar Westerlund <assar@sics.se>
-
- * roken-common.h: add shutdown constants
-
- * mini_inetd.c (listen_v4, listen_v6): handle the case of the
- protocol not being supported
-
-1999-08-01 Assar Westerlund <assar@sics.se>
-
- * mini_inetd.c (socket_set_reuseaddr): remove duplicate
-
-1999-07-29 Assar Westerlund <assar@sics.se>
-
- * mini_inetd.c (mini_inetd): fix my stupid bugs
-
-1999-07-28 Assar Westerlund <assar@sics.se>
-
- * roken-common.h: add socket* functions
-
- * Makefile.am (libroken_la_SOURCES): add socket.c
-
- * socket.c: new file, originally from appl/ftp/common
-
- * Makefile.am: set version to 2:0:2
-
- * roken.h.in (inet_pton): add prototype
-
- * Makefile.am (EXTRA_libroken_la_SOURCES): add inet_pton
-
- * inet_pton.c: new file
-
- * getipnodebyname.c (getipnodebyname): try gethostbyname2 if we
- have it
-
-1999-07-27 Assar Westerlund <assar@sics.se>
-
- * mini_inetd.c: support IPv6
-
-1999-07-26 Assar Westerlund <assar@sics.se>
-
- * Makefile.am: set version to 1:0:1
-
- * roken.h.in (inet_ntop): add prototype
-
- * roken-common.h: (INET{,6}_ADDRSTRLEN): add
-
- * inet_ntop.c: new file
-
- * Makefile.am (EXTRA_libroken_la_SOURCES): add inet_ntop.c
-
- * Makefile.am: move some files from libroken_la_SOURCES to
- EXTRA_libroken_la_SOURCES
-
- * snprintf.c: some signed vs unsigned casts
-
-1999-07-24 Assar Westerlund <assar@sics.se>
-
- * roken.h.in (struct sockaddr_storage): define it needed
-
-1999-07-19 Assar Westerlund <assar@sics.se>
-
- * Makefile.am (libroken_la_SOURCES): add copyhostent.c,
- freehostent.c, getipnodebyname.c, getipnodebyaddr.c
-
- * roken.h.in: <netdb.h>: include
- (copyhostent, freehostent, getipnodebyname, getipnodebyaddr): add
- prototypes
-
- * roken-common.h: new constants for getipnodeby*
-
- * Makefile.in (SOURCES): add freehostent, copyhostent,
- getipnodebyname, getipnodebyaddr
-
- * freehostent.c: new file
-
- * copyhostent.c: new file
-
- * getipnodebyaddr.c: new file
-
- * getipnodebyname.c: new file
-
-1999-07-13 Assar Westerlund <assar@sics.se>
-
- * roken.h.in (k_getpwnam): update prototype
-
- * k_getpwnam.c (k_getpwnam): const-ize
-
- * get_default_username.c (get_default_username): a better way of
- guessing when the user has su:ed
-
-1999-07-08 Johan Danielsson <joda@pdc.kth.se>
-
- * roken.awk: use puts, as suggested by Jeffrey Hutzelman
- <jhutz+@cmu.edu>
-
-1999-07-06 Assar Westerlund <assar@sics.se>
-
- * readv.c (readv): typo
-
-1999-07-03 Assar Westerlund <assar@sics.se>
-
- * writev.c (writev): error check malloc properly
-
- * sendmsg.c (sendmsg): error check malloc properly
-
- * resolve.c (parse_reply): error check malloc properly
-
- * recvmsg.c (recvmsg): error check malloc properly
-
- * readv.c (readv): error check malloc properly
-
-1999-06-23 Assar Westerlund <assar@sics.se>
-
- * parse_units.c (acc_units): move the special case of 0 -> 1 to
- parse_something to avoid having it happen at the end of the string
-
-1999-06-15 Assar Westerlund <assar@sics.se>
-
- * Makefile.in: add get_default_username
-
- * get_default_username.c: new file
-
- * roken.h.in (get_default_username): add prototype
-
- * Makefile.am: add get_default_username
-
-1999-05-08 Assar Westerlund <assar@sics.se>
-
- * xdbm.h: also try <db.h> with DB_DBM_HSEARCH == 1
-
- * strnlen.c (strnlen): update prototype
-
- * Makefile.am: strndup.c: add
-
- * Makefile.in: strndup.c: add
-
- * roken.h.in (strndup): add
- (strnlen): update prototype
-
- * strndup.c: new file
-
-Fri Apr 16 17:59:30 1999 Assar Westerlund <assar@sics.se>
-
- * roken.h.in: include strsep prototype if needed
-
-Thu Apr 15 14:04:03 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: make make-print-version.o depend on version.h
-
-Wed Apr 7 14:11:00 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: make it compile w/o krb4
-
-Sat Mar 27 17:33:03 1999 Johan Danielsson <joda@blubb.pdc.kth.se>
-
- * snprintf.c (vasnprintf): correct check if realloc returns NULL
-
-Sat Mar 27 12:37:55 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: link print_version with -ldes to avoid unresolved
- references if -lkrb is shared
-
-Sat Mar 20 03:42:30 1999 Assar Westerlund <assar@sics.se>
-
- * roken-common.h (eread, ewrite): add
-
- * simple_exec.c: add <roken.h>
-
-Fri Mar 19 21:29:58 1999 Assar Westerlund <assar@sics.se>
-
- * Makefile.in: add eread, ewrite
-
- * eread.c, ewrite.c: new files
-
- * Makefile.am (libroken_la_SOURCES): add eread and ewrite
-
-Fri Mar 19 14:52:57 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: add version-info
-
-Thu Mar 18 12:53:32 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: remove include_dir hack
-
- * Makefile.am: parse_units.h
-
- * Makefile.am: include Makefile.am.common
-
-Sat Mar 13 23:31:35 1999 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (SOURCES): add glob.c
-
-Thu Mar 11 15:02:21 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * iruserok.c: move innetgr() to separate file
-
- * innetgr.c: move innetgr() to separate file
-
- * hstrerror.c (hstrerror): add const to return type
-
- * erealloc.c: fix types in format string
-
- * emalloc.c: fix types in format string
-
-Wed Mar 10 16:36:55 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * resolve.c: ugly fix for crays
-
-Mon Mar 8 11:52:20 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * roken.h.in: protos for {un,}setenv
-
-1999-02-16 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (SOURCES): add fnmatch
-
- * roken-common.h (abs): add
-
-Sat Feb 13 17:12:53 1999 Assar Westerlund <assar@sics.se>
-
- * emalloc.c, erealloc.c, estrup.c: new files
-
- * roken.h.in (mkstemp, gethostname): also includes prototypes if
- they are needed.
-
-1998-12-23 Assar Westerlund <assar@sics.se>
-
- * roken.h.in: mkstemp: add prototype
-
-1998-12-20 Assar Westerlund <assar@sics.se>
-
- * snprintf.c, iruserok.c, parse-units.c: unsigned char-correctness
-
- * roken.h.in (inet_aton): also chedk NEED_INET_ATON_PROTO
-
- * roken-common.h: __attribute__: check for autoconf'd
- HAVE___ATTRIBUTE__ instead of GNUC
-
-Sun Dec 6 19:53:21 1998 Assar Westerlund <assar@sics.se>
-
- * parse_units.c (parse_something): func is called with val == 0 if
- no unit was given
- (acc_flags, acc_units): update to new standard
-
-Fri Nov 27 03:09:42 1998 Assar Westerlund <assar@sics.se>
-
- * resolve.c (stot): constify
- (type_to_string): always declare
- (dns_lookup_int): correct debug output
-
-Thu Nov 26 23:43:55 1998 Assar Westerlund <assar@sics.se>
-
- * resolve.c (dns_lookup_int): send rr_class to res_search
-
-Thu Nov 26 17:09:47 1998 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * resolve.c: some cleanup
-
- * resolve.h: add T_NAPTR
-
-Sun Nov 22 10:23:07 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (WFLAGS): set
-
- * k_getpwnam.c (k_getpwnam): check for `struct spwd'
-
- * k_getpwuid.c (k_getpwuid): check for `struct spwd'
-
-Tue Sep 8 05:18:31 1998 Assar Westerlund <assar@sics.se>
-
- * recvmsg.c (recvmsg): patch from bpreece@unity.ncsu.edu
-
-Fri Sep 4 16:29:27 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * vsyslog.c: asprintf -> vasprintf
-
-Tue Aug 18 22:25:52 1998 Assar Westerlund <assar@sics.se>
-
- * getarg.h (arg_printusage): new signature
-
- * getarg.c (arg_printusage): new parameter `progname'. NULL means
- __progname.
-
-Sun Aug 9 14:53:44 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * Makefile.am: net_{read,write}.c
-
-Fri Jul 24 21:56:02 1998 Assar Westerlund <assar@sics.se>
-
- * simple_exec.c (simple_execvp): loop around waitpid when errno ==
- EINTR
-
-Thu Jul 23 20:24:35 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * Makefile.am: net_{read,write}.c
-
-Wed Jul 22 21:38:35 1998 Assar Westerlund <assar@sics.se>
-
- * simple_exec.c (simple_execlp): initialize `argv'
-
-Mon Jul 13 23:01:22 1998 Assar Westerlund <assar@sics.se>
-
- * inaddr2str.c (inaddr2str): don't advance hostent->h_addr_list,
- use a copy instead
-
-Fri Jul 10 01:20:08 1998 Assar Westerlund <assar@sics.se>
-
- * roken.h.in (net_write, net_read): add prototypes
-
- * Makefile.in: net_{read,write}.c: add
-
- * net_{read,write}.c: new files
-
-Tue Jun 30 17:29:09 1998 Assar Westerlund <assar@sics.se>
-
- * roken.h.in (issuid): add
-
- * get_window_size.c: fix misspelling of TIOCGWINSZ and bad use of
- fields
-
-Sun May 31 03:24:34 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * getarg.c (mandoc_template): Put short and long options in
- SYNOPSIS within the same [ ] pair.
-
-Sat May 30 00:13:01 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * getarg.c (arg_printusage): try to keep options shorter than
- column width
-
- * get_window_size.c (get_window_size): check COLUMNS and LINES
-
-Fri May 29 00:05:04 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * getarg.c (mandoc_template): Put short and long options in
- DESCRIPTION on the same line.
-
- * getarg.c (arg_match_long): make sure you only get an exact match
- if the strings are the same length
-
-Thu May 14 02:23:40 1998 Assar Westerlund <assar@sics.se>
-
- * roken.awk: stupid cray awk wants \#
-
-Fri May 1 01:29:36 1998 Assar Westerlund <assar@sics.se>
-
- * print_version.c (print_version): according to ISO/ANSI C the
- elements of `arg' are not constant and therefore not settable at
- compile-time. Set the at run-time instead.
-
-Sun Apr 19 10:00:06 1998 Assar Westerlund <assar@sics.se>
-
- * roken.h.in: include paths.h
-
-Sun Apr 5 12:30:49 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (SOURCES): add roken_gethostby.c to make solaris
- make happy
-
-Thu Mar 19 20:41:25 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * simple_exec.c: Simple fork+exec system() replacement.
-
-Fri Mar 6 00:21:53 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * roken_gethostby.c: Make `roken_gethostby_setup' take url-like
- specification instead of split up versions. Makes it easier for
- calling applications.
-
- * roken_gethostby.c: Another miracle of the 20th century:
- gethostby* over HTTP.
-
-Sat Feb 21 15:18:36 1998 assar westerlund <assar@sics.se>
-
- * parse_time.c (unparse_time_approx): new function that calls
- `unparse_units_approx'
-
- * parse_units.c (unparse_units_approx): new function that will
- only print the first unit.
-
- * Makefile.in: include parse_{time,units}
-
-Thu Feb 12 03:30:08 1998 Assar Westerlund <assar@sics.se>
-
- * parse_time.c (print_time_table): don't return a void value.
-
-Tue Feb 3 11:06:24 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * getarg.c (mandoc_template): Change date format to full month
- name, and day of month without leading zero.
-
-Thu Jan 22 21:23:23 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * getarg.c: Fix long form of negative flags.
-
-Mon Dec 29 23:31:10 1997 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * roken.h.in: Include <err.h>, to get linux __progname.
-
-Sun Dec 21 09:45:18 1997 Assar Westerlund <assar@sics.se>
-
- * parse_time.c (print_time_table): new function
-
- * parse_units.c (print_flags_table, print_units_table): new
- functions.
-
-Thu Dec 4 02:51:46 1997 Assar Westerlund <assar@sics.se>
-
- * iruserok.c: moved here.
-
- * snprintf.c (sn_append_char): don't write any terminating zero.
- (as_reserve): don't loop. better heuristic for how much space to
- realloc.
- (vasnprintf): simplify initializing to one.
-
-Sun Nov 30 14:56:59 1997 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * getarg.c: Add mandoc help back-end to getarg.
-
-Wed Nov 12 01:09:17 1997 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * verr.c, verrx.c: Fix warnings by moving exit from.
-
-Tue Nov 11 21:12:09 1997 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * parse_units.c: Change the list of separating characters (between
- units) to comma, space, and tab, removing digits. Having digits in
- this list makes a flag like `T42 generate a parse error. This
- change makes `17m3s' an invalid time-spec (you need a space).
-
-Tue Nov 11 02:38:44 1997 Assar Westerlund <assar@sics.se>
-
- * roken.h: add <sys/socket.h>
-
-Sun Nov 9 04:48:46 1997 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * fnmatch.c: Add fnmatch from NetBSD
-
-Sun Nov 9 02:00:08 1997 Assar Westerlund <assar@sics.se>
-
- * parse_units.c (parse_something): ignore white-space and ','
-
-Mon Nov 3 22:38:32 1997 Assar Westerlund <assar@sics.se>
-
- * roken.h: fclose prototype
-
- * roken.h: add prototype for vsyslog
-
- * Makefile.in: add some more source files to make soriasis make
- happy
-
-Sat Nov 1 00:19:21 1997 Assar Westerlund <assar@sics.se>
-
- * roken.h: include <sys/uio.h> and <errno.h>.
- prototypes for readv and writev
-
- * readv.c, writev.c: new files
-
-Wed Oct 29 02:21:38 1997 Assar Westerlund <assar@sics.se>
-
- * roken.h: Add ugly macros for openlog, gethostbyname,
- gethostbyaddr, and getservbyname for the benefit of Crays. Add
- default definition of MAXPATHLEN
diff --git a/crypto/kerberosIV/lib/roken/Makefile.am b/crypto/kerberosIV/lib/roken/Makefile.am
deleted file mode 100644
index e680230c5a49..000000000000
--- a/crypto/kerberosIV/lib/roken/Makefile.am
+++ /dev/null
@@ -1,177 +0,0 @@
-# $Id: Makefile.am,v 1.54 1999/12/03 04:04:13 assar Exp $
-
-include $(top_srcdir)/Makefile.am.common
-
-CLEANFILES = roken.h make-roken.c print_version.h
-
-lib_LTLIBRARIES = libroken.la
-libroken_la_LDFLAGS = -version-info 3:2:0
-
-noinst_PROGRAMS = make-roken make-print-version
-
-check_PROGRAMS = parse_bytes-test strpftime-test getaddrinfo-test
-TESTS = $(check_PROGRAMS)
-
-getaddrinfo_test_LDADD = libroken.la
-parse_bytes_test_LDADD = libroken.la
-strpftime_test_LDADD = strftime.o strptime.o
-
-if KRB4
-if KRB5
-## need to link with des here; otherwise, if krb4 is shared the link
-## will fail with unresolved references
-make_print_version_LDADD += $(LIB_krb4) -ldes
-endif
-endif
-
-libroken_la_SOURCES = \
- base64.c \
- concat.c \
- emalloc.c \
- eread.c \
- erealloc.c \
- estrdup.c \
- ewrite.c \
- get_default_username.c \
- get_window_size.c \
- getarg.c \
- inaddr2str.c \
- issuid.c \
- k_getpwnam.c \
- k_getpwuid.c \
- mini_inetd.c \
- net_read.c \
- net_write.c \
- parse_bytes.c \
- parse_time.c \
- parse_units.c \
- print_version.c \
- resolve.c \
- roken_gethostby.c \
- signal.c \
- simple_exec.c \
- snprintf.c \
- socket.c \
- tm2time.c \
- verify.c \
- warnerr.c \
- xdbm.h
-
-EXTRA_libroken_la_SOURCES = \
- chown.c \
- copyhostent.c \
- daemon.c \
- err.c \
- err.h \
- errx.c \
- fchown.c \
- flock.c \
- fnmatch.c \
- fnmatch.h \
- freeaddrinfo.c \
- freehostent.c \
- gai_strerror.c \
- getaddrinfo.c \
- getdtablesize.c \
- getegid.c \
- geteuid.c \
- getgid.c \
- gethostname.c \
- getipnodebyaddr.c \
- getipnodebyname.c \
- getnameinfo.c \
- getopt.c \
- gettimeofday.c \
- getuid.c \
- getusershell.c \
- glob.h \
- hstrerror.c \
- inet_aton.c \
- inet_ntop.c \
- inet_pton.c \
- initgroups.c \
- innetgr.c \
- iruserok.c \
- lstat.c \
- memmove.c \
- mkstemp.c \
- putenv.c \
- rcmd.c \
- readv.c \
- recvmsg.c \
- sendmsg.c \
- setegid.c \
- setenv.c \
- seteuid.c \
- strcasecmp.c \
- strdup.c \
- strerror.c \
- strftime.c \
- strlcat.c \
- strlcpy.c \
- strlwr.c \
- strncasecmp.c \
- strndup.c \
- strnlen.c \
- strptime.c \
- strsep.c \
- strtok_r.c \
- strupr.c \
- swab.c \
- unsetenv.c \
- verr.c \
- verrx.c \
- vsyslog.c \
- vwarn.c \
- vwarnx.c \
- warn.c \
- warnx.c \
- writev.c
-
-EXTRA_DIST = resource.h roken.awk roken.def roken.dsp roken.h.in \
- roken.mak roken.rc
-
-
-
-libroken_la_LIBADD = @LTLIBOBJS@
-
-$(LTLIBOBJS) $(libroken_la_OBJECTS): roken.h
-
-include_HEADERS = $(err_h) base64.h getarg.h \
- parse_bytes.h parse_time.h parse_units.h \
- resolve.h roken.h roken-common.h
-
-build_HEADERZ = $(err_h) $(fnmatch_h) $(glob_h) xdbm.h
-
-if have_err_h
-err_h =
-else
-err_h = err.h
-endif
-
-if have_fnmatch_h
-fnmatch_h =
-else
-fnmatch_h = fnmatch.h
-endif
-
-if have_glob_h
-glob_h =
-else
-glob_h = glob.h
-endif
-
-roken.h: make-roken
- @./make-roken > tmp.h ;\
- if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \
- else rm -f roken.h; mv tmp.h roken.h; fi
-
-make-roken.c: roken.h.in roken.awk
- $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c
-
-print_version.lo: print_version.h
-
-print_version.h: make-print-version
- ./make-print-version print_version.h
-
-make-print-version.o: $(top_builddir)/include/version.h
diff --git a/crypto/kerberosIV/lib/roken/base64.c b/crypto/kerberosIV/lib/roken/base64.c
deleted file mode 100644
index daed8697ce26..000000000000
--- a/crypto/kerberosIV/lib/roken/base64.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 1995 - 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: base64.c,v 1.4 1999/12/02 16:58:45 joda Exp $");
-#endif
-#include <stdlib.h>
-#include <string.h>
-#include "base64.h"
-
-static char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-static int pos(char c)
-{
- char *p;
- for(p = base64; *p; p++)
- if(*p == c)
- return p - base64;
- return -1;
-}
-
-int base64_encode(const void *data, int size, char **str)
-{
- char *s, *p;
- int i;
- int c;
- const unsigned char *q;
-
- p = s = (char*)malloc(size*4/3+4);
- if (p == NULL)
- return -1;
- q = (const unsigned char*)data;
- i=0;
- for(i = 0; i < size;){
- c=q[i++];
- c*=256;
- if(i < size)
- c+=q[i];
- i++;
- c*=256;
- if(i < size)
- c+=q[i];
- i++;
- p[0]=base64[(c&0x00fc0000) >> 18];
- p[1]=base64[(c&0x0003f000) >> 12];
- p[2]=base64[(c&0x00000fc0) >> 6];
- p[3]=base64[(c&0x0000003f) >> 0];
- if(i > size)
- p[3]='=';
- if(i > size+1)
- p[2]='=';
- p+=4;
- }
- *p=0;
- *str = s;
- return strlen(s);
-}
-
-int base64_decode(const char *str, void *data)
-{
- const char *p;
- unsigned char *q;
- int c;
- int x;
- int done = 0;
- q=(unsigned char*)data;
- for(p=str; *p && !done; p+=4){
- x = pos(p[0]);
- if(x >= 0)
- c = x;
- else{
- done = 3;
- break;
- }
- c*=64;
-
- x = pos(p[1]);
- if(x >= 0)
- c += x;
- else
- return -1;
- c*=64;
-
- if(p[2] == '=')
- done++;
- else{
- x = pos(p[2]);
- if(x >= 0)
- c += x;
- else
- return -1;
- }
- c*=64;
-
- if(p[3] == '=')
- done++;
- else{
- if(done)
- return -1;
- x = pos(p[3]);
- if(x >= 0)
- c += x;
- else
- return -1;
- }
- if(done < 3)
- *q++=(c&0x00ff0000)>>16;
-
- if(done < 2)
- *q++=(c&0x0000ff00)>>8;
- if(done < 1)
- *q++=(c&0x000000ff)>>0;
- }
- return q - (unsigned char*)data;
-}
diff --git a/crypto/kerberosIV/lib/roken/base64.h b/crypto/kerberosIV/lib/roken/base64.h
deleted file mode 100644
index 5ad1e3b18ea9..000000000000
--- a/crypto/kerberosIV/lib/roken/base64.h
+++ /dev/null
@@ -1,42 +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.
- */
-
-/* $Id: base64.h,v 1.2 1999/12/02 16:58:45 joda Exp $ */
-
-#ifndef _BASE64_H_
-#define _BASE64_H_
-
-int base64_encode(const void *data, int size, char **str);
-int base64_decode(const char *str, void *data);
-
-#endif
diff --git a/crypto/kerberosIV/lib/roken/concat.c b/crypto/kerberosIV/lib/roken/concat.c
deleted file mode 100644
index ca295c030ae5..000000000000
--- a/crypto/kerberosIV/lib/roken/concat.c
+++ /dev/null
@@ -1,112 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: concat.c,v 1.4 1999/12/02 16:58:45 joda Exp $");
-#endif
-#include "roken.h"
-
-int
-roken_concat (char *s, size_t len, ...)
-{
- int ret;
- va_list args;
-
- va_start(args, len);
- ret = roken_vconcat (s, len, args);
- va_end(args);
- return ret;
-}
-
-int
-roken_vconcat (char *s, size_t len, va_list args)
-{
- const char *a;
-
- while ((a = va_arg(args, const char*))) {
- size_t n = strlen (a);
-
- if (n >= len)
- return -1;
- memcpy (s, a, n);
- s += n;
- len -= n;
- }
- *s = '\0';
- return 0;
-}
-
-size_t
-roken_vmconcat (char **s, size_t max_len, va_list args)
-{
- const char *a;
- char *p, *q;
- size_t len = 0;
- *s = NULL;
- p = malloc(1);
- if(p == NULL)
- return 0;
- len = 1;
- while ((a = va_arg(args, const char*))) {
- size_t n = strlen (a);
-
- if(max_len && len + n > max_len){
- free(p);
- return 0;
- }
- q = realloc(p, len + n);
- if(q == NULL){
- free(p);
- return 0;
- }
- p = q;
- memcpy (p + len - 1, a, n);
- len += n;
- }
- p[len - 1] = '\0';
- *s = p;
- return len;
-}
-
-size_t
-roken_mconcat (char **s, size_t max_len, ...)
-{
- int ret;
- va_list args;
-
- va_start(args, max_len);
- ret = roken_vmconcat (s, max_len, args);
- va_end(args);
- return ret;
-}
diff --git a/crypto/kerberosIV/lib/roken/copyhostent.c b/crypto/kerberosIV/lib/roken/copyhostent.c
deleted file mode 100644
index a3be6db9134d..000000000000
--- a/crypto/kerberosIV/lib/roken/copyhostent.c
+++ /dev/null
@@ -1,102 +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 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: copyhostent.c,v 1.2 1999/12/02 16:58:45 joda Exp $");
-#endif
-
-#include "roken.h"
-
-/*
- * return a malloced copy of `h'
- */
-
-struct hostent *
-copyhostent (const struct hostent *h)
-{
- struct hostent *res;
- char **p;
- int i, n;
-
- res = malloc (sizeof (*res));
- if (res == NULL)
- return NULL;
- res->h_name = NULL;
- res->h_aliases = NULL;
- res->h_addrtype = h->h_addrtype;
- res->h_length = h->h_length;
- res->h_addr_list = NULL;
- res->h_name = strdup (h->h_name);
- if (res->h_name == NULL) {
- freehostent (res);
- return NULL;
- }
- for (n = 0, p = h->h_aliases; *p != NULL; ++p)
- ++n;
- res->h_aliases = malloc ((n + 1) * sizeof(*res->h_aliases));
- if (res->h_aliases == NULL) {
- freehostent (res);
- return NULL;
- }
- for (i = 0; i < n + 1; ++i)
- res->h_aliases[i] = NULL;
- for (i = 0; i < n; ++i) {
- res->h_aliases[i] = strdup (h->h_aliases[i]);
- if (res->h_aliases[i] == NULL) {
- freehostent (res);
- return NULL;
- }
- }
-
- for (n = 0, p = h->h_addr_list; *p != NULL; ++p)
- ++n;
- res->h_addr_list = malloc ((n + 1) * sizeof(*res->h_addr_list));
- if (res->h_addr_list == NULL) {
- freehostent (res);
- return NULL;
- }
- for (i = 0; i < n + 1; ++i) {
- res->h_addr_list[i] = NULL;
- }
- for (i = 0; i < n; ++i) {
- res->h_addr_list[i] = malloc (h->h_length);
- if (res->h_addr_list[i] == NULL) {
- freehostent (res);
- return NULL;
- }
- memcpy (res->h_addr_list[i], h->h_addr_list[i], h->h_length);
- }
- return res;
-}
-
diff --git a/crypto/kerberosIV/lib/roken/emalloc.c b/crypto/kerberosIV/lib/roken/emalloc.c
deleted file mode 100644
index bbea1e0b5f0b..000000000000
--- a/crypto/kerberosIV/lib/roken/emalloc.c
+++ /dev/null
@@ -1,56 +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 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: emalloc.c,v 1.4 1999/12/02 16:58:45 joda Exp $");
-#endif
-
-#include <stdlib.h>
-#include <err.h>
-
-#include <roken.h>
-
-/*
- * Like malloc but never fails.
- */
-
-void *
-emalloc (size_t sz)
-{
- void *tmp = malloc (sz);
-
- if (tmp == NULL && sz != 0)
- err (1, "malloc %lu", (unsigned long)sz);
- return tmp;
-}
diff --git a/crypto/kerberosIV/lib/roken/eread.c b/crypto/kerberosIV/lib/roken/eread.c
deleted file mode 100644
index 9a1b24bd55df..000000000000
--- a/crypto/kerberosIV/lib/roken/eread.c
+++ /dev/null
@@ -1,57 +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 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: eread.c,v 1.2 1999/12/02 16:58:45 joda Exp $");
-#endif
-
-#include <unistd.h>
-#include <err.h>
-
-#include <roken.h>
-
-/*
- * Like read but never fails (and never returns partial data).
- */
-
-ssize_t
-eread (int fd, void *buf, size_t nbytes)
-{
- ssize_t ret;
-
- ret = net_read (fd, buf, nbytes);
- if (ret < 0)
- err (1, "read");
- return ret;
-}
diff --git a/crypto/kerberosIV/lib/roken/erealloc.c b/crypto/kerberosIV/lib/roken/erealloc.c
deleted file mode 100644
index 8afa8f3d7b61..000000000000
--- a/crypto/kerberosIV/lib/roken/erealloc.c
+++ /dev/null
@@ -1,56 +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 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: erealloc.c,v 1.4 1999/12/02 16:58:45 joda Exp $");
-#endif
-
-#include <stdlib.h>
-#include <err.h>
-
-#include <roken.h>
-
-/*
- * Like realloc but never fails.
- */
-
-void *
-erealloc (void *ptr, size_t sz)
-{
- void *tmp = realloc (ptr, sz);
-
- if (tmp == NULL && sz != 0)
- err (1, "realloc %lu", (unsigned long)sz);
- return tmp;
-}
diff --git a/crypto/kerberosIV/lib/roken/estrdup.c b/crypto/kerberosIV/lib/roken/estrdup.c
deleted file mode 100644
index 8c0d9a748cb3..000000000000
--- a/crypto/kerberosIV/lib/roken/estrdup.c
+++ /dev/null
@@ -1,56 +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 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: estrdup.c,v 1.2 1999/12/02 16:58:45 joda Exp $");
-#endif
-
-#include <stdlib.h>
-#include <err.h>
-
-#include <roken.h>
-
-/*
- * Like strdup but never fails.
- */
-
-char *
-estrdup (const char *str)
-{
- char *tmp = strdup (str);
-
- if (tmp == NULL)
- err (1, "strdup");
- return tmp;
-}
diff --git a/crypto/kerberosIV/lib/roken/ewrite.c b/crypto/kerberosIV/lib/roken/ewrite.c
deleted file mode 100644
index b2c43de8dbc9..000000000000
--- a/crypto/kerberosIV/lib/roken/ewrite.c
+++ /dev/null
@@ -1,57 +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 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: ewrite.c,v 1.2 1999/12/02 16:58:45 joda Exp $");
-#endif
-
-#include <unistd.h>
-#include <err.h>
-
-#include <roken.h>
-
-/*
- * Like write but never fails (and never returns partial data).
- */
-
-ssize_t
-ewrite (int fd, const void *buf, size_t nbytes)
-{
- ssize_t ret;
-
- ret = net_write (fd, buf, nbytes);
- if (ret < 0)
- err (1, "write");
- return ret;
-}
diff --git a/crypto/kerberosIV/lib/roken/flock.c b/crypto/kerberosIV/lib/roken/flock.c
deleted file mode 100644
index 13da4f474bef..000000000000
--- a/crypto/kerberosIV/lib/roken/flock.c
+++ /dev/null
@@ -1,87 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifndef HAVE_FLOCK
-RCSID("$Id: flock.c,v 1.4 1999/12/02 16:58:46 joda Exp $");
-
-#include "roken.h"
-
-
-#define OP_MASK (LOCK_SH | LOCK_EX | LOCK_UN)
-
-int
-flock(int fd, int operation)
-{
-#if defined(HAVE_FCNTL) && defined(F_SETLK)
- struct flock arg;
- int code, cmd;
-
- arg.l_whence = SEEK_SET;
- arg.l_start = 0;
- arg.l_len = 0; /* means to EOF */
-
- if (operation & LOCK_NB)
- cmd = F_SETLK;
- else
- cmd = F_SETLKW; /* Blocking */
-
- switch (operation & OP_MASK) {
- case LOCK_UN:
- arg.l_type = F_UNLCK;
- code = fcntl(fd, F_SETLK, &arg);
- break;
- case LOCK_SH:
- arg.l_type = F_RDLCK;
- code = fcntl(fd, cmd, &arg);
- break;
- case LOCK_EX:
- arg.l_type = F_WRLCK;
- code = fcntl(fd, cmd, &arg);
- break;
- default:
- errno = EINVAL;
- code = -1;
- break;
- }
- return code;
-#else
- return -1;
-#endif
-}
-
-#endif
-
diff --git a/crypto/kerberosIV/lib/roken/fnmatch.c b/crypto/kerberosIV/lib/roken/fnmatch.c
deleted file mode 100644
index dc01d6ea61ba..000000000000
--- a/crypto/kerberosIV/lib/roken/fnmatch.c
+++ /dev/null
@@ -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 (conklin@ngai.kaleida.com)
- */
- 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);
-}
diff --git a/crypto/kerberosIV/lib/roken/fnmatch.h b/crypto/kerberosIV/lib/roken/fnmatch.h
deleted file mode 100644
index 95c91d600b64..000000000000
--- a/crypto/kerberosIV/lib/roken/fnmatch.h
+++ /dev/null
@@ -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_ */
diff --git a/crypto/kerberosIV/lib/roken/freehostent.c b/crypto/kerberosIV/lib/roken/freehostent.c
deleted file mode 100644
index 0cd92cd732cd..000000000000
--- a/crypto/kerberosIV/lib/roken/freehostent.c
+++ /dev/null
@@ -1,62 +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 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: freehostent.c,v 1.2 1999/12/02 16:58:46 joda Exp $");
-#endif
-
-#include "roken.h"
-
-/*
- * free a malloced hostent
- */
-
-void
-freehostent (struct hostent *h)
-{
- char **p;
-
- free (h->h_name);
- if (h->h_aliases != NULL) {
- for (p = h->h_aliases; *p != NULL; ++p)
- free (*p);
- free (h->h_aliases);
- }
- if (h->h_addr_list != NULL) {
- for (p = h->h_addr_list; *p != NULL; ++p)
- free (*p);
- free (h->h_addr_list);
- }
- free (h);
-}
diff --git a/crypto/kerberosIV/lib/roken/get_default_username.c b/crypto/kerberosIV/lib/roken/get_default_username.c
deleted file mode 100644
index 10b0863888d3..000000000000
--- a/crypto/kerberosIV/lib/roken/get_default_username.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1997 - 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: get_default_username.c,v 1.3 1999/12/02 16:58:46 joda Exp $");
-#endif /* HAVE_CONFIG_H */
-
-#include "roken.h"
-
-/*
- * Try to return what should be considered the default username or
- * NULL if we can't guess at all.
- */
-
-const char *
-get_default_username (void)
-{
- const char *user;
-
- user = getenv ("USER");
- if (user == NULL)
- user = getenv ("LOGNAME");
- if (user == NULL)
- user = getenv ("USERNAME");
-
-#if defined(HAVE_GETLOGIN) && !defined(POSIX_GETLOGIN)
- if (user == NULL) {
- user = (const char *)getlogin ();
- if (user != NULL)
- return user;
- }
-#endif
-#ifdef HAVE_PWD_H
- {
- uid_t uid = getuid ();
- struct passwd *pwd;
-
- if (user != NULL) {
- pwd = k_getpwnam (user);
- if (pwd != NULL && pwd->pw_uid == uid)
- return user;
- }
- pwd = k_getpwuid (uid);
- if (pwd != NULL)
- return pwd->pw_name;
- }
-#endif
- return user;
-}
diff --git a/crypto/kerberosIV/lib/roken/getarg.3 b/crypto/kerberosIV/lib/roken/getarg.3
deleted file mode 100644
index 78a88028caf4..000000000000
--- a/crypto/kerberosIV/lib/roken/getarg.3
+++ /dev/null
@@ -1,317 +0,0 @@
-.\" Copyright (c) 1999 Kungliga Tekniska Högskolan
-.\" $Id: getarg.3,v 1.2 1999/10/18 17:14:31 joda Exp $
-.Dd September 24, 1999
-.Dt GETARG 3
-.Os ROKEN
-.Sh NAME
-.Nm getarg ,
-.Nm arg_printusage
-.Nd collect command line options
-.Sh SYNOPSIS
-.Fd #include <getarg.h>
-
-.Ft int
-.Fn getarg "struct getargs *args" "size_t num_args" "int argc" "char **argv" "int *optind"
-
-.Ft void
-.Fn arg_printusage "struct getargs *args" "size_t num_args" "const char *progname" "const char *extra_string"
-
-.Sh DESCRIPTION
-.Fn getarg
-collects any command line options given to a program in an easily used way.
-.Fn arg_printusage
-pretty-prints the available options, with a short help text.
-.Pp
-.Fa args
-is the option specification to use, and it's an array of
-.Fa struct getargs
-elements.
-.Fa num_args
-is the size of
-.Fa args
-(in elements).
-.Fa argc
-and
-.Fa argv
-are the argument count and argument vector to extract option from.
-.Fa optind
-is a pointer to an integer where the index to the last processed
-argument is stored, it must be initialised to the first index (minus
-one) to process (normally 0) before the first call.
-.Pp
-.Fa arg_printusage
-take the same
-.Fa args
-and
-.Fa num_args
-as getarg;
-.Fa progname is the name of the program (to be used in the help text), and
-.Fa extra_string
-is a string to print after the actual options to indicate more
-arguments. The usefulness of this function is realised only be people
-who has used programs that has help strings that doesn't match what
-the code does.
-.Pp
-The
-.Fa getargs
-struct has the following elements.
-
-.Bd -literal
-struct getargs{
- const char *long_name;
- char short_name;
- enum { arg_integer,
- arg_string,
- arg_flag,
- arg_negative_flag,
- arg_strings,
- arg_double,
- arg_collect
- } type;
- void *value;
- const char *help;
- const char *arg_help;
-};
-.Ed
-.Pp
-.Fa long_name
-is the long name of the option, it can be
-.Dv NULL ,
-if you don't want a long name.
-.Fa short_name
-is the characted to use as short option, it can be zero. If the option
-has a value the
-.Fa value
-field gets filled in with that value interpreted as specified by the
-.Fa type
-field.
-.Fa help
-is a longer help string for the option as a whole, if it's
-.Dv NULL
-the help text for the option is omitted (but it's still displayed in
-the synopsis).
-.Fa arg_help
-is a description of the argument, if
-.Dv NULL
-a default value will be used, depending on the type of the option:
-.Pp
-.Bl -hang -width arg_negative_flag
-.It arg_integer
-the argument is a signed integer, and
-.Fa value
-should point to an
-.Fa int .
-.It Fa arg_string
-the argument is a string, and
-.Fa value
-should point to a
-.Fa char* .
-.It Fa arg_flag
-the argument is a flag, and
-.Fa value
-should point to a
-.Fa int .
-It gets filled in with either zero or one, depending on how the option
-is given, the normal case beeing one. Note that if the option isn't
-given, the value isn't altered, so it should be initialised to some
-useful default.
-.It Fa arg_negative_flag
-this is the same as
-.Fa arg_flag
-but it reverses the meaning of the flag (a given short option clears
-the flag), and the synopsis of a long option is negated.
-.It Fa arg_strings
-the argument can be given multiple times, and the values are collected
-in an array;
-.Fa value
-should be a pointer to a
-.Fa struct getarg_strings
-structure, which holds a length and a string pointer.
-.It Fa arg_double
-argument is a double precision floating point value, and
-.Fa value
-should point to a
-.Fa double .
-.It Fa arg_collect
-allows more fine-grained control of the option parsing process.
-.Fa value
-should be a pointer to a
-.Fa getarg_collect_info
-structure:
-.Bd -literal
-typedef int (*getarg_collect_func)(int short_opt,
- int argc,
- char **argv,
- int *optind,
- int *optarg,
- void *data);
-
-typedef struct getarg_collect_info {
- getarg_collect_func func;
- void *data;
-} getarg_collect_info;
-.Ed
-.Pp
-With the
-.Fa func
-member set to a function to call, and
-.Fa data
-to some application specific data. The parameters to the collect function are:
-.Bl -inset
-.It Fa short_flag
-non-zero if this call is via a short option flag, zero otherwise
-.It Fa argc , argv
-the whole argument list
-.It Fa optind
-pointer to the index in argv where the flag is
-.It Fa optarg
-pointer to the index in argv[*optind] where the flag name starts
-.It Fa data
-application specific data
-.El
-.Pp
-You can modify
-.Fa *optind ,
-and
-.Fa *optarg ,
-but to do this correct you (more or less) have to know about the inner
-workings of getarg.
-
-You can skip parts of arguments by increasing
-.Fa *optarg
-(you could
-implement the
-.Fl z Ns Ar 3
-set of flags from
-.Nm gzip
-with this), or whole argument strings by increasing
-.Fa *optind
-(let's say you want a flag
-.Fl c Ar x y z
-to specify a coordinate); if you also have to set
-.Fa *optarg
-to a sane value.
-.Pp
-The collect function should return one of
-.Dv ARG_ERR_NO_MATCH , ARG_ERR_BAD_ARG , ARG_ERR_NO_ARG
-on error, zero otherwise.
-.Pp
-For your convenience there is a function,
-.Fn getarg_optarg ,
-that returns the traditional argument string, and you pass it all
-arguments, sans data, that where given to the collection function.
-.Pp
-Don't use this more this unless you absolutely have to.
-.El
-.Pp
-Option parsing is similar to what
-.Xr getopt
-uses. Short options without arguments can be compressed
-.Pf ( Fl xyz
-is the same as
-.Fl x y z ) ,
-and short
-options with arguments take these as either the rest of the
-argv-string or as the next option
-.Pf ( Fl o Ns Ar foo ,
-or
-.Fl o Ar foo ) .
-.Pp
-Long option names are prefixed with -- (double dash), and the value
-with a = (equal),
-.Fl -foo= Ns Ar bar .
-Long option flags can either be specified as they are
-.Pf ( Fl -help ) ,
-or with an (boolean parsable) option
-.Pf ( Fl -help= Ns Ar yes ,
-.Fl -help= Ns Ar true ,
-or similar), or they can also be negated
-.Pf ( Fl -no-help
-is the same as
-.Fl -help= Ns no ) ,
-and if you're really confused you can do it multiple times
-.Pf ( Fl -no-no-help= Ns Ar false ,
-or even
-.Fl -no-no-help= Ns Ar maybe ) .
-
-.Pp
-.Sh EXAMPLE
-.Bd -literal
-#include <stdio.h>
-#include <string.h>
-#include <getarg.h>
-
-char *source = "Ouagadougou";
-char *destination;
-int weight;
-int include_catalog = 1;
-int help_flag;
-
-struct getargs args[] = {
- { "source", 's', arg_string, &source,
- "source of shippment", "city" },
- { "destination", 'd', arg_string, &destination,
- "destination of shippment", "city" },
- { "weight", 'w', arg_integer, &weight,
- "weight of shippment", "tons" },
- { "catalog", 'c', arg_negative_flag, &include_catalog,
- "include product catalog" },
- { "help", 'h', arg_flag, &help_flag }
-};
-
-int num_args = sizeof(args) / sizeof(args[0]); /* number of elements in args */
-
-const char *progname = "ship++";
-
-int
-main(int argc, char **argv)
-{
- int optind = 0;
- if (getarg(args, num_args, argc, argv, &optind)) {
- arg_printusage(args, num_args, progname, "stuff...");
- exit (1);
- }
- if (help_flag) {
- arg_printusage(args, num_args, progname, "stuff...");
- exit (0);
- }
- if (destination == NULL) {
- fprintf(stderr, "%s: must specify destination\n", progname);
- exit(1);
- }
- if (strcmp(source, destination) == 0) {
- fprintf(stderr, "%s: destination must be different from source\n");
- exit(1);
- }
- /* include more stuff here ... */
- exit(2);
-}
-.Ed
-.Pp
-The output help output from this program looks like this:
-.Bd -literal
-$ ship++ --help
-Usage: ship++ [--source=city] [-s city] [--destination=city] [-d city]
- [--weight=tons] [-w tons] [--no-catalog] [-c] [--help] [-h] stuff...
--s city, --source=city source of shippment
--d city, --destination=city destination of shippment
--w tons, --weight=tons weight of shippment
--c, --no-catalog include product catalog
-.Ed
-
-.Sh BUGS
-It should be more flexible, so it would be possible to use other more
-complicated option syntaxes, such as what
-.Xr ps 1 ,
-and
-.Xr tar 1 ,
-uses, or the AFS model where you can skip the flag names as long as
-the options come in the correct order.
-.Pp
-Options with multiple arguments should be handled better.
-.Pp
-Should be integreated with SL.
-.Pp
-It's very confusing that the struct you pass in is called getargS.
-.Sh SEE ALSO
-.Xr getopt 3
diff --git a/crypto/kerberosIV/lib/roken/getarg.c b/crypto/kerberosIV/lib/roken/getarg.c
deleted file mode 100644
index 505e41867ad6..000000000000
--- a/crypto/kerberosIV/lib/roken/getarg.c
+++ /dev/null
@@ -1,547 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: getarg.c,v 1.32 1999/12/02 16:58:46 joda Exp $");
-#endif
-
-#include <stdio.h>
-#include <roken.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) || (!longp && arg->type == arg_counter))
- return 0;
-
- if(mdoc){
- if(longp)
- strlcat(string, "= Ns", len);
- strlcat(string, " Ar ", len);
- }else
- if (longp)
- strlcat (string, "=", len);
- else
- strlcat (string, " ", len);
-
- if (arg->arg_help)
- s = arg->arg_help;
- else if (arg->type == arg_integer || arg->type == arg_counter)
- s = "integer";
- else if (arg->type == arg_string)
- s = "string";
- else if (arg->type == arg_double)
- s = "float";
- else
- s = "<undefined>";
-
- strlcat(string, s, len);
- return 1 + strlen(s);
-}
-
-static void
-mandoc_template(struct getargs *args,
- size_t num_args,
- const char *progname,
- const char *extra_string)
-{
- int i;
- char timestr[64], cmd[64];
- char buf[128];
- const char *p;
- time_t t;
-
- printf(".\\\" Things to fix:\n");
- printf(".\\\" * correct section, and operating system\n");
- printf(".\\\" * remove Op from mandatory flags\n");
- printf(".\\\" * use better macros for arguments (like .Pa for files)\n");
- printf(".\\\"\n");
- t = time(NULL);
- strftime(timestr, sizeof(timestr), "%B %e, %Y", localtime(&t));
- printf(".Dd %s\n", timestr);
- p = strrchr(progname, '/');
- if(p) p++; else p = progname;
- strlcpy(cmd, p, sizeof(cmd));
- strupr(cmd);
-
- printf(".Dt %s SECTION\n", cmd);
- printf(".Os OPERATING_SYSTEM\n");
- printf(".Sh NAME\n");
- printf(".Nm %s\n", p);
- printf(".Nd\n");
- printf("in search of a description\n");
- printf(".Sh SYNOPSIS\n");
- printf(".Nm\n");
- for(i = 0; i < num_args; i++){
- /* we seem to hit a limit on number of arguments if doing
- short and long flags with arguments -- split on two lines */
- if(ISFLAG(args[i]) ||
- args[i].short_name == 0 || args[i].long_name == NULL) {
- printf(".Op ");
-
- if(args[i].short_name) {
- print_arg(buf, sizeof(buf), 1, 0, args + i);
- printf("Fl %c%s", args[i].short_name, buf);
- if(args[i].long_name)
- printf(" | ");
- }
- if(args[i].long_name) {
- print_arg(buf, sizeof(buf), 1, 1, args + i);
- printf("Fl -%s%s", args[i].long_name, buf);
- }
- printf("\n");
- } else {
- print_arg(buf, sizeof(buf), 1, 0, args + i);
- printf(".Oo Fl %c%s \\*(Ba Xo\n", args[i].short_name, buf);
- print_arg(buf, sizeof(buf), 1, 1, args + i);
- printf(".Fl -%s%s Oc\n.Xc\n", args[i].long_name, buf);
- }
- /*
- if(args[i].type == arg_strings)
- fprintf (stderr, "...");
- */
- }
- if (extra_string && *extra_string)
- printf (".Ar %s\n", extra_string);
- printf(".Sh DESCRIPTION\n");
- printf("Supported options:\n");
- printf(".Bl -tag -width Ds\n");
- for(i = 0; i < num_args; i++){
- printf(".It Xo\n");
- if(args[i].short_name){
- printf(".Fl %c", args[i].short_name);
- print_arg(buf, sizeof(buf), 1, 0, args + i);
- printf("%s", buf);
- if(args[i].long_name)
- printf(" Ns ,");
- printf("\n");
- }
- if(args[i].long_name){
- printf(".Fl -%s", args[i].long_name);
- print_arg(buf, sizeof(buf), 1, 1, args + i);
- printf("%s\n", buf);
- }
- printf(".Xc\n");
- if(args[i].help)
- printf("%s\n", args[i].help);
- /*
- if(args[i].type == arg_strings)
- fprintf (stderr, "...");
- */
- }
- printf(".El\n");
- printf(".\\\".Sh ENVIRONMENT\n");
- printf(".\\\".Sh FILES\n");
- printf(".\\\".Sh EXAMPLES\n");
- printf(".\\\".Sh DIAGNOSTICS\n");
- printf(".\\\".Sh SEE ALSO\n");
- printf(".\\\".Sh STANDARDS\n");
- printf(".\\\".Sh HISTORY\n");
- printf(".\\\".Sh AUTHORS\n");
- printf(".\\\".Sh BUGS\n");
-}
-
-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;
-
- if (progname == NULL)
- progname = __progname;
-
- if(getenv("GETARGMANDOC")){
- mandoc_template(args, num_args, progname, extra_string);
- return;
- }
- if(get_window_size(2, &ws) == 0)
- columns = ws.ws_col;
- else
- 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';
- strlcat(buf, "[--", sizeof(buf));
- len += 2;
- if(args[i].type == arg_negative_flag) {
- strlcat(buf, "no-", sizeof(buf));
- len += 3;
- }
- strlcat(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]);
- strlcat(buf, "]", sizeof(buf));
- if(args[i].type == arg_strings)
- strlcat(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]);
- strlcat(buf, "]", sizeof(buf));
- if(args[i].type == arg_strings)
- strlcat(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 argc, char **rargv, int *optind)
-{
- 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)
- && current->type != arg_collect
- && current->type != arg_counter)
- 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;
- }
- case arg_counter :
- {
- int val;
-
- if (*optarg == '\0')
- val = 1;
- else {
- char *endstr;
-
- val = strtol (optarg, &endstr, 0);
- if (endstr == optarg)
- return ARG_ERR_BAD_ARG;
- }
- *(int *)current->value += val;
- return 0;
- }
- case arg_double:
- {
- double tmp;
- if(sscanf(optarg + 1, "%lf", &tmp) != 1)
- return ARG_ERR_BAD_ARG;
- *(double*)current->value = tmp;
- return 0;
- }
- case arg_collect:{
- struct getarg_collect_info *c = current->value;
- int o = argv - rargv[*optind];
- return (*c->func)(FALSE, argc, rargv, optind, &o, c->data);
- }
-
- default:
- abort ();
- }
-}
-
-static int
-arg_match_short (struct getargs *args, size_t num_args,
- char *argv, int argc, char **rargv, int *optind)
-{
- int j, k;
-
- for(j = 1; j > 0 && j < strlen(rargv[*optind]); j++) {
- for(k = 0; k < num_args; k++) {
- char *optarg;
-
- if(args[k].short_name == 0)
- continue;
- if(argv[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(args[k].type == arg_counter) {
- ++*(int *)args[k].value;
- break;
- }
- if(args[k].type == arg_collect) {
- struct getarg_collect_info *c = args[k].value;
-
- if((*c->func)(TRUE, argc, rargv, optind, &j, c->data))
- return ARG_ERR_BAD_ARG;
- break;
- }
-
- if(argv[j + 1])
- optarg = &argv[j + 1];
- else {
- ++*optind;
- optarg = rargv[*optind];
- }
- 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;
- return 0;
- } else if(args[k].type == arg_string) {
- *(char**)args[k].value = optarg;
- return 0;
- } else if(args[k].type == arg_strings) {
- add_string((getarg_strings*)args[k].value, optarg);
- return 0;
- } else if(args[k].type == arg_double) {
- double tmp;
- if(sscanf(optarg, "%lf", &tmp) != 1)
- return ARG_ERR_BAD_ARG;
- *(double*)args[k].value = tmp;
- return 0;
- }
- return ARG_ERR_BAD_ARG;
- }
- }
- if (k == num_args)
- return ARG_ERR_NO_MATCH;
- }
- return 0;
-}
-
-int
-getarg(struct getargs *args, size_t num_args,
- int argc, char **argv, int *optind)
-{
- int i;
- 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,
- argc, argv, &i);
- } else {
- ret = arg_match_short (args, num_args, argv[i],
- argc, argv, &i);
- }
- if(ret)
- break;
- }
- *optind = i;
- return ret;
-}
-
-#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
diff --git a/crypto/kerberosIV/lib/roken/getarg.h b/crypto/kerberosIV/lib/roken/getarg.h
deleted file mode 100644
index 7fd374bba53d..000000000000
--- a/crypto/kerberosIV/lib/roken/getarg.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 1997, 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: getarg.h,v 1.10 1999/12/02 16:58:46 joda Exp $ */
-
-#ifndef __GETARG_H__
-#define __GETARG_H__
-
-#include <stddef.h>
-
-struct getargs{
- const char *long_name;
- char short_name;
- enum { arg_integer,
- arg_string,
- arg_flag,
- arg_negative_flag,
- arg_strings,
- arg_double,
- arg_collect,
- arg_counter
- } 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;
-
-typedef int (*getarg_collect_func)(int short_opt,
- int argc,
- char **argv,
- int *optind,
- int *optarg,
- void *data);
-
-typedef struct getarg_collect_info {
- getarg_collect_func func;
- void *data;
-} getarg_collect_info;
-
-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__ */
diff --git a/crypto/kerberosIV/lib/roken/getcap.c b/crypto/kerberosIV/lib/roken/getcap.c
deleted file mode 100644
index 997fabf253cd..000000000000
--- a/crypto/kerberosIV/lib/roken/getcap.c
+++ /dev/null
@@ -1,1118 +0,0 @@
-/* $NetBSD: getcap.c,v 1.29 1999/03/29 09:27:29 abs Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Casey Leedom of Lawrence Livermore National Laboratory.
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "roken.h"
-RCSID("$Id: getcap.c,v 1.7 1999/11/17 21:11:58 assar Exp $");
-
-#include <sys/types.h>
-#include <ctype.h>
-#if defined(HAVE_DB_185_H)
-#include <db_185.h>
-#elif defined(HAVE_DB_H)
-#include <db.h>
-#endif
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#define BFRAG 1024
-#if 0
-#define BSIZE 1024
-#endif
-#define ESC ('[' & 037) /* ASCII ESC */
-#define MAX_RECURSION 32 /* maximum getent recursion */
-#define SFRAG 100 /* cgetstr mallocs in SFRAG chunks */
-
-#define RECOK (char)0
-#define TCERR (char)1
-#define SHADOW (char)2
-
-static size_t topreclen; /* toprec length */
-static char *toprec; /* Additional record specified by cgetset() */
-static int gottoprec; /* Flag indicating retrieval of toprecord */
-
-#if defined(HAVE_DBOPEN) && defined(HAVE_DB_H)
-#define USE_DB
-#endif
-
-#ifdef USE_DB
-static int cdbget (DB *, char **, const char *);
-#endif
-static int getent (char **, size_t *, char **, int, const char *, int, char *);
-static int nfcmp (char *, char *);
-
-
-int cgetset(const char *ent);
-char *cgetcap(char *buf, const char *cap, int type);
-int cgetent(char **buf, char **db_array, const char *name);
-int cgetmatch(const char *buf, const char *name);
-int cgetclose(void);
-#if 0
-int cgetfirst(char **buf, char **db_array);
-int cgetnext(char **bp, char **db_array);
-#endif
-int cgetstr(char *buf, const char *cap, char **str);
-int cgetustr(char *buf, const char *cap, char **str);
-int cgetnum(char *buf, const char *cap, long *num);
-/*
- * Cgetset() allows the addition of a user specified buffer to be added
- * to the database array, in effect "pushing" the buffer on top of the
- * virtual database. 0 is returned on success, -1 on failure.
- */
-int
-cgetset(const char *ent)
-{
- const char *source, *check;
- char *dest;
-
- if (ent == NULL) {
- if (toprec)
- free(toprec);
- toprec = NULL;
- topreclen = 0;
- return (0);
- }
- topreclen = strlen(ent);
- if ((toprec = malloc (topreclen + 1)) == NULL) {
- errno = ENOMEM;
- return (-1);
- }
- gottoprec = 0;
-
- source=ent;
- dest=toprec;
- while (*source) { /* Strip whitespace */
- *dest++ = *source++; /* Do not check first field */
- while (*source == ':') {
- check=source+1;
- while (*check && (isspace((unsigned char)*check) ||
- (*check=='\\' && isspace((unsigned char)check[1]))))
- ++check;
- if( *check == ':' )
- source=check;
- else
- break;
-
- }
- }
- *dest=0;
-
- return (0);
-}
-
-/*
- * Cgetcap searches the capability record buf for the capability cap with
- * type `type'. A pointer to the value of cap is returned on success, NULL
- * if the requested capability couldn't be found.
- *
- * Specifying a type of ':' means that nothing should follow cap (:cap:).
- * In this case a pointer to the terminating ':' or NUL will be returned if
- * cap is found.
- *
- * If (cap, '@') or (cap, terminator, '@') is found before (cap, terminator)
- * return NULL.
- */
-char *
-cgetcap(char *buf, const char *cap, int type)
-{
- char *bp;
- const char *cp;
-
- bp = buf;
- for (;;) {
- /*
- * Skip past the current capability field - it's either the
- * name field if this is the first time through the loop, or
- * the remainder of a field whose name failed to match cap.
- */
- for (;;)
- if (*bp == '\0')
- return (NULL);
- else
- if (*bp++ == ':')
- break;
-
- /*
- * Try to match (cap, type) in buf.
- */
- for (cp = cap; *cp == *bp && *bp != '\0'; cp++, bp++)
- continue;
- if (*cp != '\0')
- continue;
- if (*bp == '@')
- return (NULL);
- if (type == ':') {
- if (*bp != '\0' && *bp != ':')
- continue;
- return(bp);
- }
- if (*bp != type)
- continue;
- bp++;
- return (*bp == '@' ? NULL : bp);
- }
- /* NOTREACHED */
-}
-
-/*
- * Cgetent extracts the capability record name from the NULL terminated file
- * array db_array and returns a pointer to a malloc'd copy of it in buf.
- * Buf must be retained through all subsequent calls to cgetcap, cgetnum,
- * cgetflag, and cgetstr, but may then be free'd. 0 is returned on success,
- * -1 if the requested record couldn't be found, -2 if a system error was
- * encountered (couldn't open/read a file, etc.), and -3 if a potential
- * reference loop is detected.
- */
-int
-cgetent(char **buf, char **db_array, const char *name)
-{
- size_t dummy;
-
- return (getent(buf, &dummy, db_array, -1, name, 0, NULL));
-}
-
-/*
- * Getent implements the functions of cgetent. If fd is non-negative,
- * *db_array has already been opened and fd is the open file descriptor. We
- * do this to save time and avoid using up file descriptors for tc=
- * recursions.
- *
- * Getent returns the same success/failure codes as cgetent. On success, a
- * pointer to a malloc'ed capability record with all tc= capabilities fully
- * expanded and its length (not including trailing ASCII NUL) are left in
- * *cap and *len.
- *
- * Basic algorithm:
- * + Allocate memory incrementally as needed in chunks of size BFRAG
- * for capability buffer.
- * + Recurse for each tc=name and interpolate result. Stop when all
- * names interpolated, a name can't be found, or depth exceeds
- * MAX_RECURSION.
- */
-static int
-getent(char **cap, size_t *len, char **db_array, int fd,
- const char *name, int depth, char *nfield)
-{
- char *r_end, *rp = NULL, **db_p; /* pacify gcc */
- int myfd = 0, eof, foundit;
- char *record;
- int tc_not_resolved;
-
- /*
- * Return with ``loop detected'' error if we've recursed more than
- * MAX_RECURSION times.
- */
- if (depth > MAX_RECURSION)
- return (-3);
-
- /*
- * Check if we have a top record from cgetset().
- */
- if (depth == 0 && toprec != NULL && cgetmatch(toprec, name) == 0) {
- if ((record = malloc (topreclen + BFRAG)) == NULL) {
- errno = ENOMEM;
- return (-2);
- }
- (void)strcpy(record, toprec); /* XXX: strcpy is safe */
- db_p = db_array;
- rp = record + topreclen + 1;
- r_end = rp + BFRAG;
- goto tc_exp;
- }
- /*
- * Allocate first chunk of memory.
- */
- if ((record = malloc(BFRAG)) == NULL) {
- errno = ENOMEM;
- return (-2);
- }
- r_end = record + BFRAG;
- foundit = 0;
- /*
- * Loop through database array until finding the record.
- */
-
- for (db_p = db_array; *db_p != NULL; db_p++) {
- eof = 0;
-
- /*
- * Open database if not already open.
- */
-
- if (fd >= 0) {
- (void)lseek(fd, (off_t)0, SEEK_SET);
- } else {
-#ifdef USE_DB
- char pbuf[_POSIX_PATH_MAX];
- char *cbuf;
- size_t clen;
- int retval;
- DB *capdbp;
-
- (void)snprintf(pbuf, sizeof(pbuf), "%s.db", *db_p);
- if ((capdbp = dbopen(pbuf, O_RDONLY, 0, DB_HASH, 0))
- != NULL) {
- free(record);
- retval = cdbget(capdbp, &record, name);
- if (retval < 0) {
- /* no record available */
- (void)capdbp->close(capdbp);
- return (retval);
- }
- /* save the data; close frees it */
- clen = strlen(record);
- cbuf = malloc(clen + 1);
- memmove(cbuf, record, clen + 1);
- if (capdbp->close(capdbp) < 0) {
- free(cbuf);
- return (-2);
- }
- *len = clen;
- *cap = cbuf;
- return (retval);
- } else
-#endif
- {
- fd = open(*db_p, O_RDONLY, 0);
- if (fd < 0) {
- /* No error on unfound file. */
- continue;
- }
- myfd = 1;
- }
- }
- /*
- * Find the requested capability record ...
- */
- {
- char buf[BUFSIZ];
- char *b_end, *bp, *cp;
- int c, slash;
-
- /*
- * Loop invariants:
- * There is always room for one more character in record.
- * R_end always points just past end of record.
- * Rp always points just past last character in record.
- * B_end always points just past last character in buf.
- * Bp always points at next character in buf.
- * Cp remembers where the last colon was.
- */
- b_end = buf;
- bp = buf;
- cp = 0;
- slash = 0;
- for (;;) {
-
- /*
- * Read in a line implementing (\, newline)
- * line continuation.
- */
- rp = record;
- for (;;) {
- if (bp >= b_end) {
- int n;
-
- n = read(fd, buf, sizeof(buf));
- if (n <= 0) {
- if (myfd)
- (void)close(fd);
- if (n < 0) {
- free(record);
- return (-2);
- } else {
- fd = -1;
- eof = 1;
- break;
- }
- }
- b_end = buf+n;
- bp = buf;
- }
-
- c = *bp++;
- if (c == '\n') {
- if (slash) {
- slash = 0;
- rp--;
- continue;
- } else
- break;
- }
- if (slash) {
- slash = 0;
- cp = 0;
- }
- if (c == ':') {
- /*
- * If the field was `empty' (i.e.
- * contained only white space), back up
- * to the colon (eliminating the
- * field).
- */
- if (cp)
- rp = cp;
- else
- cp = rp;
- } else if (c == '\\') {
- slash = 1;
- } else if (c != ' ' && c != '\t') {
- /*
- * Forget where the colon was, as this
- * is not an empty field.
- */
- cp = 0;
- }
- *rp++ = c;
-
- /*
- * Enforce loop invariant: if no room
- * left in record buffer, try to get
- * some more.
- */
- if (rp >= r_end) {
- u_int pos;
- size_t newsize;
-
- pos = rp - record;
- newsize = r_end - record + BFRAG;
- record = realloc(record, newsize);
- if (record == NULL) {
- errno = ENOMEM;
- if (myfd)
- (void)close(fd);
- return (-2);
- }
- r_end = record + newsize;
- rp = record + pos;
- }
- }
- /* Eliminate any white space after the last colon. */
- if (cp)
- rp = cp + 1;
- /* Loop invariant lets us do this. */
- *rp++ = '\0';
-
- /*
- * If encountered eof check next file.
- */
- if (eof)
- break;
-
- /*
- * Toss blank lines and comments.
- */
- if (*record == '\0' || *record == '#')
- continue;
-
- /*
- * See if this is the record we want ...
- */
- if (cgetmatch(record, name) == 0) {
- if (nfield == NULL || !nfcmp(nfield, record)) {
- foundit = 1;
- break; /* found it! */
- }
- }
- }
- }
- if (foundit)
- break;
- }
-
- if (!foundit)
- return (-1);
-
- /*
- * Got the capability record, but now we have to expand all tc=name
- * references in it ...
- */
- tc_exp: {
- char *newicap, *s;
- size_t ilen, newilen;
- int diff, iret, tclen;
- char *icap, *scan, *tc, *tcstart, *tcend;
-
- /*
- * Loop invariants:
- * There is room for one more character in record.
- * R_end points just past end of record.
- * Rp points just past last character in record.
- * Scan points at remainder of record that needs to be
- * scanned for tc=name constructs.
- */
- scan = record;
- tc_not_resolved = 0;
- for (;;) {
- if ((tc = cgetcap(scan, "tc", '=')) == NULL)
- break;
-
- /*
- * Find end of tc=name and stomp on the trailing `:'
- * (if present) so we can use it to call ourselves.
- */
- s = tc;
- for (;;)
- if (*s == '\0')
- break;
- else
- if (*s++ == ':') {
- *(s - 1) = '\0';
- break;
- }
- tcstart = tc - 3;
- tclen = s - tcstart;
- tcend = s;
-
- iret = getent(&icap, &ilen, db_p, fd, tc, depth+1,
- NULL);
- newicap = icap; /* Put into a register. */
- newilen = ilen;
- if (iret != 0) {
- /* an error */
- if (iret < -1) {
- if (myfd)
- (void)close(fd);
- free(record);
- return (iret);
- }
- if (iret == 1)
- tc_not_resolved = 1;
- /* couldn't resolve tc */
- if (iret == -1) {
- *(s - 1) = ':';
- scan = s - 1;
- tc_not_resolved = 1;
- continue;
-
- }
- }
- /* not interested in name field of tc'ed record */
- s = newicap;
- for (;;)
- if (*s == '\0')
- break;
- else
- if (*s++ == ':')
- break;
- newilen -= s - newicap;
- newicap = s;
-
- /* make sure interpolated record is `:'-terminated */
- s += newilen;
- if (*(s-1) != ':') {
- *s = ':'; /* overwrite NUL with : */
- newilen++;
- }
-
- /*
- * Make sure there's enough room to insert the
- * new record.
- */
- diff = newilen - tclen;
- if (diff >= r_end - rp) {
- u_int pos, tcpos, tcposend;
- size_t newsize;
-
- pos = rp - record;
- newsize = r_end - record + diff + BFRAG;
- tcpos = tcstart - record;
- tcposend = tcend - record;
- record = realloc(record, newsize);
- if (record == NULL) {
- errno = ENOMEM;
- if (myfd)
- (void)close(fd);
- free(icap);
- return (-2);
- }
- r_end = record + newsize;
- rp = record + pos;
- tcstart = record + tcpos;
- tcend = record + tcposend;
- }
-
- /*
- * Insert tc'ed record into our record.
- */
- s = tcstart + newilen;
- memmove(s, tcend, (size_t)(rp - tcend));
- memmove(tcstart, newicap, newilen);
- rp += diff;
- free(icap);
-
- /*
- * Start scan on `:' so next cgetcap works properly
- * (cgetcap always skips first field).
- */
- scan = s-1;
- }
-
- }
- /*
- * Close file (if we opened it), give back any extra memory, and
- * return capability, length and success.
- */
- if (myfd)
- (void)close(fd);
- *len = rp - record - 1; /* don't count NUL */
- if (r_end > rp)
- if ((record =
- realloc(record, (size_t)(rp - record))) == NULL) {
- errno = ENOMEM;
- return (-2);
- }
-
- *cap = record;
- if (tc_not_resolved)
- return (1);
- return (0);
-}
-
-#ifdef USE_DB
-static int
-cdbget(DB *capdbp, char **bp, const char *name)
-{
- DBT key;
- DBT data;
-
- /* LINTED key is not modified */
- key.data = (char *)name;
- key.size = strlen(name);
-
- for (;;) {
- /* Get the reference. */
- switch(capdbp->get(capdbp, &key, &data, 0)) {
- case -1:
- return (-2);
- case 1:
- return (-1);
- }
-
- /* If not an index to another record, leave. */
- if (((char *)data.data)[0] != SHADOW)
- break;
-
- key.data = (char *)data.data + 1;
- key.size = data.size - 1;
- }
-
- *bp = (char *)data.data + 1;
- return (((char *)(data.data))[0] == TCERR ? 1 : 0);
-}
-#endif /* USE_DB */
-
-/*
- * Cgetmatch will return 0 if name is one of the names of the capability
- * record buf, -1 if not.
- */
-int
-cgetmatch(const char *buf, const char *name)
-{
- const char *np, *bp;
-
- /*
- * Start search at beginning of record.
- */
- bp = buf;
- for (;;) {
- /*
- * Try to match a record name.
- */
- np = name;
- for (;;)
- if (*np == '\0') {
- if (*bp == '|' || *bp == ':' || *bp == '\0')
- return (0);
- else
- break;
- } else
- if (*bp++ != *np++)
- break;
-
- /*
- * Match failed, skip to next name in record.
- */
- bp--; /* a '|' or ':' may have stopped the match */
- for (;;)
- if (*bp == '\0' || *bp == ':')
- return (-1); /* match failed totally */
- else
- if (*bp++ == '|')
- break; /* found next name */
- }
-}
-
-#if 0
-int
-cgetfirst(char **buf, char **db_array)
-{
- (void)cgetclose();
- return (cgetnext(buf, db_array));
-}
-#endif
-
-static FILE *pfp;
-static int slash;
-static char **dbp;
-
-int
-cgetclose(void)
-{
- if (pfp != NULL) {
- (void)fclose(pfp);
- pfp = NULL;
- }
- dbp = NULL;
- gottoprec = 0;
- slash = 0;
- return(0);
-}
-
-#if 0
-/*
- * Cgetnext() gets either the first or next entry in the logical database
- * specified by db_array. It returns 0 upon completion of the database, 1
- * upon returning an entry with more remaining, and -1 if an error occurs.
- */
-int
-cgetnext(char **bp, char **db_array)
-{
- size_t len;
- int status, done;
- char *cp, *line, *rp, *np, buf[BSIZE], nbuf[BSIZE];
- size_t dummy;
-
- if (dbp == NULL)
- dbp = db_array;
-
- if (pfp == NULL && (pfp = fopen(*dbp, "r")) == NULL) {
- (void)cgetclose();
- return (-1);
- }
- for(;;) {
- if (toprec && !gottoprec) {
- gottoprec = 1;
- line = toprec;
- } else {
- line = fgetln(pfp, &len);
- if (line == NULL && pfp) {
- if (ferror(pfp)) {
- (void)cgetclose();
- return (-1);
- } else {
- (void)fclose(pfp);
- pfp = NULL;
- if (*++dbp == NULL) {
- (void)cgetclose();
- return (0);
- } else if ((pfp =
- fopen(*dbp, "r")) == NULL) {
- (void)cgetclose();
- return (-1);
- } else
- continue;
- }
- } else
- line[len - 1] = '\0';
- if (len == 1) {
- slash = 0;
- continue;
- }
- if (isspace((unsigned char)*line) ||
- *line == ':' || *line == '#' || slash) {
- if (line[len - 2] == '\\')
- slash = 1;
- else
- slash = 0;
- continue;
- }
- if (line[len - 2] == '\\')
- slash = 1;
- else
- slash = 0;
- }
-
-
- /*
- * Line points to a name line.
- */
- done = 0;
- np = nbuf;
- for (;;) {
- for (cp = line; *cp != '\0'; cp++) {
- if (*cp == ':') {
- *np++ = ':';
- done = 1;
- break;
- }
- if (*cp == '\\')
- break;
- *np++ = *cp;
- }
- if (done) {
- *np = '\0';
- break;
- } else { /* name field extends beyond the line */
- line = fgetln(pfp, &len);
- if (line == NULL && pfp) {
- if (ferror(pfp)) {
- (void)cgetclose();
- return (-1);
- }
- (void)fclose(pfp);
- pfp = NULL;
- *np = '\0';
- break;
- } else
- line[len - 1] = '\0';
- }
- }
- rp = buf;
- for(cp = nbuf; *cp != '\0'; cp++)
- if (*cp == '|' || *cp == ':')
- break;
- else
- *rp++ = *cp;
-
- *rp = '\0';
- /*
- * XXX
- * Last argument of getent here should be nbuf if we want true
- * sequential access in the case of duplicates.
- * With NULL, getent will return the first entry found
- * rather than the duplicate entry record. This is a
- * matter of semantics that should be resolved.
- */
- status = getent(bp, &dummy, db_array, -1, buf, 0, NULL);
- if (status == -2 || status == -3)
- (void)cgetclose();
-
- return (status + 1);
- }
- /* NOTREACHED */
-}
-#endif
-
-/*
- * Cgetstr retrieves the value of the string capability cap from the
- * capability record pointed to by buf. A pointer to a decoded, NUL
- * terminated, malloc'd copy of the string is returned in the char *
- * pointed to by str. The length of the string not including the trailing
- * NUL is returned on success, -1 if the requested string capability
- * couldn't be found, -2 if a system error was encountered (storage
- * allocation failure).
- */
-int
-cgetstr(char *buf, const char *cap, char **str)
-{
- u_int m_room;
- const char *bp;
- char *mp;
- int len;
- char *mem;
-
- /*
- * Find string capability cap
- */
- bp = cgetcap(buf, cap, '=');
- if (bp == NULL)
- return (-1);
-
- /*
- * Conversion / storage allocation loop ... Allocate memory in
- * chunks SFRAG in size.
- */
- if ((mem = malloc(SFRAG)) == NULL) {
- errno = ENOMEM;
- return (-2); /* couldn't even allocate the first fragment */
- }
- m_room = SFRAG;
- mp = mem;
-
- while (*bp != ':' && *bp != '\0') {
- /*
- * Loop invariants:
- * There is always room for one more character in mem.
- * Mp always points just past last character in mem.
- * Bp always points at next character in buf.
- */
- if (*bp == '^') {
- bp++;
- if (*bp == ':' || *bp == '\0')
- break; /* drop unfinished escape */
- *mp++ = *bp++ & 037;
- } else if (*bp == '\\') {
- bp++;
- if (*bp == ':' || *bp == '\0')
- break; /* drop unfinished escape */
- if ('0' <= *bp && *bp <= '7') {
- int n, i;
-
- n = 0;
- i = 3; /* maximum of three octal digits */
- do {
- n = n * 8 + (*bp++ - '0');
- } while (--i && '0' <= *bp && *bp <= '7');
- *mp++ = n;
- }
- else switch (*bp++) {
- case 'b': case 'B':
- *mp++ = '\b';
- break;
- case 't': case 'T':
- *mp++ = '\t';
- break;
- case 'n': case 'N':
- *mp++ = '\n';
- break;
- case 'f': case 'F':
- *mp++ = '\f';
- break;
- case 'r': case 'R':
- *mp++ = '\r';
- break;
- case 'e': case 'E':
- *mp++ = ESC;
- break;
- case 'c': case 'C':
- *mp++ = ':';
- break;
- default:
- /*
- * Catches '\', '^', and
- * everything else.
- */
- *mp++ = *(bp-1);
- break;
- }
- } else
- *mp++ = *bp++;
- m_room--;
-
- /*
- * Enforce loop invariant: if no room left in current
- * buffer, try to get some more.
- */
- if (m_room == 0) {
- size_t size = mp - mem;
-
- if ((mem = realloc(mem, size + SFRAG)) == NULL)
- return (-2);
- m_room = SFRAG;
- mp = mem + size;
- }
- }
- *mp++ = '\0'; /* loop invariant let's us do this */
- m_room--;
- len = mp - mem - 1;
-
- /*
- * Give back any extra memory and return value and success.
- */
- if (m_room != 0)
- if ((mem = realloc(mem, (size_t)(mp - mem))) == NULL)
- return (-2);
- *str = mem;
- return (len);
-}
-
-/*
- * Cgetustr retrieves the value of the string capability cap from the
- * capability record pointed to by buf. The difference between cgetustr()
- * and cgetstr() is that cgetustr does not decode escapes but rather treats
- * all characters literally. A pointer to a NUL terminated malloc'd
- * copy of the string is returned in the char pointed to by str. The
- * length of the string not including the trailing NUL is returned on success,
- * -1 if the requested string capability couldn't be found, -2 if a system
- * error was encountered (storage allocation failure).
- */
-int
-cgetustr(char *buf, const char *cap, char **str)
-{
- u_int m_room;
- const char *bp;
- char *mp;
- int len;
- char *mem;
-
- /*
- * Find string capability cap
- */
- if ((bp = cgetcap(buf, cap, '=')) == NULL)
- return (-1);
-
- /*
- * Conversion / storage allocation loop ... Allocate memory in
- * chunks SFRAG in size.
- */
- if ((mem = malloc(SFRAG)) == NULL) {
- errno = ENOMEM;
- return (-2); /* couldn't even allocate the first fragment */
- }
- m_room = SFRAG;
- mp = mem;
-
- while (*bp != ':' && *bp != '\0') {
- /*
- * Loop invariants:
- * There is always room for one more character in mem.
- * Mp always points just past last character in mem.
- * Bp always points at next character in buf.
- */
- *mp++ = *bp++;
- m_room--;
-
- /*
- * Enforce loop invariant: if no room left in current
- * buffer, try to get some more.
- */
- if (m_room == 0) {
- size_t size = mp - mem;
-
- if ((mem = realloc(mem, size + SFRAG)) == NULL)
- return (-2);
- m_room = SFRAG;
- mp = mem + size;
- }
- }
- *mp++ = '\0'; /* loop invariant let's us do this */
- m_room--;
- len = mp - mem - 1;
-
- /*
- * Give back any extra memory and return value and success.
- */
- if (m_room != 0)
- if ((mem = realloc(mem, (size_t)(mp - mem))) == NULL)
- return (-2);
- *str = mem;
- return (len);
-}
-
-/*
- * Cgetnum retrieves the value of the numeric capability cap from the
- * capability record pointed to by buf. The numeric value is returned in
- * the long pointed to by num. 0 is returned on success, -1 if the requested
- * numeric capability couldn't be found.
- */
-int
-cgetnum(char *buf, const char *cap, long *num)
-{
- long n;
- int base, digit;
- const char *bp;
-
- /*
- * Find numeric capability cap
- */
- bp = cgetcap(buf, cap, '#');
- if (bp == NULL)
- return (-1);
-
- /*
- * Look at value and determine numeric base:
- * 0x... or 0X... hexadecimal,
- * else 0... octal,
- * else decimal.
- */
- if (*bp == '0') {
- bp++;
- if (*bp == 'x' || *bp == 'X') {
- bp++;
- base = 16;
- } else
- base = 8;
- } else
- base = 10;
-
- /*
- * Conversion loop ...
- */
- n = 0;
- for (;;) {
- if ('0' <= *bp && *bp <= '9')
- digit = *bp - '0';
- else if ('a' <= *bp && *bp <= 'f')
- digit = 10 + *bp - 'a';
- else if ('A' <= *bp && *bp <= 'F')
- digit = 10 + *bp - 'A';
- else
- break;
-
- if (digit >= base)
- break;
-
- n = n * base + digit;
- bp++;
- }
-
- /*
- * Return value and success.
- */
- *num = n;
- return (0);
-}
-
-
-/*
- * Compare name field of record.
- */
-static int
-nfcmp(char *nf, char *rec)
-{
- char *cp, tmp;
- int ret;
-
- for (cp = rec; *cp != ':'; cp++)
- ;
-
- tmp = *(cp + 1);
- *(cp + 1) = '\0';
- ret = strcmp(nf, rec);
- *(cp + 1) = tmp;
-
- return (ret);
-}
diff --git a/crypto/kerberosIV/lib/roken/getegid.c b/crypto/kerberosIV/lib/roken/getegid.c
deleted file mode 100644
index b6eab857e41a..000000000000
--- a/crypto/kerberosIV/lib/roken/getegid.c
+++ /dev/null
@@ -1,48 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "roken.h"
-
-#ifndef HAVE_GETEGID
-
-RCSID("$Id: getegid.c,v 1.2 1999/12/02 16:58:46 joda Exp $");
-
-int getegid(void)
-{
- return getgid();
-}
-
-#endif
diff --git a/crypto/kerberosIV/lib/roken/geteuid.c b/crypto/kerberosIV/lib/roken/geteuid.c
deleted file mode 100644
index 4bdf531bf921..000000000000
--- a/crypto/kerberosIV/lib/roken/geteuid.c
+++ /dev/null
@@ -1,48 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "roken.h"
-
-#ifndef HAVE_GETEUID
-
-RCSID("$Id: geteuid.c,v 1.2 1999/12/02 16:58:46 joda Exp $");
-
-int geteuid(void)
-{
- return getuid();
-}
-
-#endif
diff --git a/crypto/kerberosIV/lib/roken/getgid.c b/crypto/kerberosIV/lib/roken/getgid.c
deleted file mode 100644
index f2ca01a69982..000000000000
--- a/crypto/kerberosIV/lib/roken/getgid.c
+++ /dev/null
@@ -1,48 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "roken.h"
-
-#ifndef HAVE_GETGID
-
-RCSID("$Id: getgid.c,v 1.2 1999/12/02 16:58:46 joda Exp $");
-
-int getgid(void)
-{
- return 17;
-}
-
-#endif
diff --git a/crypto/kerberosIV/lib/roken/gethostname.c b/crypto/kerberosIV/lib/roken/gethostname.c
deleted file mode 100644
index 753ba9f1b6b9..000000000000
--- a/crypto/kerberosIV/lib/roken/gethostname.c
+++ /dev/null
@@ -1,72 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "roken.h"
-
-#ifndef HAVE_GETHOSTNAME
-
-#ifdef HAVE_SYS_UTSNAME_H
-#include <sys/utsname.h>
-#endif
-
-/*
- * Return the local host's name in "name", up to "namelen" characters.
- * "name" will be null-terminated if "namelen" is big enough.
- * The return code is 0 on success, -1 on failure. (The calling
- * interface is identical to gethostname(2).)
- */
-
-int
-gethostname(char *name, int namelen)
-{
-#if defined(HAVE_UNAME)
- {
- struct utsname utsname;
- int ret;
-
- ret = uname (&utsname);
- if (ret < 0)
- return ret;
- strlcpy (name, utsname.nodename, namelen);
- return 0;
- }
-#else
- strlcpy (name, "some.random.host", namelen);
- return 0;
-#endif
-}
-
-#endif /* GETHOSTNAME */
diff --git a/crypto/kerberosIV/lib/roken/getipnodebyaddr.c b/crypto/kerberosIV/lib/roken/getipnodebyaddr.c
deleted file mode 100644
index f22aad7f73cb..000000000000
--- a/crypto/kerberosIV/lib/roken/getipnodebyaddr.c
+++ /dev/null
@@ -1,74 +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 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: getipnodebyaddr.c,v 1.2 1999/12/02 16:58:46 joda Exp $");
-#endif
-
-#include "roken.h"
-
-/*
- * lookup `src, len' (address family `af') in DNS and return a pointer
- * to a malloced struct hostent or NULL.
- */
-
-struct hostent *
-getipnodebyaddr (const void *src, size_t len, int af, int *error_num)
-{
- struct hostent *tmp;
-
- tmp = gethostbyaddr (src, len, af);
- if (tmp == NULL) {
- switch (h_errno) {
- case HOST_NOT_FOUND :
- case TRY_AGAIN :
- case NO_RECOVERY :
- *error_num = h_errno;
- break;
- case NO_DATA :
- *error_num = NO_ADDRESS;
- break;
- default :
- *error_num = NO_RECOVERY;
- break;
- }
- return NULL;
- }
- tmp = copyhostent (tmp);
- if (tmp == NULL) {
- *error_num = TRY_AGAIN;
- return NULL;
- }
- return tmp;
-}
diff --git a/crypto/kerberosIV/lib/roken/getipnodebyname.c b/crypto/kerberosIV/lib/roken/getipnodebyname.c
deleted file mode 100644
index 576feef0aea6..000000000000
--- a/crypto/kerberosIV/lib/roken/getipnodebyname.c
+++ /dev/null
@@ -1,86 +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 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: getipnodebyname.c,v 1.3 1999/12/02 16:58:46 joda Exp $");
-#endif
-
-#include "roken.h"
-
-#ifndef HAVE_H_ERRNO
-static int h_errno = NO_RECOVERY;
-#endif
-
-/*
- * lookup `name' (address family `af') in DNS and return a pointer
- * to a malloced struct hostent or NULL.
- */
-
-struct hostent *
-getipnodebyname (const char *name, int af, int flags, int *error_num)
-{
- struct hostent *tmp;
-
-#ifdef HAVE_GETHOSTBYNAME2
- tmp = gethostbyname2 (name, af);
-#else
- if (af != AF_INET) {
- *error_num = NO_ADDRESS;
- return NULL;
- }
- tmp = gethostbyname (name);
-#endif
- if (tmp == NULL) {
- switch (h_errno) {
- case HOST_NOT_FOUND :
- case TRY_AGAIN :
- case NO_RECOVERY :
- *error_num = h_errno;
- break;
- case NO_DATA :
- *error_num = NO_ADDRESS;
- break;
- default :
- *error_num = NO_RECOVERY;
- break;
- }
- return NULL;
- }
- tmp = copyhostent (tmp);
- if (tmp == NULL) {
- *error_num = TRY_AGAIN;
- return NULL;
- }
- return tmp;
-}
diff --git a/crypto/kerberosIV/lib/roken/gettimeofday.c b/crypto/kerberosIV/lib/roken/gettimeofday.c
deleted file mode 100644
index ec8b62f64e76..000000000000
--- a/crypto/kerberosIV/lib/roken/gettimeofday.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "roken.h"
-#ifndef HAVE_GETTIMEOFDAY
-
-RCSID("$Id: gettimeofday.c,v 1.8 1999/12/02 16:58:46 joda Exp $");
-
-/*
- * Simple gettimeofday that only returns seconds.
- */
-int
-gettimeofday (struct timeval *tp, void *ignore)
-{
- time_t t;
-
- t = time(NULL);
- tp->tv_sec = t;
- tp->tv_usec = 0;
- return 0;
-}
-#endif
diff --git a/crypto/kerberosIV/lib/roken/getuid.c b/crypto/kerberosIV/lib/roken/getuid.c
deleted file mode 100644
index 6ebce0a810cd..000000000000
--- a/crypto/kerberosIV/lib/roken/getuid.c
+++ /dev/null
@@ -1,48 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "roken.h"
-
-#ifndef HAVE_GETUID
-
-RCSID("$Id: getuid.c,v 1.3 1999/12/02 16:58:46 joda Exp $");
-
-int getuid(void)
-{
- return 17;
-}
-
-#endif
diff --git a/crypto/kerberosIV/lib/roken/glob.c b/crypto/kerberosIV/lib/roken/glob.c
deleted file mode 100644
index 66e8ec6db8cb..000000000000
--- a/crypto/kerberosIV/lib/roken/glob.c
+++ /dev/null
@@ -1,835 +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(3) -- a superset of the one defined in POSIX 1003.2.
- *
- * The [!...] convention to negate a range is supported (SysV, Posix, ksh).
- *
- * Optional extra services, controlled by flags not defined by POSIX:
- *
- * GLOB_QUOTE:
- * Escaping convention: \ inhibits any special meaning the following
- * character might have (except \ at end of string is retained).
- * GLOB_MAGCHAR:
- * Set in gl_flags if pattern contained a globbing character.
- * GLOB_NOMAGIC:
- * Same as GLOB_NOCHECK, but it will only append pattern if it did
- * not contain any magic characters. [Used in csh style globbing]
- * GLOB_ALTDIRFUNC:
- * Use alternately specified directory access functions.
- * GLOB_TILDE:
- * expand ~user/foo to the /home/dir/of/user/foo
- * GLOB_BRACE:
- * expand {1,2}{a,b} to 1a 1b 2a 2b
- * gl_matchc:
- * Number of matches in the current invocation of glob.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#include <ctype.h>
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-#include <errno.h>
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "glob.h"
-#include "roken.h"
-
-#define CHAR_DOLLAR '$'
-#define CHAR_DOT '.'
-#define CHAR_EOS '\0'
-#define CHAR_LBRACKET '['
-#define CHAR_NOT '!'
-#define CHAR_QUESTION '?'
-#define CHAR_QUOTE '\\'
-#define CHAR_RANGE '-'
-#define CHAR_RBRACKET ']'
-#define CHAR_SEP '/'
-#define CHAR_STAR '*'
-#define CHAR_TILDE '~'
-#define CHAR_UNDERSCORE '_'
-#define CHAR_LBRACE '{'
-#define CHAR_RBRACE '}'
-#define CHAR_SLASH '/'
-#define CHAR_COMMA ','
-
-#ifndef DEBUG
-
-#define M_QUOTE 0x8000
-#define M_PROTECT 0x4000
-#define M_MASK 0xffff
-#define M_ASCII 0x00ff
-
-typedef u_short Char;
-
-#else
-
-#define M_QUOTE 0x80
-#define M_PROTECT 0x40
-#define M_MASK 0xff
-#define M_ASCII 0x7f
-
-typedef char Char;
-
-#endif
-
-
-#define CHAR(c) ((Char)((c)&M_ASCII))
-#define META(c) ((Char)((c)|M_QUOTE))
-#define M_ALL META('*')
-#define M_END META(']')
-#define M_NOT META('!')
-#define M_ONE META('?')
-#define M_RNG META('-')
-#define M_SET META('[')
-#define ismeta(c) (((c)&M_QUOTE) != 0)
-
-
-static int compare (const void *, const void *);
-static void g_Ctoc (const Char *, char *);
-static int g_lstat (Char *, struct stat *, glob_t *);
-static DIR *g_opendir (Char *, glob_t *);
-static Char *g_strchr (Char *, int);
-#ifdef notdef
-static Char *g_strcat (Char *, const Char *);
-#endif
-static int g_stat (Char *, struct stat *, glob_t *);
-static int glob0 (const Char *, glob_t *);
-static int glob1 (Char *, glob_t *);
-static int glob2 (Char *, Char *, Char *, glob_t *);
-static int glob3 (Char *, Char *, Char *, Char *, glob_t *);
-static int globextend (const Char *, glob_t *);
-static const Char * globtilde (const Char *, Char *, glob_t *);
-static int globexp1 (const Char *, glob_t *);
-static int globexp2 (const Char *, const Char *, glob_t *, int *);
-static int match (Char *, Char *, Char *);
-#ifdef DEBUG
-static void qprintf (const char *, Char *);
-#endif
-
-int
-glob(const char *pattern,
- int flags,
- int (*errfunc)(const char *, int),
- glob_t *pglob)
-{
- const u_char *patnext;
- int c;
- Char *bufnext, *bufend, patbuf[MaxPathLen+1];
-
- patnext = (u_char *) pattern;
- if (!(flags & GLOB_APPEND)) {
- pglob->gl_pathc = 0;
- pglob->gl_pathv = NULL;
- if (!(flags & GLOB_DOOFFS))
- pglob->gl_offs = 0;
- }
- pglob->gl_flags = flags & ~GLOB_MAGCHAR;
- pglob->gl_errfunc = errfunc;
- pglob->gl_matchc = 0;
-
- bufnext = patbuf;
- bufend = bufnext + MaxPathLen;
- if (flags & GLOB_QUOTE) {
- /* Protect the quoted characters. */
- while (bufnext < bufend && (c = *patnext++) != CHAR_EOS)
- if (c == CHAR_QUOTE) {
- if ((c = *patnext++) == CHAR_EOS) {
- c = CHAR_QUOTE;
- --patnext;
- }
- *bufnext++ = c | M_PROTECT;
- }
- else
- *bufnext++ = c;
- }
- else
- while (bufnext < bufend && (c = *patnext++) != CHAR_EOS)
- *bufnext++ = c;
- *bufnext = CHAR_EOS;
-
- if (flags & GLOB_BRACE)
- return globexp1(patbuf, pglob);
- else
- return glob0(patbuf, pglob);
-}
-
-/*
- * Expand recursively a glob {} pattern. When there is no more expansion
- * invoke the standard globbing routine to glob the rest of the magic
- * characters
- */
-static int globexp1(const Char *pattern, glob_t *pglob)
-{
- const Char* ptr = pattern;
- int rv;
-
- /* Protect a single {}, for find(1), like csh */
- if (pattern[0] == CHAR_LBRACE && pattern[1] == CHAR_RBRACE && pattern[2] == CHAR_EOS)
- return glob0(pattern, pglob);
-
- while ((ptr = (const Char *) g_strchr((Char *) ptr, CHAR_LBRACE)) != NULL)
- if (!globexp2(ptr, pattern, pglob, &rv))
- return rv;
-
- return glob0(pattern, pglob);
-}
-
-
-/*
- * Recursive brace globbing helper. Tries to expand a single brace.
- * If it succeeds then it invokes globexp1 with the new pattern.
- * If it fails then it tries to glob the rest of the pattern and returns.
- */
-static int globexp2(const Char *ptr, const Char *pattern,
- glob_t *pglob, int *rv)
-{
- int i;
- Char *lm, *ls;
- const Char *pe, *pm, *pl;
- Char patbuf[MaxPathLen + 1];
-
- /* copy part up to the brace */
- for (lm = patbuf, pm = pattern; pm != ptr; *lm++ = *pm++)
- continue;
- ls = lm;
-
- /* Find the balanced brace */
- for (i = 0, pe = ++ptr; *pe; pe++)
- if (*pe == CHAR_LBRACKET) {
- /* Ignore everything between [] */
- for (pm = pe++; *pe != CHAR_RBRACKET && *pe != CHAR_EOS; pe++)
- continue;
- if (*pe == CHAR_EOS) {
- /*
- * We could not find a matching CHAR_RBRACKET.
- * Ignore and just look for CHAR_RBRACE
- */
- pe = pm;
- }
- }
- else if (*pe == CHAR_LBRACE)
- i++;
- else if (*pe == CHAR_RBRACE) {
- if (i == 0)
- break;
- i--;
- }
-
- /* Non matching braces; just glob the pattern */
- if (i != 0 || *pe == CHAR_EOS) {
- *rv = glob0(patbuf, pglob);
- return 0;
- }
-
- for (i = 0, pl = pm = ptr; pm <= pe; pm++)
- switch (*pm) {
- case CHAR_LBRACKET:
- /* Ignore everything between [] */
- for (pl = pm++; *pm != CHAR_RBRACKET && *pm != CHAR_EOS; pm++)
- continue;
- if (*pm == CHAR_EOS) {
- /*
- * We could not find a matching CHAR_RBRACKET.
- * Ignore and just look for CHAR_RBRACE
- */
- pm = pl;
- }
- break;
-
- case CHAR_LBRACE:
- i++;
- break;
-
- case CHAR_RBRACE:
- if (i) {
- i--;
- break;
- }
- /* FALLTHROUGH */
- case CHAR_COMMA:
- if (i && *pm == CHAR_COMMA)
- break;
- else {
- /* Append the current string */
- for (lm = ls; (pl < pm); *lm++ = *pl++)
- continue;
- /*
- * Append the rest of the pattern after the
- * closing brace
- */
- for (pl = pe + 1; (*lm++ = *pl++) != CHAR_EOS;)
- continue;
-
- /* Expand the current pattern */
-#ifdef DEBUG
- qprintf("globexp2:", patbuf);
-#endif
- *rv = globexp1(patbuf, pglob);
-
- /* move after the comma, to the next string */
- pl = pm + 1;
- }
- break;
-
- default:
- break;
- }
- *rv = 0;
- return 0;
-}
-
-
-
-/*
- * expand tilde from the passwd file.
- */
-static const Char *
-globtilde(const Char *pattern, Char *patbuf, glob_t *pglob)
-{
- struct passwd *pwd;
- char *h;
- const Char *p;
- Char *b;
-
- if (*pattern != CHAR_TILDE || !(pglob->gl_flags & GLOB_TILDE))
- return pattern;
-
- /* Copy up to the end of the string or / */
- for (p = pattern + 1, h = (char *) patbuf; *p && *p != CHAR_SLASH;
- *h++ = *p++)
- continue;
-
- *h = CHAR_EOS;
-
- if (((char *) patbuf)[0] == CHAR_EOS) {
- /*
- * handle a plain ~ or ~/ by expanding $HOME
- * first and then trying the password file
- */
- if ((h = getenv("HOME")) == NULL) {
- if ((pwd = k_getpwuid(getuid())) == NULL)
- return pattern;
- else
- h = pwd->pw_dir;
- }
- }
- else {
- /*
- * Expand a ~user
- */
- if ((pwd = k_getpwnam((char*) patbuf)) == NULL)
- return pattern;
- else
- h = pwd->pw_dir;
- }
-
- /* Copy the home directory */
- for (b = patbuf; *h; *b++ = *h++)
- continue;
-
- /* Append the rest of the pattern */
- while ((*b++ = *p++) != CHAR_EOS)
- continue;
-
- return patbuf;
-}
-
-
-/*
- * The main glob() routine: compiles the pattern (optionally processing
- * quotes), calls glob1() to do the real pattern matching, and finally
- * sorts the list (unless unsorted operation is requested). Returns 0
- * if things went well, nonzero if errors occurred. It is not an error
- * to find no matches.
- */
-static int
-glob0(const Char *pattern, glob_t *pglob)
-{
- const Char *qpatnext;
- int c, err, oldpathc;
- Char *bufnext, patbuf[MaxPathLen+1];
-
- qpatnext = globtilde(pattern, patbuf, pglob);
- oldpathc = pglob->gl_pathc;
- bufnext = patbuf;
-
- /* We don't need to check for buffer overflow any more. */
- while ((c = *qpatnext++) != CHAR_EOS) {
- switch (c) {
- case CHAR_LBRACKET:
- c = *qpatnext;
- if (c == CHAR_NOT)
- ++qpatnext;
- if (*qpatnext == CHAR_EOS ||
- g_strchr((Char *) qpatnext+1, CHAR_RBRACKET) == NULL) {
- *bufnext++ = CHAR_LBRACKET;
- if (c == CHAR_NOT)
- --qpatnext;
- break;
- }
- *bufnext++ = M_SET;
- if (c == CHAR_NOT)
- *bufnext++ = M_NOT;
- c = *qpatnext++;
- do {
- *bufnext++ = CHAR(c);
- if (*qpatnext == CHAR_RANGE &&
- (c = qpatnext[1]) != CHAR_RBRACKET) {
- *bufnext++ = M_RNG;
- *bufnext++ = CHAR(c);
- qpatnext += 2;
- }
- } while ((c = *qpatnext++) != CHAR_RBRACKET);
- pglob->gl_flags |= GLOB_MAGCHAR;
- *bufnext++ = M_END;
- break;
- case CHAR_QUESTION:
- pglob->gl_flags |= GLOB_MAGCHAR;
- *bufnext++ = M_ONE;
- break;
- case CHAR_STAR:
- pglob->gl_flags |= GLOB_MAGCHAR;
- /* collapse adjacent stars to one,
- * to avoid exponential behavior
- */
- if (bufnext == patbuf || bufnext[-1] != M_ALL)
- *bufnext++ = M_ALL;
- break;
- default:
- *bufnext++ = CHAR(c);
- break;
- }
- }
- *bufnext = CHAR_EOS;
-#ifdef DEBUG
- qprintf("glob0:", patbuf);
-#endif
-
- if ((err = glob1(patbuf, pglob)) != 0)
- return(err);
-
- /*
- * If there was no match we are going to append the pattern
- * if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was specified
- * and the pattern did not contain any magic characters
- * GLOB_NOMAGIC is there just for compatibility with csh.
- */
- if (pglob->gl_pathc == oldpathc &&
- ((pglob->gl_flags & GLOB_NOCHECK) ||
- ((pglob->gl_flags & GLOB_NOMAGIC) &&
- !(pglob->gl_flags & GLOB_MAGCHAR))))
- return(globextend(pattern, pglob));
- else if (!(pglob->gl_flags & GLOB_NOSORT))
- qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc,
- pglob->gl_pathc - oldpathc, sizeof(char *), compare);
- return(0);
-}
-
-static int
-compare(const void *p, const void *q)
-{
- return(strcmp(*(char **)p, *(char **)q));
-}
-
-static int
-glob1(Char *pattern, glob_t *pglob)
-{
- Char pathbuf[MaxPathLen+1];
-
- /* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */
- if (*pattern == CHAR_EOS)
- return(0);
- return(glob2(pathbuf, pathbuf, pattern, pglob));
-}
-
-/*
- * The functions glob2 and glob3 are mutually recursive; there is one level
- * of recursion for each segment in the pattern that contains one or more
- * meta characters.
- */
-
-#ifndef S_ISLNK
-#if defined(S_IFLNK) && defined(S_IFMT)
-#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
-#else
-#define S_ISLNK(mode) 0
-#endif
-#endif
-
-static int
-glob2(Char *pathbuf, Char *pathend, Char *pattern, glob_t *pglob)
-{
- struct stat sb;
- Char *p, *q;
- int anymeta;
-
- /*
- * Loop over pattern segments until end of pattern or until
- * segment with meta character found.
- */
- for (anymeta = 0;;) {
- if (*pattern == CHAR_EOS) { /* End of pattern? */
- *pathend = CHAR_EOS;
- if (g_lstat(pathbuf, &sb, pglob))
- return(0);
-
- if (((pglob->gl_flags & GLOB_MARK) &&
- pathend[-1] != CHAR_SEP) && (S_ISDIR(sb.st_mode)
- || (S_ISLNK(sb.st_mode) &&
- (g_stat(pathbuf, &sb, pglob) == 0) &&
- S_ISDIR(sb.st_mode)))) {
- *pathend++ = CHAR_SEP;
- *pathend = CHAR_EOS;
- }
- ++pglob->gl_matchc;
- return(globextend(pathbuf, pglob));
- }
-
- /* Find end of next segment, copy tentatively to pathend. */
- q = pathend;
- p = pattern;
- while (*p != CHAR_EOS && *p != CHAR_SEP) {
- if (ismeta(*p))
- anymeta = 1;
- *q++ = *p++;
- }
-
- if (!anymeta) { /* No expansion, do next segment. */
- pathend = q;
- pattern = p;
- while (*pattern == CHAR_SEP)
- *pathend++ = *pattern++;
- } else /* Need expansion, recurse. */
- return(glob3(pathbuf, pathend, pattern, p, pglob));
- }
- /* CHAR_NOTREACHED */
-}
-
-static int
-glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern,
- glob_t *pglob)
-{
- struct dirent *dp;
- DIR *dirp;
- int err;
- char buf[MaxPathLen];
-
- /*
- * The readdirfunc declaration can't be prototyped, because it is
- * assigned, below, to two functions which are prototyped in glob.h
- * and dirent.h as taking pointers to differently typed opaque
- * structures.
- */
- struct dirent *(*readdirfunc)(void *);
-
- *pathend = CHAR_EOS;
- errno = 0;
-
- if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
- /* TODO: don't call for ENOENT or ENOTDIR? */
- if (pglob->gl_errfunc) {
- g_Ctoc(pathbuf, buf);
- if (pglob->gl_errfunc(buf, errno) ||
- pglob->gl_flags & GLOB_ERR)
- return (GLOB_ABEND);
- }
- return(0);
- }
-
- err = 0;
-
- /* Search directory for matching names. */
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- readdirfunc = pglob->gl_readdir;
- else
- readdirfunc = (struct dirent *(*)(void *))readdir;
- while ((dp = (*readdirfunc)(dirp))) {
- u_char *sc;
- Char *dc;
-
- /* Initial CHAR_DOT must be matched literally. */
- if (dp->d_name[0] == CHAR_DOT && *pattern != CHAR_DOT)
- continue;
- for (sc = (u_char *) dp->d_name, dc = pathend;
- (*dc++ = *sc++) != CHAR_EOS;)
- continue;
- if (!match(pathend, pattern, restpattern)) {
- *pathend = CHAR_EOS;
- continue;
- }
- err = glob2(pathbuf, --dc, restpattern, pglob);
- if (err)
- break;
- }
-
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- (*pglob->gl_closedir)(dirp);
- else
- closedir(dirp);
- return(err);
-}
-
-
-/*
- * Extend the gl_pathv member of a glob_t structure to accomodate a new item,
- * add the new item, and update gl_pathc.
- *
- * This assumes the BSD realloc, which only copies the block when its size
- * crosses a power-of-two boundary; for v7 realloc, this would cause quadratic
- * behavior.
- *
- * Return 0 if new item added, error code if memory couldn't be allocated.
- *
- * Invariant of the glob_t structure:
- * Either gl_pathc is zero and gl_pathv is NULL; or gl_pathc > 0 and
- * gl_pathv points to (gl_offs + gl_pathc + 1) items.
- */
-static int
-globextend(const Char *path, glob_t *pglob)
-{
- char **pathv;
- int i;
- u_int newsize;
- char *copy;
- const Char *p;
-
- newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs);
- pathv = pglob->gl_pathv ?
- realloc(pglob->gl_pathv, newsize) :
- malloc(newsize);
- if (pathv == NULL)
- return(GLOB_NOSPACE);
-
- if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
- /* first time around -- clear initial gl_offs items */
- pathv += pglob->gl_offs;
- for (i = pglob->gl_offs; --i >= 0; )
- *--pathv = NULL;
- }
- pglob->gl_pathv = pathv;
-
- for (p = path; *p++;)
- continue;
- if ((copy = malloc(p - path)) != NULL) {
- g_Ctoc(path, copy);
- pathv[pglob->gl_offs + pglob->gl_pathc++] = copy;
- }
- pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;
- return(copy == NULL ? GLOB_NOSPACE : 0);
-}
-
-
-/*
- * pattern matching function for filenames. Each occurrence of the *
- * pattern causes a recursion level.
- */
-static int
-match(Char *name, Char *pat, Char *patend)
-{
- int ok, negate_range;
- Char c, k;
-
- while (pat < patend) {
- c = *pat++;
- switch (c & M_MASK) {
- case M_ALL:
- if (pat == patend)
- return(1);
- do
- if (match(name, pat, patend))
- return(1);
- while (*name++ != CHAR_EOS);
- return(0);
- case M_ONE:
- if (*name++ == CHAR_EOS)
- return(0);
- break;
- case M_SET:
- ok = 0;
- if ((k = *name++) == CHAR_EOS)
- return(0);
- if ((negate_range = ((*pat & M_MASK) == M_NOT)) != CHAR_EOS)
- ++pat;
- while (((c = *pat++) & M_MASK) != M_END)
- if ((*pat & M_MASK) == M_RNG) {
- if (c <= k && k <= pat[1])
- ok = 1;
- pat += 2;
- } else if (c == k)
- ok = 1;
- if (ok == negate_range)
- return(0);
- break;
- default:
- if (*name++ != c)
- return(0);
- break;
- }
- }
- return(*name == CHAR_EOS);
-}
-
-/* Free allocated data belonging to a glob_t structure. */
-void
-globfree(glob_t *pglob)
-{
- int i;
- char **pp;
-
- if (pglob->gl_pathv != NULL) {
- pp = pglob->gl_pathv + pglob->gl_offs;
- for (i = pglob->gl_pathc; i--; ++pp)
- if (*pp)
- free(*pp);
- free(pglob->gl_pathv);
- }
-}
-
-static DIR *
-g_opendir(Char *str, glob_t *pglob)
-{
- char buf[MaxPathLen];
-
- if (!*str)
- strlcpy(buf, ".", sizeof(buf));
- else
- g_Ctoc(str, buf);
-
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_opendir)(buf));
-
- return(opendir(buf));
-}
-
-static int
-g_lstat(Char *fn, struct stat *sb, glob_t *pglob)
-{
- char buf[MaxPathLen];
-
- g_Ctoc(fn, buf);
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_lstat)(buf, sb));
- return(lstat(buf, sb));
-}
-
-static int
-g_stat(Char *fn, struct stat *sb, glob_t *pglob)
-{
- char buf[MaxPathLen];
-
- g_Ctoc(fn, buf);
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_stat)(buf, sb));
- return(stat(buf, sb));
-}
-
-static Char *
-g_strchr(Char *str, int ch)
-{
- do {
- if (*str == ch)
- return (str);
- } while (*str++);
- return (NULL);
-}
-
-#ifdef notdef
-static Char *
-g_strcat(Char *dst, const Char *src)
-{
- Char *sdst = dst;
-
- while (*dst++)
- continue;
- --dst;
- while((*dst++ = *src++) != CHAR_EOS)
- continue;
-
- return (sdst);
-}
-#endif
-
-static void
-g_Ctoc(const Char *str, char *buf)
-{
- char *dc;
-
- for (dc = buf; (*dc++ = *str++) != CHAR_EOS;)
- continue;
-}
-
-#ifdef DEBUG
-static void
-qprintf(const Char *str, Char *s)
-{
- Char *p;
-
- printf("%s:\n", str);
- for (p = s; *p; p++)
- printf("%c", CHAR(*p));
- printf("\n");
- for (p = s; *p; p++)
- printf("%c", *p & M_PROTECT ? '"' : ' ');
- printf("\n");
- for (p = s; *p; p++)
- printf("%c", ismeta(*p) ? '_' : ' ');
- printf("\n");
-}
-#endif
diff --git a/crypto/kerberosIV/lib/roken/glob.h b/crypto/kerberosIV/lib/roken/glob.h
deleted file mode 100644
index bece48a89cd7..000000000000
--- a/crypto/kerberosIV/lib/roken/glob.h
+++ /dev/null
@@ -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_ */
diff --git a/crypto/kerberosIV/lib/roken/inet_ntop.c b/crypto/kerberosIV/lib/roken/inet_ntop.c
deleted file mode 100644
index f79a35eb334b..000000000000
--- a/crypto/kerberosIV/lib/roken/inet_ntop.c
+++ /dev/null
@@ -1,153 +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 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: inet_ntop.c,v 1.3 1999/12/02 16:58:47 joda Exp $");
-#endif
-
-#include <errno.h>
-#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
-#ifdef HAVE_NETINET6_IN6_H
-#include <netinet6/in6.h>
-#endif
-
-#include <roken.h>
-
-/*
- *
- */
-
-static const char *
-inet_ntop_v4 (const void *src, char *dst, size_t size)
-{
- const char digits[] = "0123456789";
- int i;
- struct in_addr *addr = (struct in_addr *)src;
- u_long a = ntohl(addr->s_addr);
- const char *orig_dst = dst;
-
- if (size < INET_ADDRSTRLEN) {
- errno = ENOSPC;
- return NULL;
- }
- for (i = 0; i < 4; ++i) {
- int n = (a >> (24 - i * 8)) & 0xFF;
- int non_zerop = 0;
-
- if (non_zerop || n / 100 > 0) {
- *dst++ = digits[n / 100];
- n %= 100;
- non_zerop = 1;
- }
- if (non_zerop || n / 10 > 0) {
- *dst++ = digits[n / 10];
- n %= 10;
- non_zerop = 1;
- }
- *dst++ = digits[n];
- if (i != 3)
- *dst++ = '.';
- }
- *dst++ = '\0';
- return orig_dst;
-}
-
-#ifdef HAVE_IPV6
-static const char *
-inet_ntop_v6 (const void *src, char *dst, size_t size)
-{
- const char xdigits[] = "0123456789abcdef";
- int i;
- const struct in6_addr *addr = (struct in6_addr *)src;
- const u_char *ptr = addr->s6_addr;
- const char *orig_dst = dst;
-
- if (size < INET6_ADDRSTRLEN) {
- errno = ENOSPC;
- return NULL;
- }
- for (i = 0; i < 8; ++i) {
- int non_zerop = 1;
-
- if (non_zerop || (ptr[0] >> 4)) {
- *dst++ = xdigits[ptr[0] >> 4];
- non_zerop = 1;
- }
- if (non_zerop || (ptr[0] & 0x0F)) {
- *dst++ = xdigits[ptr[0] & 0x0F];
- non_zerop = 1;
- }
- if (non_zerop || (ptr[1] >> 4)) {
- *dst++ = xdigits[ptr[1] >> 4];
- non_zerop = 1;
- }
- if (non_zerop || (ptr[1] & 0x0F)) {
- *dst++ = xdigits[ptr[1] & 0x0F];
- non_zerop = 1;
- }
- if (i != 7)
- *dst++ = ':';
- ptr += 2;
- }
- *dst++ = '\0';
- return orig_dst;
-}
-#endif /* HAVE_IPV6 */
-
-const char *
-inet_ntop(int af, const void *src, char *dst, size_t size)
-{
- switch (af) {
- case AF_INET :
- return inet_ntop_v4 (src, dst, size);
-#ifdef HAVE_IPV6
- case AF_INET6 :
- return inet_ntop_v6 (src, dst, size);
-#endif
- default :
- errno = EAFNOSUPPORT;
- return NULL;
- }
-}
diff --git a/crypto/kerberosIV/lib/roken/inet_pton.c b/crypto/kerberosIV/lib/roken/inet_pton.c
deleted file mode 100644
index 9b195c23dafc..000000000000
--- a/crypto/kerberosIV/lib/roken/inet_pton.c
+++ /dev/null
@@ -1,66 +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 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: inet_pton.c,v 1.2 1999/12/02 16:58:47 joda Exp $");
-#endif
-
-#include <errno.h>
-#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
-#ifdef HAVE_NETINET6_IN6_H
-#include <netinet6/in6.h>
-#endif
-
-#include <roken.h>
-
-int
-inet_pton(int af, const char *src, void *dst)
-{
- if (af != AF_INET) {
- errno = EAFNOSUPPORT;
- return -1;
- }
- return inet_aton (src, dst);
-}
diff --git a/crypto/kerberosIV/lib/roken/innetgr.c b/crypto/kerberosIV/lib/roken/innetgr.c
deleted file mode 100644
index 4bc57f93e566..000000000000
--- a/crypto/kerberosIV/lib/roken/innetgr.c
+++ /dev/null
@@ -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
-
diff --git a/crypto/kerberosIV/lib/roken/iruserok.c b/crypto/kerberosIV/lib/roken/iruserok.c
deleted file mode 100644
index 7cac29f412a2..000000000000
--- a/crypto/kerberosIV/lib/roken/iruserok.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Copyright (c) 1983, 1993, 1994
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: iruserok.c,v 1.22 1999/09/16 20:06:06 assar Exp $");
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.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_RPCSVC_YPCLNT_H
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-
-#include "roken.h"
-
-int __check_rhosts_file = 1;
-char *__rcmd_errstr = 0;
-
-/*
- * Returns "true" if match, 0 if no match.
- */
-static
-int
-__icheckhost(unsigned raddr, const char *lhost)
-{
- struct hostent *hp;
- u_long laddr;
- char **pp;
-
- /* Try for raw ip address first. */
- if (isdigit((unsigned char)*lhost)
- && (long)(laddr = inet_addr(lhost)) != -1)
- return (raddr == laddr);
-
- /* Better be a hostname. */
- if ((hp = gethostbyname(lhost)) == NULL)
- return (0);
-
- /* Spin through ip addresses. */
- for (pp = hp->h_addr_list; *pp; ++pp)
- if (memcmp(&raddr, *pp, sizeof(u_long)) == 0)
- return (1);
-
- /* No match. */
- return (0);
-}
-
-/*
- * Returns 0 if ok, -1 if not ok.
- */
-static
-int
-__ivaliduser(FILE *hostf, unsigned raddr, const char *luser,
- const char *ruser)
-{
- char *user, *p;
- int ch;
- char buf[MaxHostNameLen + 128]; /* host + login */
- char hname[MaxHostNameLen];
- struct hostent *hp;
- /* Presumed guilty until proven innocent. */
- int userok = 0, hostok = 0;
-#ifdef HAVE_YP_GET_DEFAULT_DOMAIN
- char *ypdomain;
-
- if (yp_get_default_domain(&ypdomain))
- ypdomain = NULL;
-#else
-#define ypdomain NULL
-#endif
- /* We need to get the damn hostname back for netgroup matching. */
- if ((hp = gethostbyaddr((char *)&raddr,
- sizeof(u_long),
- AF_INET)) == NULL)
- return (-1);
- strlcpy(hname, hp->h_name, sizeof(hname));
-
- while (fgets(buf, sizeof(buf), hostf)) {
- p = buf;
- /* Skip lines that are too long. */
- if (strchr(p, '\n') == NULL) {
- while ((ch = getc(hostf)) != '\n' && ch != EOF);
- continue;
- }
- if (*p == '\n' || *p == '#') {
- /* comment... */
- continue;
- }
- while (*p != '\n' && *p != ' ' && *p != '\t' && *p != '\0') {
- if (isupper((unsigned char)*p))
- *p = tolower((unsigned char)*p);
- p++;
- }
- if (*p == ' ' || *p == '\t') {
- *p++ = '\0';
- while (*p == ' ' || *p == '\t')
- p++;
- user = p;
- while (*p != '\n' && *p != ' ' &&
- *p != '\t' && *p != '\0')
- p++;
- } else
- user = p;
- *p = '\0';
- /*
- * Do +/- and +@/-@ checking. This looks really nasty,
- * but it matches SunOS's behavior so far as I can tell.
- */
- switch(buf[0]) {
- case '+':
- if (!buf[1]) { /* '+' matches all hosts */
- hostok = 1;
- break;
- }
- if (buf[1] == '@') /* match a host by netgroup */
- hostok = innetgr((char *)&buf[2],
- (char *)&hname, NULL, ypdomain);
- else /* match a host by addr */
- hostok = __icheckhost(raddr,(char *)&buf[1]);
- break;
- case '-': /* reject '-' hosts and all their users */
- if (buf[1] == '@') {
- if (innetgr((char *)&buf[2],
- (char *)&hname, NULL, ypdomain))
- return(-1);
- } else {
- if (__icheckhost(raddr,(char *)&buf[1]))
- return(-1);
- }
- break;
- default: /* if no '+' or '-', do a simple match */
- hostok = __icheckhost(raddr, buf);
- break;
- }
- switch(*user) {
- case '+':
- if (!*(user+1)) { /* '+' matches all users */
- userok = 1;
- break;
- }
- if (*(user+1) == '@') /* match a user by netgroup */
- userok = innetgr(user+2, NULL, (char *)ruser,
- ypdomain);
- else /* match a user by direct specification */
- userok = !(strcmp(ruser, user+1));
- break;
- case '-': /* if we matched a hostname, */
- if (hostok) { /* check for user field rejections */
- if (!*(user+1))
- return(-1);
- if (*(user+1) == '@') {
- if (innetgr(user+2, NULL,
- (char *)ruser, ypdomain))
- return(-1);
- } else {
- if (!strcmp(ruser, user+1))
- return(-1);
- }
- }
- break;
- default: /* no rejections: try to match the user */
- if (hostok)
- userok = !(strcmp(ruser,*user ? user : luser));
- break;
- }
- if (hostok && userok)
- return(0);
- }
- return (-1);
-}
-
-/*
- * New .rhosts strategy: We are passed an ip address. We spin through
- * hosts.equiv and .rhosts looking for a match. When the .rhosts only
- * has ip addresses, we don't have to trust a nameserver. When it
- * contains hostnames, we spin through the list of addresses the nameserver
- * gives us and look for a match.
- *
- * Returns 0 if ok, -1 if not ok.
- */
-int
-iruserok(unsigned raddr, int superuser, const char *ruser, const char *luser)
-{
- char *cp;
- struct stat sbuf;
- struct passwd *pwd;
- FILE *hostf;
- uid_t uid;
- int first;
- char pbuf[MaxPathLen];
-
- first = 1;
- hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "r");
-again:
- if (hostf) {
- if (__ivaliduser(hostf, raddr, luser, ruser) == 0) {
- fclose(hostf);
- return (0);
- }
- fclose(hostf);
- }
- if (first == 1 && (__check_rhosts_file || superuser)) {
- first = 0;
- if ((pwd = k_getpwnam((char*)luser)) == NULL)
- return (-1);
- snprintf (pbuf, sizeof(pbuf), "%s/.rhosts", pwd->pw_dir);
-
- /*
- * Change effective uid while opening .rhosts. If root and
- * reading an NFS mounted file system, can't read files that
- * are protected read/write owner only.
- */
- uid = geteuid();
- seteuid(pwd->pw_uid);
- hostf = fopen(pbuf, "r");
- seteuid(uid);
-
- if (hostf == NULL)
- return (-1);
- /*
- * If not a regular file, or is owned by someone other than
- * user or root or if writeable by anyone but the owner, quit.
- */
- cp = NULL;
- if (lstat(pbuf, &sbuf) < 0)
- cp = ".rhosts lstat failed";
- else if (!S_ISREG(sbuf.st_mode))
- cp = ".rhosts not regular file";
- else if (fstat(fileno(hostf), &sbuf) < 0)
- cp = ".rhosts fstat failed";
- else if (sbuf.st_uid && sbuf.st_uid != pwd->pw_uid)
- cp = "bad .rhosts owner";
- else if (sbuf.st_mode & (S_IWGRP|S_IWOTH))
- cp = ".rhosts writeable by other than owner";
- /* If there were any problems, quit. */
- if (cp) {
- __rcmd_errstr = cp;
- fclose(hostf);
- return (-1);
- }
- goto again;
- }
- return (-1);
-}
diff --git a/crypto/kerberosIV/lib/roken/issuid.c b/crypto/kerberosIV/lib/roken/issuid.c
deleted file mode 100644
index af2aae542875..000000000000
--- a/crypto/kerberosIV/lib/roken/issuid.c
+++ /dev/null
@@ -1,53 +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. 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: issuid.c,v 1.3 1999/12/02 16:58:47 joda Exp $");
-#endif
-
-#include "roken.h"
-
-int
-issuid(void)
-{
-#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
- if(getuid() != geteuid())
- return 1;
-#endif
-#if defined(HAVE_GETGID) && defined(HAVE_GETEGID)
- if(getgid() != getegid())
- return 2;
-#endif
- return 0;
-}
diff --git a/crypto/kerberosIV/lib/roken/make-print-version.c b/crypto/kerberosIV/lib/roken/make-print-version.c
deleted file mode 100644
index d08e023da950..000000000000
--- a/crypto/kerberosIV/lib/roken/make-print-version.c
+++ /dev/null
@@ -1,68 +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. 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: make-print-version.c,v 1.2 1999/12/02 16:58:51 joda Exp $");
-#endif
-
-#include <stdio.h>
-
-#ifdef KRB5
-extern char *heimdal_version;
-#endif
-#ifdef KRB4
-extern char *krb4_version;
-#endif
-#include <version.h>
-
-int
-main(int argc, char **argv)
-{
- FILE *f;
- if(argc != 2)
- return 1;
- f = fopen(argv[1], "w");
- if(f == NULL)
- return 1;
- fprintf(f, "#define VERSIONLIST { ");
-#ifdef KRB5
- fprintf(f, "\"%s\", ", heimdal_version);
-#endif
-#ifdef KRB4
- fprintf(f, "\"%s\", ", krb4_version);
-#endif
- fprintf(f, "}\n");
- fclose(f);
- return 0;
-}
diff --git a/crypto/kerberosIV/lib/roken/net_read.c b/crypto/kerberosIV/lib/roken/net_read.c
deleted file mode 100644
index 6d45bfa5471a..000000000000
--- a/crypto/kerberosIV/lib/roken/net_read.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 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. 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: net_read.c,v 1.3 1999/12/02 16:58:51 joda Exp $");
-#endif
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <roken.h>
-
-/*
- * Like read but never return partial data.
- */
-
-ssize_t
-net_read (int fd, void *buf, size_t nbytes)
-{
- char *cbuf = (char *)buf;
- ssize_t count;
- size_t rem = nbytes;
-
- while (rem > 0) {
-#ifdef WIN32
- count = recv (fd, cbuf, rem, 0);
-#else
- count = read (fd, cbuf, rem);
-#endif
- if (count < 0) {
- if (errno == EINTR)
- continue;
- else
- return count;
- } else if (count == 0) {
- return count;
- }
- cbuf += count;
- rem -= count;
- }
- return nbytes;
-}
diff --git a/crypto/kerberosIV/lib/roken/net_write.c b/crypto/kerberosIV/lib/roken/net_write.c
deleted file mode 100644
index 2f63dbeed10e..000000000000
--- a/crypto/kerberosIV/lib/roken/net_write.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 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. 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: net_write.c,v 1.4 1999/12/02 16:58:51 joda Exp $");
-#endif
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <roken.h>
-
-/*
- * Like write but never return partial data.
- */
-
-ssize_t
-net_write (int fd, const void *buf, size_t nbytes)
-{
- const char *cbuf = (const char *)buf;
- ssize_t count;
- size_t rem = nbytes;
-
- while (rem > 0) {
-#ifdef WIN32
- count = send (fd, cbuf, rem, 0);
-#else
- count = write (fd, cbuf, rem);
-#endif
- if (count < 0) {
- if (errno == EINTR)
- continue;
- else
- return count;
- }
- cbuf += count;
- rem -= count;
- }
- return nbytes;
-}
diff --git a/crypto/kerberosIV/lib/roken/parse_bytes-test.c b/crypto/kerberosIV/lib/roken/parse_bytes-test.c
deleted file mode 100644
index 499d942bf060..000000000000
--- a/crypto/kerberosIV/lib/roken/parse_bytes-test.c
+++ /dev/null
@@ -1,92 +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 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: parse_bytes-test.c,v 1.2 1999/12/02 16:58:51 joda Exp $");
-#endif
-
-#include "roken.h"
-#include "parse_bytes.h"
-
-static struct testcase {
- int canonicalp;
- int val;
- const char *def_unit;
- const char *str;
-} tests[] = {
- {0, 0, NULL, "0 bytes"},
- {1, 0, NULL, "0"},
- {0, 1, NULL, "1"},
- {1, 1, NULL, "1 byte"},
- {0, 0, "kilobyte", "0"},
- {0, 1024, "kilobyte", "1"},
- {1, 1024, "kilobyte", "1 kilobyte"},
- {1, 1024 * 1024, NULL, "1 megabyte"},
- {0, 1025, NULL, "1 kilobyte 1"},
- {1, 1025, NULL, "1 kilobyte 1 byte"},
-};
-
-int
-main(int argc, char **argv)
-{
- int i;
- int ret = 0;
-
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i) {
- char buf[256];
- int val = parse_bytes (tests[i].str, tests[i].def_unit);
- size_t len;
-
- if (val != tests[i].val) {
- printf ("parse_bytes (%s, %s) = %d != %d\n",
- tests[i].str,
- tests[i].def_unit ? tests[i].def_unit : "none",
- val, tests[i].val);
- ++ret;
- }
- if (tests[i].canonicalp) {
- len = unparse_bytes (tests[i].val, buf, sizeof(buf));
- if (strcmp (tests[i].str, buf) != 0) {
- printf ("unparse_bytes (%d) = \"%s\" != \"%s\"\n",
- tests[i].val, buf, tests[i].str);
- ++ret;
- }
- }
- }
- if (ret) {
- printf ("%d errors\n", ret);
- return 1;
- } else
- return 0;
-}
diff --git a/crypto/kerberosIV/lib/roken/parse_bytes.c b/crypto/kerberosIV/lib/roken/parse_bytes.c
deleted file mode 100644
index f3c514fcd677..000000000000
--- a/crypto/kerberosIV/lib/roken/parse_bytes.c
+++ /dev/null
@@ -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 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: parse_bytes.c,v 1.2 1999/12/02 16:58:51 joda Exp $");
-#endif
-
-#include <parse_units.h>
-#include "parse_bytes.h"
-
-static units bytes_units[] = {
- { "gigabyte", 1024 * 1024 * 1024 },
- { "gbyte", 1024 * 1024 * 1024 },
- { "GB", 1024 * 1024 * 1024 },
- { "megabyte", 1024 * 1024 },
- { "mbyte", 1024 * 1024 },
- { "MB", 1024 * 1024 },
- { "kilobyte", 1024 },
- { "KB", 1024 },
- { "byte", 1 },
- { NULL, 0 }
-};
-
-static units bytes_short_units[] = {
- { "GB", 1024 * 1024 * 1024 },
- { "MB", 1024 * 1024 },
- { "KB", 1024 },
- { NULL, 0 }
-};
-
-int
-parse_bytes (const char *s, const char *def_unit)
-{
- return parse_units (s, bytes_units, def_unit);
-}
-
-size_t
-unparse_bytes (int t, char *s, size_t len)
-{
- return unparse_units (t, bytes_units, s, len);
-}
-
-size_t
-unparse_bytes_short (int t, char *s, size_t len)
-{
- return unparse_units_approx (t, bytes_short_units, s, len);
-}
diff --git a/crypto/kerberosIV/lib/roken/parse_bytes.h b/crypto/kerberosIV/lib/roken/parse_bytes.h
deleted file mode 100644
index 8116c1c8ad77..000000000000
--- a/crypto/kerberosIV/lib/roken/parse_bytes.h
+++ /dev/null
@@ -1,48 +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 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: parse_bytes.h,v 1.2 1999/12/02 16:58:51 joda Exp $ */
-
-#ifndef __PARSE_BYTES_H__
-#define __PARSE_BYTES_H__
-
-int
-parse_bytes (const char *s, const char *def_unit);
-
-size_t
-unparse_bytes (int t, char *s, size_t len);
-
-size_t
-unparse_bytes_short (int t, char *s, size_t len);
-
-#endif /* __PARSE_BYTES_H__ */
diff --git a/crypto/kerberosIV/lib/roken/parse_time.c b/crypto/kerberosIV/lib/roken/parse_time.c
deleted file mode 100644
index a09ded758de8..000000000000
--- a/crypto/kerberosIV/lib/roken/parse_time.c
+++ /dev/null
@@ -1,78 +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. 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: parse_time.c,v 1.5 1999/12/02 16:58:51 joda Exp $");
-#endif
-
-#include <parse_units.h>
-#include "parse_time.h"
-
-static units time_units[] = {
- {"year", 365 * 24 * 60 * 60},
- {"month", 30 * 24 * 60 * 60},
- {"week", 7 * 24 * 60 * 60},
- {"day", 24 * 60 * 60},
- {"hour", 60 * 60},
- {"h", 60 * 60},
- {"minute", 60},
- {"m", 60},
- {"second", 1},
- {"s", 1},
- {NULL, 0},
-};
-
-int
-parse_time (const char *s, const char *def_unit)
-{
- return parse_units (s, time_units, def_unit);
-}
-
-size_t
-unparse_time (int t, char *s, size_t len)
-{
- return unparse_units (t, time_units, s, len);
-}
-
-size_t
-unparse_time_approx (int t, char *s, size_t len)
-{
- return unparse_units_approx (t, time_units, s, len);
-}
-
-void
-print_time_table (FILE *f)
-{
- print_units_table (time_units, f);
-}
diff --git a/crypto/kerberosIV/lib/roken/parse_time.h b/crypto/kerberosIV/lib/roken/parse_time.h
deleted file mode 100644
index 55de505dbba3..000000000000
--- a/crypto/kerberosIV/lib/roken/parse_time.h
+++ /dev/null
@@ -1,51 +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. 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: parse_time.h,v 1.4 1999/12/02 16:58:51 joda Exp $ */
-
-#ifndef __PARSE_TIME_H__
-#define __PARSE_TIME_H__
-
-int
-parse_time (const char *s, const char *def_unit);
-
-size_t
-unparse_time (int t, char *s, size_t len);
-
-size_t
-unparse_time_approx (int t, char *s, size_t len);
-
-void
-print_time_table (FILE *f);
-
-#endif /* __PARSE_TIME_H__ */
diff --git a/crypto/kerberosIV/lib/roken/parse_units.c b/crypto/kerberosIV/lib/roken/parse_units.c
deleted file mode 100644
index 34c5030cb65e..000000000000
--- a/crypto/kerberosIV/lib/roken/parse_units.c
+++ /dev/null
@@ -1,324 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: parse_units.c,v 1.12 1999/12/02 16:58:51 joda Exp $");
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <roken.h>
-#include "parse_units.h"
-
-/*
- * Parse string in `s' according to `units' and return value.
- * def_unit defines the default unit.
- */
-
-static int
-parse_something (const char *s, const struct units *units,
- const char *def_unit,
- int (*func)(int res, int val, unsigned mult),
- int init,
- int accept_no_val_p)
-{
- const char *p;
- int res = init;
- unsigned def_mult = 1;
-
- if (def_unit != NULL) {
- const struct units *u;
-
- for (u = units; u->name; ++u) {
- if (strcasecmp (u->name, def_unit) == 0) {
- def_mult = u->mult;
- break;
- }
- }
- if (u->name == NULL)
- return -1;
- }
-
- p = s;
- while (*p) {
- double val;
- char *next;
- const struct units *u, *partial_unit;
- size_t u_len;
- unsigned partial;
- int no_val_p = 0;
-
- while(isspace((unsigned char)*p) || *p == ',')
- ++p;
-
- val = strtod (p, &next); /* strtol(p, &next, 0); */
- if (val == 0 && p == next) {
- if(!accept_no_val_p)
- return -1;
- no_val_p = 1;
- }
- p = next;
- while (isspace((unsigned char)*p))
- ++p;
- if (*p == '\0') {
- res = (*func)(res, val, def_mult);
- if (res < 0)
- return res;
- break;
- } else if (*p == '+') {
- ++p;
- val = 1;
- } else if (*p == '-') {
- ++p;
- val = -1;
- }
- if (no_val_p && val == 0)
- val = 1;
- u_len = strcspn (p, ", \t");
- partial = 0;
- partial_unit = NULL;
- if (u_len > 1 && p[u_len - 1] == 's')
- --u_len;
- for (u = units; u->name; ++u) {
- if (strncasecmp (p, u->name, u_len) == 0) {
- if (u_len == strlen (u->name)) {
- p += u_len;
- res = (*func)(res, val, u->mult);
- if (res < 0)
- return res;
- break;
- } else {
- ++partial;
- partial_unit = u;
- }
- }
- }
- if (u->name == NULL) {
- if (partial == 1) {
- p += u_len;
- res = (*func)(res, val, partial_unit->mult);
- if (res < 0)
- return res;
- } else {
- return -1;
- }
- }
- if (*p == 's')
- ++p;
- }
- return res;
-}
-
-/*
- * The string consists of a sequence of `n unit'
- */
-
-static int
-acc_units(int res, int val, unsigned mult)
-{
- return res + val * mult;
-}
-
-int
-parse_units (const char *s, const struct units *units,
- const char *def_unit)
-{
- return parse_something (s, units, def_unit, acc_units, 0, 0);
-}
-
-/*
- * The string consists of a sequence of `[+-]flag'. `orig' consists
- * the original set of flags, those are then modified and returned as
- * the function value.
- */
-
-static int
-acc_flags(int res, int val, unsigned mult)
-{
- if(val == 1)
- return res | mult;
- else if(val == -1)
- return res & ~mult;
- else if (val == 0)
- return mult;
- else
- return -1;
-}
-
-int
-parse_flags (const char *s, const struct units *units,
- int orig)
-{
- return parse_something (s, units, NULL, acc_flags, orig, 1);
-}
-
-/*
- * Return a string representation according to `units' of `num' in `s'
- * with maximum length `len'. The actual length is the function value.
- */
-
-static size_t
-unparse_something (int num, const struct units *units, char *s, size_t len,
- int (*print) (char *s, size_t len, int div,
- const char *name, int rem),
- int (*update) (int in, unsigned mult),
- const char *zero_string)
-{
- const struct units *u;
- size_t ret = 0, tmp;
-
- if (num == 0)
- return snprintf (s, len, "%s", zero_string);
-
- for (u = units; num > 0 && u->name; ++u) {
- int div;
-
- div = num / u->mult;
- if (div) {
- num = (*update) (num, u->mult);
- tmp = (*print) (s, len, div, u->name, num);
-
- len -= tmp;
- s += tmp;
- ret += tmp;
- }
- }
- return ret;
-}
-
-static int
-print_unit (char *s, size_t len, int div, const char *name, int rem)
-{
- return snprintf (s, len, "%u %s%s%s",
- div, name,
- div == 1 ? "" : "s",
- rem > 0 ? " " : "");
-}
-
-static int
-update_unit (int in, unsigned mult)
-{
- return in % mult;
-}
-
-static int
-update_unit_approx (int in, unsigned mult)
-{
- if (in / mult > 0)
- return 0;
- else
- return update_unit (in, mult);
-}
-
-size_t
-unparse_units (int num, const struct units *units, char *s, size_t len)
-{
- return unparse_something (num, units, s, len,
- print_unit,
- update_unit,
- "0");
-}
-
-size_t
-unparse_units_approx (int num, const struct units *units, char *s, size_t len)
-{
- return unparse_something (num, units, s, len,
- print_unit,
- update_unit_approx,
- "0");
-}
-
-void
-print_units_table (const struct units *units, FILE *f)
-{
- const struct units *u, *u2;
- unsigned max_sz = 0;
-
- for (u = units; u->name; ++u) {
- max_sz = max(max_sz, strlen(u->name));
- }
-
- for (u = units; u->name;) {
- char buf[1024];
- const struct units *next;
-
- for (next = u + 1; next->name && next->mult == u->mult; ++next)
- ;
-
- if (next->name) {
- for (u2 = next;
- u2->name && u->mult % u2->mult != 0;
- ++u2)
- ;
- if (u2->name == NULL)
- --u2;
- unparse_units (u->mult, u2, buf, sizeof(buf));
- fprintf (f, "1 %*s = %s\n", max_sz, u->name, buf);
- } else {
- fprintf (f, "1 %s\n", u->name);
- }
- u = next;
- }
-}
-
-static int
-print_flag (char *s, size_t len, int div, const char *name, int rem)
-{
- return snprintf (s, len, "%s%s", name, rem > 0 ? ", " : "");
-}
-
-static int
-update_flag (int in, unsigned mult)
-{
- return in - mult;
-}
-
-size_t
-unparse_flags (int num, const struct units *units, char *s, size_t len)
-{
- return unparse_something (num, units, s, len,
- print_flag,
- update_flag,
- "");
-}
-
-void
-print_flags_table (const struct units *units, FILE *f)
-{
- const struct units *u;
-
- for(u = units; u->name; ++u)
- fprintf(f, "%s%s", u->name, (u+1)->name ? ", " : "\n");
-}
diff --git a/crypto/kerberosIV/lib/roken/parse_units.h b/crypto/kerberosIV/lib/roken/parse_units.h
deleted file mode 100644
index f159d30e9007..000000000000
--- a/crypto/kerberosIV/lib/roken/parse_units.h
+++ /dev/null
@@ -1,73 +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. 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: parse_units.h,v 1.6 1999/12/02 16:58:51 joda Exp $ */
-
-#ifndef __PARSE_UNITS_H__
-#define __PARSE_UNITS_H__
-
-#include <stdio.h>
-#include <stddef.h>
-
-struct units {
- const char *name;
- unsigned mult;
-};
-
-typedef struct units units;
-
-int
-parse_units (const char *s, const struct units *units,
- const char *def_unit);
-
-void
-print_units_table (const struct units *units, FILE *f);
-
-int
-parse_flags (const char *s, const struct units *units,
- int orig);
-
-size_t
-unparse_units (int num, const struct units *units, char *s, size_t len);
-
-size_t
-unparse_units_approx (int num, const struct units *units, char *s,
- size_t len);
-
-size_t
-unparse_flags (int num, const struct units *units, char *s, size_t len);
-
-void
-print_flags_table (const struct units *units, FILE *f);
-
-#endif /* __PARSE_UNITS_H__ */
diff --git a/crypto/kerberosIV/lib/roken/print_version.c b/crypto/kerberosIV/lib/roken/print_version.c
deleted file mode 100644
index 809bbb3bb920..000000000000
--- a/crypto/kerberosIV/lib/roken/print_version.c
+++ /dev/null
@@ -1,78 +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. 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: print_version.c,v 1.5 1999/12/02 16:58:51 joda Exp $");
-#endif
-#include "roken.h"
-
-#include "print_version.h"
-
-void
-print_version(const char *progname)
-{
- const char *arg[] = VERSIONLIST;
- const int num_args = sizeof(arg) / sizeof(arg[0]);
- char *msg;
- size_t len = 0;
- int i;
-
- if(progname == NULL)
- progname = __progname;
-
- if(num_args == 0)
- msg = "no version information";
- else {
- for(i = 0; i < num_args; i++) {
- if(i > 0)
- len += 2;
- len += strlen(arg[i]);
- }
- msg = malloc(len + 1);
- if(msg == NULL) {
- fprintf(stderr, "%s: out of memory\n", progname);
- return;
- }
- msg[0] = '\0';
- for(i = 0; i < num_args; i++) {
- if(i > 0)
- strcat(msg, ", ");
- strcat(msg, arg[i]);
- }
- }
- fprintf(stderr, "%s (%s)\n", progname, msg);
- fprintf(stderr, "Copyright (c) 1999 Kungliga Tekniska Högskolan\n");
- if(num_args != 0)
- free(msg);
-}
diff --git a/crypto/kerberosIV/lib/roken/readv.c b/crypto/kerberosIV/lib/roken/readv.c
deleted file mode 100644
index de2f9ea8af72..000000000000
--- a/crypto/kerberosIV/lib/roken/readv.c
+++ /dev/null
@@ -1,67 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: readv.c,v 1.5 1999/12/02 16:58:52 joda Exp $");
-#endif
-
-#include "roken.h"
-
-ssize_t
-readv(int d, const struct iovec *iov, int iovcnt)
-{
- ssize_t ret, nb;
- size_t tot = 0;
- int i;
- char *buf, *p;
-
- for(i = 0; i < iovcnt; ++i)
- tot += iov[i].iov_len;
- buf = malloc(tot);
- if (tot != 0 && buf == NULL) {
- errno = ENOMEM;
- return -1;
- }
- nb = ret = read (d, buf, tot);
- p = buf;
- while (nb > 0) {
- ssize_t cnt = min(nb, iov->iov_len);
-
- memcpy (iov->iov_base, p, cnt);
- p += cnt;
- nb -= cnt;
- }
- free(buf);
- return ret;
-}
diff --git a/crypto/kerberosIV/lib/roken/recvmsg.c b/crypto/kerberosIV/lib/roken/recvmsg.c
deleted file mode 100644
index e94ad68c80be..000000000000
--- a/crypto/kerberosIV/lib/roken/recvmsg.c
+++ /dev/null
@@ -1,69 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: recvmsg.c,v 1.5 1999/12/02 16:58:52 joda Exp $");
-#endif
-
-#include "roken.h"
-
-ssize_t
-recvmsg(int s, struct msghdr *msg, int flags)
-{
- ssize_t ret, nb;
- size_t tot = 0;
- int i;
- char *buf, *p;
- struct iovec *iov = msg->msg_iov;
-
- for(i = 0; i < msg->msg_iovlen; ++i)
- tot += iov[i].iov_len;
- buf = malloc(tot);
- if (tot != 0 && buf == NULL) {
- errno = ENOMEM;
- return -1;
- }
- nb = ret = recvfrom (s, buf, tot, flags, msg->msg_name, &msg->msg_namelen);
- p = buf;
- while (nb > 0) {
- ssize_t cnt = min(nb, iov->iov_len);
-
- memcpy (iov->iov_base, p, cnt);
- p += cnt;
- nb -= cnt;
- ++iov;
- }
- free(buf);
- return ret;
-}
diff --git a/crypto/kerberosIV/lib/roken/resolve.c b/crypto/kerberosIV/lib/roken/resolve.c
deleted file mode 100644
index 8840740532cc..000000000000
--- a/crypto/kerberosIV/lib/roken/resolve.c
+++ /dev/null
@@ -1,353 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "roken.h"
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
-#ifdef HAVE_RESOLV_H
-#include <resolv.h>
-#endif
-#include "resolve.h"
-
-RCSID("$Id: resolve.c,v 1.22 1999/12/02 16:58:52 joda Exp $");
-
-#if defined(HAVE_RES_SEARCH) && defined(HAVE_DN_EXPAND)
-
-#define DECL(X) {#X, T_##X}
-
-static struct stot{
- const char *name;
- int type;
-}stot[] = {
- DECL(A),
- DECL(NS),
- DECL(CNAME),
- DECL(PTR),
- DECL(MX),
- DECL(TXT),
- DECL(AFSDB),
- DECL(SRV),
- {NULL, 0}
-};
-
-int _resolve_debug;
-
-static int
-string_to_type(const char *name)
-{
- struct stot *p = stot;
- for(p = stot; p->name; p++)
- if(strcasecmp(name, p->name) == 0)
- return p->type;
- return -1;
-}
-
-static const char *
-type_to_string(int type)
-{
- struct stot *p = stot;
- for(p = stot; p->name; p++)
- if(type == p->type)
- return p->name;
- return NULL;
-}
-
-void
-dns_free_data(struct dns_reply *r)
-{
- struct resource_record *rr;
- if(r->q.domain)
- free(r->q.domain);
- for(rr = r->head; rr;){
- struct resource_record *tmp = rr;
- if(rr->domain)
- free(rr->domain);
- if(rr->u.data)
- free(rr->u.data);
- rr = rr->next;
- free(tmp);
- }
- free (r);
-}
-
-static struct dns_reply*
-parse_reply(unsigned char *data, int len)
-{
- unsigned char *p;
- char host[128];
- int status;
-
- struct dns_reply *r;
- struct resource_record **rr;
-
- r = calloc(1, sizeof(*r));
- if (r == NULL)
- return NULL;
-
- p = data;
-#if 0
- /* doesn't work on Crays */
- memcpy(&r->h, p, sizeof(HEADER));
- p += sizeof(HEADER);
-#else
- memcpy(&r->h, p, 12); /* XXX this will probably be mostly garbage */
- p += 12;
-#endif
- status = dn_expand(data, data + len, p, host, sizeof(host));
- if(status < 0){
- dns_free_data(r);
- return NULL;
- }
- r->q.domain = strdup(host);
- if(r->q.domain == NULL) {
- dns_free_data(r);
- return NULL;
- }
- p += status;
- r->q.type = (p[0] << 8 | p[1]);
- p += 2;
- r->q.class = (p[0] << 8 | p[1]);
- p += 2;
- rr = &r->head;
- while(p < data + len){
- int type, class, ttl, size;
- status = dn_expand(data, data + len, p, host, sizeof(host));
- if(status < 0){
- dns_free_data(r);
- return NULL;
- }
- p += status;
- type = (p[0] << 8) | p[1];
- p += 2;
- class = (p[0] << 8) | p[1];
- p += 2;
- ttl = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
- p += 4;
- size = (p[0] << 8) | p[1];
- p += 2;
- *rr = (struct resource_record*)calloc(1,
- sizeof(struct resource_record));
- if(*rr == NULL) {
- dns_free_data(r);
- return NULL;
- }
- (*rr)->domain = strdup(host);
- if((*rr)->domain == NULL) {
- dns_free_data(r);
- return NULL;
- }
- (*rr)->type = type;
- (*rr)->class = class;
- (*rr)->ttl = ttl;
- (*rr)->size = size;
- switch(type){
- case T_NS:
- case T_CNAME:
- case T_PTR:
- status = dn_expand(data, data + len, p, host, sizeof(host));
- if(status < 0){
- dns_free_data(r);
- return NULL;
- }
- (*rr)->u.txt = strdup(host);
- if((*rr)->u.txt == NULL) {
- dns_free_data(r);
- return NULL;
- }
- break;
- case T_MX:
- case T_AFSDB:{
- status = dn_expand(data, data + len, p + 2, host, sizeof(host));
- if(status < 0){
- dns_free_data(r);
- return NULL;
- }
- (*rr)->u.mx = (struct mx_record*)malloc(sizeof(struct mx_record) +
- strlen(host));
- if((*rr)->u.mx == NULL) {
- dns_free_data(r);
- return NULL;
- }
- (*rr)->u.mx->preference = (p[0] << 8) | p[1];
- strcpy((*rr)->u.mx->domain, host);
- break;
- }
- case T_SRV:{
- status = dn_expand(data, data + len, p + 6, host, sizeof(host));
- if(status < 0){
- dns_free_data(r);
- return NULL;
- }
- (*rr)->u.srv =
- (struct srv_record*)malloc(sizeof(struct srv_record) +
- strlen(host));
- if((*rr)->u.srv == NULL) {
- dns_free_data(r);
- return NULL;
- }
- (*rr)->u.srv->priority = (p[0] << 8) | p[1];
- (*rr)->u.srv->weight = (p[2] << 8) | p[3];
- (*rr)->u.srv->port = (p[4] << 8) | p[5];
- strcpy((*rr)->u.srv->target, host);
- break;
- }
- case T_TXT:{
- (*rr)->u.txt = (char*)malloc(size + 1);
- if((*rr)->u.txt == NULL) {
- dns_free_data(r);
- return NULL;
- }
- strncpy((*rr)->u.txt, (char*)p + 1, *p);
- (*rr)->u.txt[*p] = 0;
- break;
- }
-
- default:
- (*rr)->u.data = (unsigned char*)malloc(size);
- if(size != 0 && (*rr)->u.data == NULL) {
- dns_free_data(r);
- return NULL;
- }
- memcpy((*rr)->u.data, p, size);
- }
- p += size;
- rr = &(*rr)->next;
- }
- *rr = NULL;
- return r;
-}
-
-static struct dns_reply *
-dns_lookup_int(const char *domain, int rr_class, int rr_type)
-{
- unsigned char reply[1024];
- int len;
- struct dns_reply *r = NULL;
- u_long old_options = 0;
-
- if (_resolve_debug) {
- old_options = _res.options;
- _res.options |= RES_DEBUG;
- fprintf(stderr, "dns_lookup(%s, %d, %s)\n", domain,
- rr_class, type_to_string(rr_type));
- }
- len = res_search(domain, rr_class, rr_type, reply, sizeof(reply));
- if (_resolve_debug) {
- _res.options = old_options;
- fprintf(stderr, "dns_lookup(%s, %d, %s) --> %d\n",
- domain, rr_class, type_to_string(rr_type), len);
- }
- if (len >= 0)
- r = parse_reply(reply, len);
- return r;
-}
-
-struct dns_reply *
-dns_lookup(const char *domain, const char *type_name)
-{
- int type;
-
- type = string_to_type(type_name);
- if(type == -1) {
- if(_resolve_debug)
- fprintf(stderr, "dns_lookup: unknown resource type: `%s'\n",
- type_name);
- return NULL;
- }
- return dns_lookup_int(domain, C_IN, type);
-}
-
-#else /* NOT defined(HAVE_RES_SEARCH) && defined(HAVE_DN_EXPAND) */
-
-struct dns_reply *
-dns_lookup(const char *domain, const char *type_name)
-{
- return NULL;
-}
-
-void
-dns_free_data(struct dns_reply *r)
-{
-}
-
-#endif
-
-#ifdef TEST
-int
-main(int argc, char **argv)
-{
- struct dns_reply *r;
- struct resource_record *rr;
- r = dns_lookup(argv[1], argv[2]);
- if(r == NULL){
- printf("No reply.\n");
- return 1;
- }
- for(rr = r->head; rr;rr=rr->next){
- printf("%s %s %d ", rr->domain, type_to_string(rr->type), rr->ttl);
- switch(rr->type){
- case T_NS:
- printf("%s\n", (char*)rr->u.data);
- break;
- case T_A:
- printf("%d.%d.%d.%d\n",
- ((unsigned char*)rr->u.data)[0],
- ((unsigned char*)rr->u.data)[1],
- ((unsigned char*)rr->u.data)[2],
- ((unsigned char*)rr->u.data)[3]);
- break;
- case T_MX:
- case T_AFSDB:{
- struct mx_record *mx = (struct mx_record*)rr->u.data;
- printf("%d %s\n", mx->preference, mx->domain);
- break;
- }
- case T_SRV:{
- struct srv_record *srv = (struct srv_record*)rr->u.data;
- printf("%d %d %d %s\n", srv->priority, srv->weight,
- srv->port, srv->target);
- break;
- }
- default:
- printf("\n");
- break;
- }
- }
-
- return 0;
-}
-#endif
diff --git a/crypto/kerberosIV/lib/roken/resolve.h b/crypto/kerberosIV/lib/roken/resolve.h
deleted file mode 100644
index c90f6b54ada5..000000000000
--- a/crypto/kerberosIV/lib/roken/resolve.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 1995, 1996, 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. 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: resolve.h,v 1.8 1999/12/02 16:58:52 joda Exp $ */
-
-#ifndef __RESOLVE_H__
-#define __RESOLVE_H__
-
-/* We use these, but they are not always present in <arpa/nameser.h> */
-
-#ifndef T_TXT
-#define T_TXT 16
-#endif
-#ifndef T_AFSDB
-#define T_AFSDB 18
-#endif
-#ifndef T_SRV
-#define T_SRV 33
-#endif
-#ifndef T_NAPTR
-#define T_NAPTR 35
-#endif
-
-struct dns_query{
- char *domain;
- unsigned type;
- unsigned class;
-};
-
-struct mx_record{
- unsigned preference;
- char domain[1];
-};
-
-struct srv_record{
- unsigned priority;
- unsigned weight;
- unsigned port;
- char target[1];
-};
-
-struct resource_record{
- char *domain;
- unsigned type;
- unsigned class;
- unsigned ttl;
- unsigned size;
- union {
- void *data;
- struct mx_record *mx;
- struct mx_record *afsdb; /* mx and afsdb are identical */
- struct srv_record *srv;
- struct in_addr *a;
- char *txt;
- }u;
- struct resource_record *next;
-};
-
-#ifndef T_A /* XXX if <arpa/nameser.h> isn't included */
-typedef int HEADER; /* will never be used */
-#endif
-
-struct dns_reply{
- HEADER h;
- struct dns_query q;
- struct resource_record *head;
-};
-
-
-struct dns_reply* dns_lookup(const char *, const char *);
-void dns_free_data(struct dns_reply *);
-
-#endif /* __RESOLVE_H__ */
diff --git a/crypto/kerberosIV/lib/roken/resource.h b/crypto/kerberosIV/lib/roken/resource.h
deleted file mode 100644
index 01cd01d76c8c..000000000000
--- a/crypto/kerberosIV/lib/roken/resource.h
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/lib/roken/roken-common.h b/crypto/kerberosIV/lib/roken/roken-common.h
deleted file mode 100644
index 0bb648b07cf9..000000000000
--- a/crypto/kerberosIV/lib/roken/roken-common.h
+++ /dev/null
@@ -1,255 +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: roken-common.h,v 1.19 1999/12/02 16:58:52 joda Exp $ */
-
-#ifndef __ROKEN_COMMON_H__
-#define __ROKEN_COMMON_H__
-
-#ifndef INADDR_NONE
-#define INADDR_NONE 0xffffffff
-#endif
-
-#ifndef SOMAXCONN
-#define SOMAXCONN 5
-#endif
-
-#ifndef STDIN_FILENO
-#define STDIN_FILENO 0
-#endif
-
-#ifndef STDOUT_FILENO
-#define STDOUT_FILENO 1
-#endif
-
-#ifndef STDERR_FILENO
-#define STDERR_FILENO 2
-#endif
-
-#ifndef max
-#define max(a,b) (((a)>(b))?(a):(b))
-#endif
-
-#ifndef min
-#define min(a,b) (((a)<(b))?(a):(b))
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef LOG_DAEMON
-#define openlog(id,option,facility) openlog((id),(option))
-#define LOG_DAEMON 0
-#endif
-#ifndef LOG_ODELAY
-#define LOG_ODELAY 0
-#endif
-#ifndef LOG_NDELAY
-#define LOG_NDELAY 0x08
-#endif
-#ifndef LOG_CONS
-#define LOG_CONS 0
-#endif
-#ifndef LOG_AUTH
-#define LOG_AUTH 0
-#endif
-#ifndef LOG_AUTHPRIV
-#define LOG_AUTHPRIV LOG_AUTH
-#endif
-
-#ifndef F_OK
-#define F_OK 0
-#endif
-
-#ifndef O_ACCMODE
-#define O_ACCMODE 003
-#endif
-
-#ifndef _PATH_DEVNULL
-#define _PATH_DEVNULL "/dev/null"
-#endif
-
-#ifndef _PATH_HEQUIV
-#define _PATH_HEQUIV "/etc/hosts.equiv"
-#endif
-
-#ifndef MAXPATHLEN
-#define MAXPATHLEN (1024+4)
-#endif
-
-#ifndef SIG_ERR
-#define SIG_ERR ((RETSIGTYPE (*)())-1)
-#endif
-
-#ifndef HOST_NOT_FOUND
-#define HOST_NOT_FOUND 1
-#endif
-
-#ifndef TRY_AGAIN
-#define TRY_AGAIN 2
-#endif
-
-#ifndef NO_RECOVERY
-#define NO_RECOVERY 3
-#endif
-
-#ifndef NO_DATA
-#define NO_DATA 4
-#endif
-
-#ifndef NO_ADDRESS
-#define NO_ADDRESS NO_DATA
-#endif
-
-#if 0
-
-struct addrinfo {
- int ai_flags;
- int ai_family;
- int ai_socktype;
- int ai_protocol;
- size_t ai_addrlen;
- char *ai_canonname;
- struct sockaddr *ai_addr;
- struct addrinfo *ai_next;
-};
-
-#define EAI_ADDRFAMILY 1 /* address family for nodename not supported */
-#define EAI_AGAIN 2 /* temporary failure in name resolution */
-#define EAI_BADFLAGS 3 /* invalid value for ai_flags */
-#define EAI_FAIL 4 /* non-recoverable failure in name resolution */
-#define EAI_FAMILY 5 /* ai_family not supported */
-#define EAI_MEMORY 6 /* memory allocation failure */
-#define EAI_NODATA 7 /* no address associated with nodename */
-#define EAI_NONAME 8 /* nodename nor servname provided, or not known */
-#define EAI_SERVICE 9 /* servname not supported for ai_socktype */
-#define EAI_SOCKTYPE 10 /* ai_socktype not supported */
-#define EAI_SYSTEM 11 /* system error returned in errno */
-
-/* flags for getaddrinfo() */
-
-#define AI_PASSIVE 0x01
-#define AI_CANONNAME 0x02
-#define AI_NUMERICHOST 0x04
-
-#endif
-
-/*
- * constants for inet_ntop
- */
-
-#ifndef INET_ADDRSTRLEN
-#define INET_ADDRSTRLEN 16
-#endif
-
-#ifndef INET6_ADDRSTRLEN
-#define INET6_ADDRSTRLEN 46
-#endif
-
-/*
- * for shutdown(2)
- */
-
-#ifndef SHUT_RD
-#define SHUT_RD 0
-#endif
-
-#ifndef SHUT_WR
-#define SHUT_WR 1
-#endif
-
-#ifndef SHUT_RDWR
-#define SHUT_RDWR 2
-#endif
-
-#ifndef HAVE___ATTRIBUTE__
-#define __attribute__(x)
-#endif
-
-#if IRIX != 4 /* fix for compiler bug */
-#ifdef RETSIGTYPE
-typedef RETSIGTYPE (*SigAction)(/* int??? */);
-SigAction signal(int iSig, SigAction pAction); /* BSD compatible */
-#endif
-#endif
-
-int ROKEN_LIB_FUNCTION simple_execve(const char*, char*const[], char*const[]);
-int ROKEN_LIB_FUNCTION simple_execvp(const char*, char *const[]);
-int ROKEN_LIB_FUNCTION simple_execlp(const char*, ...);
-int ROKEN_LIB_FUNCTION simple_execle(const char*, ...);
-
-void ROKEN_LIB_FUNCTION print_version(const char *);
-
-void *ROKEN_LIB_FUNCTION emalloc (size_t);
-void *ROKEN_LIB_FUNCTION erealloc (void *, size_t);
-char *ROKEN_LIB_FUNCTION estrdup (const char *);
-
-ssize_t ROKEN_LIB_FUNCTION eread (int fd, void *buf, size_t nbytes);
-ssize_t ROKEN_LIB_FUNCTION ewrite (int fd, const void *buf, size_t nbytes);
-
-void
-socket_set_address_and_port (struct sockaddr *sa, const void *ptr, int port);
-
-size_t
-socket_addr_size (const struct sockaddr *sa);
-
-void
-socket_set_any (struct sockaddr *sa, int af);
-
-size_t
-socket_sockaddr_size (const struct sockaddr *sa);
-
-void *
-socket_get_address (struct sockaddr *sa);
-
-int
-socket_get_port (const struct sockaddr *sa);
-
-void
-socket_set_port (struct sockaddr *sa, int port);
-
-void
-socket_set_debug (int sock);
-
-void
-socket_set_tos (int sock, int tos);
-
-void
-socket_set_reuseaddr (int sock, int val);
-
-#endif /* __ROKEN_COMMON_H__ */
diff --git a/crypto/kerberosIV/lib/roken/roken.awk b/crypto/kerberosIV/lib/roken/roken.awk
deleted file mode 100644
index 626fae5906e0..000000000000
--- a/crypto/kerberosIV/lib/roken/roken.awk
+++ /dev/null
@@ -1,35 +0,0 @@
-BEGIN {
- print "#include <stdio.h>"
- print "#ifdef HAVE_CONFIG_H"
- print "#include <config.h>"
- print "#endif"
- print ""
- print "int main()"
- print "{"
- print "puts(\"/* This is an OS dependent, generated file */\");"
- print "puts(\"\\n\");"
- print "puts(\"#ifndef __ROKEN_H__\");"
- print "puts(\"#define __ROKEN_H__\");"
- print "puts(\"\");"
-}
-END {
- print "puts(\"#endif /* __ROKEN_H__ */\");"
- print "exit(0);"
- print "}"
-}
-
-$1 == "\#ifdef" || $1 == "\#ifndef" || $1 == "\#if" || $1 == "\#else" || $1 == "\#elif" || $1 == "\#endif" || $1 == "#ifdef" || $1 == "#ifndef" || $1 == "#if" || $1 == "#else" || $1 == "#elif" || $1 == "#endif" {
- print $0;
- next
-}
-
-{
- s = ""
- for(i = 1; i <= length; i++){
- x = substr($0, i, 1)
- if(x == "\"" || x == "\\")
- s = s "\\";
- s = s x;
- }
- print "puts(\"" s "\");"
-}
diff --git a/crypto/kerberosIV/lib/roken/roken.dsp b/crypto/kerberosIV/lib/roken/roken.dsp
deleted file mode 100644
index d84854e3d30d..000000000000
--- a/crypto/kerberosIV/lib/roken/roken.dsp
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/lib/roken/roken.h.in b/crypto/kerberosIV/lib/roken/roken.h.in
deleted file mode 100644
index 65263ba8a095..000000000000
--- a/crypto/kerberosIV/lib/roken/roken.h.in
+++ /dev/null
@@ -1,505 +0,0 @@
-/* -*- C -*- */
-/*
- * 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: roken.h.in,v 1.125 1999/12/02 16:58:52 joda Exp $ */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <signal.h>
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_SYS_UIO_H
-#include <sys/uio.h>
-#endif
-#ifdef HAVE_GRP_H
-#include <grp.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.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_SYSLOG_H
-#include <syslog.h>
-#endif
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifdef HAVE_ERR_H
-#include <err.h>
-#endif
-#ifdef HAVE_TERMIOS_H
-#include <termios.h>
-#endif
-#if defined(HAVE_SYS_IOCTL_H) && SunOS != 40
-#include <sys/ioctl.h>
-#endif
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#elif defined(HAVE_SYS_TIME_H)
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif
-
-#ifdef HAVE_PATHS_H
-#include <paths.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef ROKEN_LIB_FUNCTION
-#if defined(__BORLANDC__)
-#define ROKEN_LIB_FUNCTION /* not-ready-definition-yet */
-#elif defined(_MSC_VER)
-#define ROKEN_LIB_FUNCTION /* not-ready-definition-yet2 */
-#else
-#define ROKEN_LIB_FUNCTION
-#endif
-#endif
-
-#include <roken-common.h>
-
-#if !defined(HAVE_SETSID) && defined(HAVE__SETSID)
-#define setsid _setsid
-#endif
-
-#ifndef HAVE_PUTENV
-int putenv(const char *string);
-#endif
-
-#if !defined(HAVE_SETENV) || defined(NEED_SETENV_PROTO)
-int setenv(const char *var, const char *val, int rewrite);
-#endif
-
-#if !defined(HAVE_UNSETENV) || defined(NEED_UNSETENV_PROTO)
-void unsetenv(const char *name);
-#endif
-
-#if !defined(HAVE_GETUSERSHELL) || defined(NEED_GETUSERSHELL_PROTO)
-char *getusershell(void);
-void endusershell(void);
-#endif
-
-#if !defined(HAVE_SNPRINTF) || defined(NEED_SNPRINTF_PROTO)
-int snprintf (char *str, size_t sz, const char *format, ...)
- __attribute__ ((format (printf, 3, 4)));
-#endif
-
-#if !defined(HAVE_VSNPRINTF) || defined(NEED_VSNPRINTF_PROTO)
-int vsnprintf (char *str, size_t sz, const char *format, va_list ap)
- __attribute__((format (printf, 3, 0)));
-#endif
-
-#if !defined(HAVE_ASPRINTF) || defined(NEED_ASPRINTF_PROTO)
-int asprintf (char **ret, const char *format, ...)
- __attribute__ ((format (printf, 2, 3)));
-#endif
-
-#if !defined(HAVE_VASPRINTF) || defined(NEED_VASPRINTF_PROTO)
-int vasprintf (char **ret, const char *format, va_list ap)
- __attribute__((format (printf, 2, 0)));
-#endif
-
-#if !defined(HAVE_ASNPRINTF) || defined(NEED_ASNPRINTF_PROTO)
-int asnprintf (char **ret, size_t max_sz, const char *format, ...)
- __attribute__ ((format (printf, 3, 4)));
-#endif
-
-#if !defined(HAVE_VASNPRINTF) || defined(NEED_VASNPRINTF_PROTO)
-int vasnprintf (char **ret, size_t max_sz, const char *format, va_list ap)
- __attribute__((format (printf, 3, 0)));
-#endif
-
-#ifndef HAVE_STRDUP
-char * strdup(const char *old);
-#endif
-
-#ifndef HAVE_STRNDUP
-char * strndup(const char *old, size_t sz);
-#endif
-
-#ifndef HAVE_STRLWR
-char * strlwr(char *);
-#endif
-
-#ifndef HAVE_STRNLEN
-size_t strnlen(const char*, size_t);
-#endif
-
-#if !defined(HAVE_STRSEP) || defined(NEED_STRSEP_PROTO)
-char *strsep(char**, const char*);
-#endif
-
-#ifndef HAVE_STRCASECMP
-int strcasecmp(const char *s1, const char *s2);
-#endif
-
-#ifdef NEED_FCLOSE_PROTO
-int fclose(FILE *);
-#endif
-
-#ifdef NEED_STRTOK_R_PROTO
-char *strtok_r(char *s1, const char *s2, char **lasts);
-#endif
-
-#ifndef HAVE_STRUPR
-char * strupr(char *);
-#endif
-
-#ifndef HAVE_STRLCPY
-size_t strlcpy (char *dst, const char *src, size_t dst_sz);
-#endif
-
-#ifndef HAVE_STRLCAT
-size_t strlcat (char *dst, const char *src, size_t dst_sz);
-#endif
-
-#ifndef HAVE_GETDTABLESIZE
-int getdtablesize(void);
-#endif
-
-#if !defined(HAVE_STRERROR) && !defined(strerror)
-char *strerror(int eno);
-#endif
-
-#if !defined(HAVE_HSTRERROR) || defined(NEED_HSTRERROR_PROTO)
-/* This causes a fatal error under Psoriasis */
-#if !(defined(SunOS) && (SunOS >= 50))
-const char *hstrerror(int herr);
-#endif
-#endif
-
-#ifndef HAVE_H_ERRNO_DECLARATION
-extern int h_errno;
-#endif
-
-#if !defined(HAVE_INET_ATON) || defined(NEED_INET_ATON_PROTO)
-int inet_aton(const char *cp, struct in_addr *adr);
-#endif
-
-#ifndef HAVE_INET_NTOP
-const char *
-inet_ntop(int af, const void *src, char *dst, size_t size);
-#endif
-
-#ifndef HAVE_INET_PTON
-int
-inet_pton(int af, const char *src, void *dst);
-#endif
-
-#if !defined(HAVE_GETCWD)
-char* getcwd(char *path, size_t size);
-#endif
-
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-struct passwd *k_getpwnam (const char *user);
-struct passwd *k_getpwuid (uid_t uid);
-#endif
-
-const char *get_default_username (void);
-
-#ifndef HAVE_SETEUID
-int seteuid(uid_t euid);
-#endif
-
-#ifndef HAVE_SETEGID
-int setegid(gid_t egid);
-#endif
-
-#ifndef HAVE_LSTAT
-int lstat(const char *path, struct stat *buf);
-#endif
-
-#if !defined(HAVE_MKSTEMP) || defined(NEED_MKSTEMP_PROTO)
-int mkstemp(char *);
-#endif
-
-#ifndef HAVE_CGETENT
-int cgetent(char **buf, char **db_array, const char *name);
-int cgetstr(char *buf, const char *cap, char **str);
-#endif
-
-#ifndef HAVE_INITGROUPS
-int initgroups(const char *name, gid_t basegid);
-#endif
-
-#ifndef HAVE_FCHOWN
-int fchown(int fd, uid_t owner, gid_t group);
-#endif
-
-#ifndef HAVE_DAEMON
-int daemon(int nochdir, int noclose);
-#endif
-
-#ifndef HAVE_INNETGR
-int innetgr(const char *netgroup, const char *machine,
- const char *user, const char *domain);
-#endif
-
-#ifndef HAVE_CHOWN
-int chown(const char *path, uid_t owner, gid_t group);
-#endif
-
-#ifndef HAVE_RCMD
-int rcmd(char **ahost, unsigned short inport, const char *locuser,
- const char *remuser, const char *cmd, int *fd2p);
-#endif
-
-#if !defined(HAVE_INNETGR) || defined(NEED_INNETGR_PROTO)
-int innetgr(const char*, const char*, const char*, const char*);
-#endif
-
-#ifndef HAVE_IRUSEROK
-int iruserok(unsigned raddr, int superuser, const char *ruser,
- const char *luser);
-#endif
-
-#if !defined(HAVE_GETHOSTNAME) || defined(NEED_GETHOSTNAME_PROTO)
-int gethostname(char *name, int namelen);
-#endif
-
-#ifndef HAVE_WRITEV
-ssize_t
-writev(int d, const struct iovec *iov, int iovcnt);
-#endif
-
-#ifndef HAVE_READV
-ssize_t
-readv(int d, const struct iovec *iov, int iovcnt);
-#endif
-
-#ifndef HAVE_MKSTEMP
-int
-mkstemp(char *template);
-#endif
-
-#ifndef HAVE_FLOCK
-#ifndef LOCK_SH
-#define LOCK_SH 1 /* Shared lock */
-#endif
-#ifndef LOCK_EX
-#define LOCK_EX 2 /* Exclusive lock */
-#endif
-#ifndef LOCK_NB
-#define LOCK_NB 4 /* Don't block when locking */
-#endif
-#ifndef LOCK_UN
-#define LOCK_UN 8 /* Unlock */
-#endif
-
-int flock(int fd, int operation);
-#endif /* HAVE_FLOCK */
-
-time_t tm2time (struct tm tm, int local);
-
-int unix_verify_user(char *user, char *password);
-
-void inaddr2str(struct in_addr addr, char *s, size_t len);
-
-void mini_inetd (int port);
-
-int roken_concat (char *s, size_t len, ...);
-
-size_t roken_mconcat (char **s, size_t max_len, ...);
-
-int roken_vconcat (char *s, size_t len, va_list args);
-
-size_t roken_vmconcat (char **s, size_t max_len, va_list args);
-
-ssize_t net_write (int fd, const void *buf, size_t nbytes);
-
-ssize_t net_read (int fd, void *buf, size_t nbytes);
-
-int issuid(void);
-
-#ifndef HAVE_STRUCT_WINSIZE
-struct winsize {
- unsigned short ws_row, ws_col;
- unsigned short ws_xpixel, ws_ypixel;
-};
-#endif
-
-int get_window_size(int fd, struct winsize *);
-
-#ifndef HAVE_VSYSLOG
-void vsyslog(int pri, const char *fmt, va_list ap);
-#endif
-
-#ifndef HAVE_OPTARG_DECLARATION
-extern char *optarg;
-#endif
-#ifndef HAVE_OPTIND_DECLARATION
-extern int optind;
-#endif
-#ifndef HAVE_OPTERR_DECLARATION
-extern int opterr;
-#endif
-
-#ifndef HAVE___PROGNAME_DECLARATION
-extern const char *__progname;
-#endif
-
-#ifndef HAVE_ENVIRON_DECLARATION
-extern char **environ;
-#endif
-
-#ifndef HAVE_GETIPNODEBYNAME
-struct hostent *
-getipnodebyname (const char *name, int af, int flags, int *error_num);
-#endif
-
-#ifndef HAVE_GETIPNODEBYADDR
-struct hostent *
-getipnodebyaddr (const void *src, size_t len, int af, int *error_num);
-#endif
-
-#ifndef HAVE_FREEHOSTENT
-void
-freehostent (struct hostent *h);
-#endif
-
-#ifndef HAVE_COPYHOSTENT
-struct hostent *
-copyhostent (const struct hostent *h);
-#endif
-
-#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
-
-#ifndef HAVE_SA_FAMILY_T
-typedef unsigned short sa_family_t;
-#endif
-
-#if HAVE_STRUCT_SOCKADDR_SA_LEN
-
-struct sockaddr_storage {
- unsigned char __ss_len;
- sa_family_t __ss_family;
- char pad[
-#ifdef HAVE_IPV6
- sizeof(struct sockaddr_in6)
-#else
- sizeof(struct sockaddr_in)
-#endif
- - sizeof(unsigned char) - sizeof(sa_family_t)];
-};
-
-#else
-
-struct sockaddr_storage {
- sa_family_t __ss_family;
- char pad[
-#ifdef HAVE_IPV6
- sizeof(struct sockaddr_in6)
-#else
- sizeof(struct sockaddr_in)
-#endif
- - sizeof(sa_family_t)];
-};
-
-#endif
-
-#endif /* HAVE_STRUCT_SOCKADDR_STORAGE */
-
-/*
- * kludges and such
- */
-
-#if 1
-int roken_gethostby_setup(const char*, const char*);
-struct hostent* roken_gethostbyname(const char*);
-struct hostent* roken_gethostbyaddr(const void*, size_t, int);
-#else
-#ifdef GETHOSTBYNAME_PROTO_COMPATIBLE
-#define roken_gethostbyname(x) gethostbyname(x)
-#else
-#define roken_gethostbyname(x) gethostbyname((char *)x)
-#endif
-
-#ifdef GETHOSTBYADDR_PROTO_COMPATIBLE
-#define roken_gethostbyaddr(a, l, t) gethostbyaddr(a, l, t)
-#else
-#define roken_gethostbyaddr(a, l, t) gethostbyaddr((char *)a, l, t)
-#endif
-#endif
-
-#ifdef GETSERVBYNAME_PROTO_COMPATIBLE
-#define roken_getservbyname(x,y) getservbyname(x,y)
-#else
-#define roken_getservbyname(x,y) getservbyname((char *)x, (char *)y)
-#endif
-
-#ifdef OPENLOG_PROTO_COMPATIBLE
-#define roken_openlog(a,b,c) openlog(a,b,c)
-#else
-#define roken_openlog(a,b,c) openlog((char *)a,b,c)
-#endif
-
-void set_progname(char *argv0);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/crypto/kerberosIV/lib/roken/roken.rc b/crypto/kerberosIV/lib/roken/roken.rc
deleted file mode 100644
index e7e2f3e499ca..000000000000
--- a/crypto/kerberosIV/lib/roken/roken.rc
+++ /dev/null
@@ -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
-
diff --git a/crypto/kerberosIV/lib/roken/roken_gethostby.c b/crypto/kerberosIV/lib/roken/roken_gethostby.c
deleted file mode 100644
index 8eb23258cdc3..000000000000
--- a/crypto/kerberosIV/lib/roken/roken_gethostby.c
+++ /dev/null
@@ -1,280 +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. 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: roken_gethostby.c,v 1.4 1999/12/02 16:58:52 joda Exp $");
-#endif
-
-#include <roken.h>
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-
-#undef roken_gethostbyname
-#undef roken_gethostbyaddr
-
-static struct sockaddr_in dns_addr;
-static char *dns_req;
-
-static int
-make_address(const char *address, struct in_addr *ip)
-{
- if(inet_aton(address, ip) == 0){
- /* try to resolve as hostname, it might work if the address we
- are trying to lookup is local, for instance a web proxy */
- struct hostent *he = gethostbyname(address);
- if(he) {
- unsigned char *p = (unsigned char*)he->h_addr;
- ip->s_addr = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
- } else {
- return -1;
- }
- }
- return 0;
-}
-
-static int
-setup_int(const char *proxy_host, short proxy_port,
- const char *dns_host, short dns_port,
- const char *dns_path)
-{
- memset(&dns_addr, 0, sizeof(dns_addr));
- if(dns_req)
- free(dns_req);
- if(proxy_host) {
- if(make_address(proxy_host, &dns_addr.sin_addr) != 0)
- return -1;
- dns_addr.sin_port = htons(proxy_port);
- asprintf(&dns_req, "http://%s:%d%s", dns_host, dns_port, dns_path);
- } else {
- if(make_address(dns_host, &dns_addr.sin_addr) != 0)
- return -1;
- dns_addr.sin_port = htons(dns_port);
- asprintf(&dns_req, "%s", dns_path);
- }
- dns_addr.sin_family = AF_INET;
- return 0;
-}
-
-static void
-split_spec(const char *spec, char **host, int *port, char **path, int def_port)
-{
- char *p;
- *host = strdup(spec);
- p = strchr(*host, ':');
- if(p) {
- *p++ = '\0';
- if(sscanf(p, "%d", port) != 1)
- *port = def_port;
- } else
- *port = def_port;
- p = strchr(p ? p : *host, '/');
- if(p) {
- if(path)
- *path = strdup(p);
- *p = '\0';
- }else
- if(path)
- *path = NULL;
-}
-
-
-int
-roken_gethostby_setup(const char *proxy_spec, const char *dns_spec)
-{
- char *proxy_host = NULL;
- int proxy_port;
- char *dns_host, *dns_path;
- int dns_port;
-
- int ret = -1;
-
- split_spec(dns_spec, &dns_host, &dns_port, &dns_path, 80);
- if(dns_path == NULL)
- goto out;
- if(proxy_spec)
- split_spec(proxy_spec, &proxy_host, &proxy_port, NULL, 80);
- ret = setup_int(proxy_host, proxy_port, dns_host, dns_port, dns_path);
-out:
- free(proxy_host);
- free(dns_host);
- free(dns_path);
- return ret;
-}
-
-
-/* Try to lookup a name or an ip-address using http as transport
- mechanism. See the end of this file for an example program. */
-static struct hostent*
-roken_gethostby(const char *hostname)
-{
- int s;
- struct sockaddr_in sin;
- char *request;
- char buf[1024];
- int offset = 0;
- int n;
- char *p, *foo;
-
- if(dns_addr.sin_family == 0)
- return NULL; /* no configured host */
- sin = dns_addr;
- asprintf(&request, "GET %s?%s HTTP/1.0\r\n\r\n", dns_req, hostname);
- if(request == NULL)
- return NULL;
- s = socket(AF_INET, SOCK_STREAM, 0);
- if(s < 0) {
- free(request);
- return NULL;
- }
- if(connect(s, (struct sockaddr*)&sin, sizeof(sin)) < 0) {
- close(s);
- free(request);
- return NULL;
- }
- if(write(s, request, strlen(request)) != strlen(request)) {
- close(s);
- free(request);
- return NULL;
- }
- free(request);
- while(1) {
- n = read(s, buf + offset, sizeof(buf) - offset);
- if(n <= 0)
- break;
- offset += n;
- }
- buf[offset] = '\0';
- close(s);
- p = strstr(buf, "\r\n\r\n"); /* find end of header */
- if(p) p += 4;
- else return NULL;
- foo = NULL;
- p = strtok_r(p, " \t\r\n", &foo);
- if(p == NULL)
- return NULL;
- {
- /* make a hostent to return */
-#define MAX_ADDRS 16
- static struct hostent he;
- static char addrs[4 * MAX_ADDRS];
- static char *addr_list[MAX_ADDRS];
- int num_addrs = 0;
-
- he.h_name = p;
- he.h_aliases = NULL;
- he.h_addrtype = AF_INET;
- he.h_length = 4;
-
- while((p = strtok_r(NULL, " \t\r\n", &foo)) && num_addrs < MAX_ADDRS) {
- struct in_addr ip;
- inet_aton(p, &ip);
- ip.s_addr = ntohl(ip.s_addr);
- addr_list[num_addrs] = &addrs[num_addrs * 4];
- addrs[num_addrs * 4 + 0] = (ip.s_addr >> 24) & 0xff;
- addrs[num_addrs * 4 + 1] = (ip.s_addr >> 16) & 0xff;
- addrs[num_addrs * 4 + 2] = (ip.s_addr >> 8) & 0xff;
- addrs[num_addrs * 4 + 3] = (ip.s_addr >> 0) & 0xff;
- addr_list[++num_addrs] = NULL;
- }
- he.h_addr_list = addr_list;
- return &he;
- }
-}
-
-struct hostent*
-roken_gethostbyname(const char *hostname)
-{
- struct hostent *he;
- he = gethostbyname(hostname);
- if(he)
- return he;
- return roken_gethostby(hostname);
-}
-
-struct hostent*
-roken_gethostbyaddr(const void *addr, size_t len, int type)
-{
- struct in_addr a;
- const char *p;
- struct hostent *he;
- he = gethostbyaddr(addr, len, type);
- if(he)
- return he;
- if(type != AF_INET || len != 4)
- return NULL;
- p = addr;
- a.s_addr = htonl((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]);
- return roken_gethostby(inet_ntoa(a));
-}
-
-#if 0
-
-/* this program can be used as a cgi `script' to lookup names and
- ip-addresses */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <netdb.h>
-#include <sys/param.h>
-
-int
-main(int argc, char **argv)
-{
- char *query = getenv("QUERY_STRING");
- char host[MAXHOSTNAMELEN];
- int i;
- struct hostent *he;
-
- printf("Content-type: text/plain\n\n");
- if(query == NULL)
- exit(0);
- he = gethostbyname(query);
- strncpy(host, he->h_name, sizeof(host));
- host[sizeof(host) - 1] = '\0';
- he = gethostbyaddr(he->h_addr, he->h_length, AF_INET);
- printf("%s\n", he->h_name);
- for(i = 0; he->h_addr_list[i]; i++) {
- struct in_addr ip;
- unsigned char *p = (unsigned char*)he->h_addr_list[i];
- ip.s_addr = htonl((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]);
- printf("%s\n", inet_ntoa(ip));
- }
- exit(0);
-}
-
-#endif
diff --git a/crypto/kerberosIV/lib/roken/sendmsg.c b/crypto/kerberosIV/lib/roken/sendmsg.c
deleted file mode 100644
index 7075bf214211..000000000000
--- a/crypto/kerberosIV/lib/roken/sendmsg.c
+++ /dev/null
@@ -1,65 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: sendmsg.c,v 1.4 1999/12/02 16:58:52 joda Exp $");
-#endif
-
-#include "roken.h"
-
-ssize_t
-sendmsg(int s, const struct msghdr *msg, int flags)
-{
- ssize_t ret;
- size_t tot = 0;
- int i;
- char *buf, *p;
- struct iovec *iov = msg->msg_iov;
-
- for(i = 0; i < msg->msg_iovlen; ++i)
- tot += iov[i].iov_len;
- buf = malloc(tot);
- if (tot != 0 && buf == NULL) {
- errno = ENOMEM;
- return -1;
- }
- p = buf;
- for (i = 0; i < msg->msg_iovlen; ++i) {
- memcpy (p, iov[i].iov_base, iov[i].iov_len);
- p += iov[i].iov_len;
- }
- ret = sendto (s, buf, tot, flags, msg->msg_name, msg->msg_namelen);
- free (buf);
- return ret;
-}
diff --git a/crypto/kerberosIV/lib/roken/simple_exec.c b/crypto/kerberosIV/lib/roken/simple_exec.c
deleted file mode 100644
index 426f494fcc04..000000000000
--- a/crypto/kerberosIV/lib/roken/simple_exec.c
+++ /dev/null
@@ -1,171 +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. 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: simple_exec.c,v 1.6 1999/12/02 16:58:52 joda Exp $");
-#endif
-
-#include <stdarg.h>
-#include <stdlib.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <errno.h>
-
-#include <roken.h>
-
-#define EX_NOEXEC 126
-#define EX_NOTFOUND 127
-
-/* return values:
- -1 on `unspecified' system errors
- -2 on fork failures
- -3 on waitpid errors
- 0- is return value from subprocess
- 126 if the program couldn't be executed
- 127 if the program couldn't be found
- 128- is 128 + signal that killed subprocess
- */
-
-static int
-check_status(pid_t pid)
-{
- while(1) {
- int status;
-
- while(waitpid(pid, &status, 0) < 0)
- if (errno != EINTR)
- return -3;
- if(WIFSTOPPED(status))
- continue;
- if(WIFEXITED(status))
- return WEXITSTATUS(status);
- if(WIFSIGNALED(status))
- return WTERMSIG(status) + 128;
- }
-}
-
-int
-simple_execvp(const char *file, char *const args[])
-{
- pid_t pid = fork();
- switch(pid){
- case -1:
- return -2;
- case 0:
- execvp(file, args);
- exit((errno == ENOENT) ? EX_NOTFOUND : EX_NOEXEC);
- default:
- return check_status(pid);
- }
-}
-
-/* gee, I'd like a execvpe */
-int
-simple_execve(const char *file, char *const args[], char *const envp[])
-{
- pid_t pid = fork();
- switch(pid){
- case -1:
- return -2;
- case 0:
- execve(file, args, envp);
- exit((errno == ENOENT) ? EX_NOTFOUND : EX_NOEXEC);
- default:
- return check_status(pid);
- }
-}
-
-static char **
-collect_args(va_list *ap)
-{
- char **argv = NULL;
- int argc = 0, i = 0;
- do {
- if(i == argc) {
- /* realloc argv */
- char **tmp = realloc(argv, (argc + 5) * sizeof(*argv));
- if(tmp == NULL) {
- errno = ENOMEM;
- return NULL;
- }
- argv = tmp;
- argc += 5;
- }
- argv[i++] = va_arg(*ap, char*);
- } while(argv[i - 1] != NULL);
- return argv;
-}
-
-int
-simple_execlp(const char *file, ...)
-{
- va_list ap;
- char **argv;
- int ret;
-
- va_start(ap, file);
- argv = collect_args(&ap);
- va_end(ap);
- if(argv == NULL)
- return -1;
- ret = simple_execvp(file, argv);
- free(argv);
- return ret;
-}
-
-int
-simple_execle(const char *file, ... /* ,char *const envp[] */)
-{
- va_list ap;
- char **argv;
- char *const* envp;
- int ret;
-
- va_start(ap, file);
- argv = collect_args(&ap);
- envp = va_arg(ap, char **);
- va_end(ap);
- if(argv == NULL)
- return -1;
- ret = simple_execve(file, argv, envp);
- free(argv);
- return ret;
-}
diff --git a/crypto/kerberosIV/lib/roken/socket.c b/crypto/kerberosIV/lib/roken/socket.c
deleted file mode 100644
index 6e9c3dfe9b0a..000000000000
--- a/crypto/kerberosIV/lib/roken/socket.c
+++ /dev/null
@@ -1,282 +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 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: socket.c,v 1.3 1999/12/02 16:58:52 joda Exp $");
-#endif
-
-#include <string.h>
-#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_IN_SYSTM_H
-#include <netinet/in_systm.h>
-#endif
-#ifdef HAVE_NETINET_IP_H
-#include <netinet/ip.h>
-#endif
-
-#include <roken.h>
-
-#include <err.h>
-
-/*
- * Set `sa' to the unitialized address of address family `af'
- */
-
-void
-socket_set_any (struct sockaddr *sa, int af)
-{
- switch (af) {
- case AF_INET : {
- struct sockaddr_in *sin = (struct sockaddr_in *)sa;
-
- memset (sin, 0, sizeof(*sin));
- sin->sin_family = AF_INET;
- sin->sin_port = 0;
- sin->sin_addr.s_addr = INADDR_ANY;
- break;
- }
-#ifdef HAVE_IPV6
- case AF_INET6 : {
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
-
- memset (sin6, 0, sizeof(*sin6));
- sin6->sin6_family = AF_INET6;
- sin6->sin6_port = 0;
- sin6->sin6_addr = in6addr_any;
- break;
- }
-#endif
- default :
- errx (1, "unknown address family %d", sa->sa_family);
- break;
- }
-}
-
-/*
- * set `sa' to (`ptr', `port')
- */
-
-void
-socket_set_address_and_port (struct sockaddr *sa, const void *ptr, int port)
-{
- switch (sa->sa_family) {
- case AF_INET : {
- struct sockaddr_in *sin = (struct sockaddr_in *)sa;
-
- memset (sin, 0, sizeof(*sin));
- sin->sin_family = AF_INET;
- sin->sin_port = port;
- memcpy (&sin->sin_addr, ptr, sizeof(struct in_addr));
- break;
- }
-#ifdef HAVE_IPV6
- case AF_INET6 : {
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
-
- memset (sin6, 0, sizeof(*sin6));
- sin6->sin6_family = AF_INET6;
- sin6->sin6_port = port;
- memcpy (&sin6->sin6_addr, ptr, sizeof(struct in6_addr));
- break;
- }
-#endif
- default :
- errx (1, "unknown address family %d", sa->sa_family);
- break;
- }
-}
-
-/*
- * Return the size of an address of the type in `sa'
- */
-
-size_t
-socket_addr_size (const struct sockaddr *sa)
-{
- switch (sa->sa_family) {
- case AF_INET :
- return sizeof(struct in_addr);
-#ifdef HAVE_IPV6
- case AF_INET6 :
- return sizeof(struct in6_addr);
-#endif
- default :
- errx (1, "unknown address family %d", sa->sa_family);
- break;
- }
-}
-
-/*
- * Return the size of a `struct sockaddr' in `sa'.
- */
-
-size_t
-socket_sockaddr_size (const struct sockaddr *sa)
-{
- switch (sa->sa_family) {
- case AF_INET :
- return sizeof(struct sockaddr_in);
-#ifdef HAVE_IPV6
- case AF_INET6 :
- return sizeof(struct sockaddr_in6);
-#endif
- default :
- errx (1, "unknown address family %d", sa->sa_family);
- break;
- }
-}
-
-/*
- * Return the binary address of `sa'.
- */
-
-void *
-socket_get_address (struct sockaddr *sa)
-{
- switch (sa->sa_family) {
- case AF_INET : {
- struct sockaddr_in *sin = (struct sockaddr_in *)sa;
- return &sin->sin_addr;
- }
-#ifdef HAVE_IPV6
- case AF_INET6 : {
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
- return &sin6->sin6_addr;
- }
-#endif
- default :
- errx (1, "unknown address family %d", sa->sa_family);
- break;
- }
-}
-
-/*
- * Return the port number from `sa'.
- */
-
-int
-socket_get_port (const struct sockaddr *sa)
-{
- switch (sa->sa_family) {
- case AF_INET : {
- const struct sockaddr_in *sin = (const struct sockaddr_in *)sa;
- return sin->sin_port;
- }
-#ifdef HAVE_IPV6
- case AF_INET6 : {
- const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sa;
- return sin6->sin6_port;
- }
-#endif
- default :
- errx (1, "unknown address family %d", sa->sa_family);
- break;
- }
-}
-
-/*
- * Set the port in `sa' to `port'.
- */
-
-void
-socket_set_port (struct sockaddr *sa, int port)
-{
- switch (sa->sa_family) {
- case AF_INET : {
- struct sockaddr_in *sin = (struct sockaddr_in *)sa;
- sin->sin_port = port;
- break;
- }
-#ifdef HAVE_IPV6
- case AF_INET6 : {
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
- sin6->sin6_port = port;
- break;
- }
-#endif
- default :
- errx (1, "unknown address family %d", sa->sa_family);
- break;
- }
-}
-
-/*
- * Enable debug on `sock'.
- */
-
-void
-socket_set_debug (int sock)
-{
- int on = 1;
-
-#if defined(SO_DEBUG) && defined(HAVE_SETSOCKOPT)
- if (setsockopt (sock, SOL_SOCKET, SO_DEBUG, (void *) &on, sizeof (on)) < 0)
- warn ("setsockopt SO_DEBUG (ignored)");
-#endif
-}
-
-/*
- * Set the type-of-service of `sock' to `tos'.
- */
-
-void
-socket_set_tos (int sock, int tos)
-{
-#if defined(IP_TOS) && defined(HAVE_SETSOCKOPT)
- if (setsockopt (sock, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof (int)) < 0)
- warn ("setsockopt TOS (ignored)");
-#endif
-}
-
-/*
- * set the reuse of addresses on `sock' to `val'.
- */
-
-void
-socket_set_reuseaddr (int sock, int val)
-{
-#if defined(SO_REUSEADDR) && defined(HAVE_SETSOCKOPT)
- if(setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&val,
- sizeof(val)) < 0)
- err (1, "setsockopt SO_REUSEADDR");
-#endif
-}
diff --git a/crypto/kerberosIV/lib/roken/strlcat.c b/crypto/kerberosIV/lib/roken/strlcat.c
deleted file mode 100644
index d3c8baa6cc35..000000000000
--- a/crypto/kerberosIV/lib/roken/strlcat.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 - 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "roken.h"
-
-RCSID("$Id: strlcat.c,v 1.5 1999/12/02 16:58:53 joda Exp $");
-
-#ifndef HAVE_STRLCAT
-
-size_t
-strlcat (char *dst, const char *src, size_t dst_sz)
-{
- size_t len = strlen(dst);
-
- return len + strlcpy (dst + len, src, dst_sz - len);
-}
-#endif
diff --git a/crypto/kerberosIV/lib/roken/strlcpy.c b/crypto/kerberosIV/lib/roken/strlcpy.c
deleted file mode 100644
index 33cd9cb2af36..000000000000
--- a/crypto/kerberosIV/lib/roken/strlcpy.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1995 - 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "roken.h"
-
-RCSID("$Id: strlcpy.c,v 1.5 1999/12/02 16:58:53 joda Exp $");
-
-#ifndef HAVE_STRLCPY
-
-size_t
-strlcpy (char *dst, const char *src, size_t dst_sz)
-{
- size_t n;
- char *p;
-
- for (p = dst, n = 0;
- n + 1 < dst_sz && *src != '\0';
- ++p, ++src, ++n)
- *p = *src;
- *p = '\0';
- if (*src == '\0')
- return n;
- else
- return n + strlen (src);
-}
-
-#endif
diff --git a/crypto/kerberosIV/lib/roken/strncasecmp.c b/crypto/kerberosIV/lib/roken/strncasecmp.c
deleted file mode 100644
index 7c6474f78a3f..000000000000
--- a/crypto/kerberosIV/lib/roken/strncasecmp.c
+++ /dev/null
@@ -1,60 +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. 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: strncasecmp.c,v 1.2 1999/12/02 16:58:53 joda Exp $");
-#endif
-
-#include <string.h>
-#include <ctype.h>
-#include <stddef.h>
-
-#ifndef HAVE_STRNCASECMP
-
-int
-strncasecmp(const char *s1, const char *s2, size_t n)
-{
- while(n > 0 && toupper(*s1) == toupper(*s2)) {
- if(*s1 == '\0')
- return 0;
- s1++;
- s2++;
- n--;
- }
- if(n == 0)
- return 0;
- return toupper(*s1) - toupper(*s2);
-}
-
-#endif
diff --git a/crypto/kerberosIV/lib/roken/strndup.c b/crypto/kerberosIV/lib/roken/strndup.c
deleted file mode 100644
index 31e7e9f6a1c4..000000000000
--- a/crypto/kerberosIV/lib/roken/strndup.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1995 - 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: strndup.c,v 1.2 1999/12/02 16:58:53 joda Exp $");
-#endif
-#include <stdlib.h>
-#include <string.h>
-
-#include <roken.h>
-
-#ifndef HAVE_STRNDUP
-char *
-strndup(const char *old, size_t sz)
-{
- size_t len = strnlen (old, sz);
- char *t = malloc(len + 1);
-
- if (t != NULL) {
- memcpy (t, old, len);
- t[len] = '\0';
- }
- return t;
-}
-#endif /* HAVE_STRNDUP */
diff --git a/crypto/kerberosIV/lib/roken/strpftime-test.c b/crypto/kerberosIV/lib/roken/strpftime-test.c
deleted file mode 100644
index 7eb8fb85eb2a..000000000000
--- a/crypto/kerberosIV/lib/roken/strpftime-test.c
+++ /dev/null
@@ -1,287 +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"
-
-RCSID("$Id: strpftime-test.c,v 1.2 1999/11/12 15:29:55 assar Exp $");
-
-enum { MAXSIZE = 26 };
-
-static struct testcase {
- time_t t;
- struct {
- const char *format;
- const char *result;
- } vals[MAXSIZE];
-} tests[] = {
- {0,
- {
- {"%A", "Thursday"},
- {"%a", "Thu"},
- {"%B", "January"},
- {"%b", "Jan"},
- {"%C", "19"},
- {"%d", "01"},
- {"%e", " 1"},
- {"%H", "00"},
- {"%I", "12"},
- {"%j", "001"},
- {"%k", " 0"},
- {"%l", "12"},
- {"%M", "00"},
- {"%m", "01"},
- {"%n", "\n"},
- {"%p", "AM"},
- {"%S", "00"},
- {"%t", "\t"},
- {"%w", "4"},
- {"%Y", "1970"},
- {"%y", "70"},
- {"%U", "00"},
- {"%W", "00"},
- {"%V", "01"},
- {"%%", "%"},
- {NULL, NULL}}
- },
- {90000,
- {
- {"%A", "Friday"},
- {"%a", "Fri"},
- {"%B", "January"},
- {"%b", "Jan"},
- {"%C", "19"},
- {"%d", "02"},
- {"%e", " 2"},
- {"%H", "01"},
- {"%I", "01"},
- {"%j", "002"},
- {"%k", " 1"},
- {"%l", " 1"},
- {"%M", "00"},
- {"%m", "01"},
- {"%n", "\n"},
- {"%p", "AM"},
- {"%S", "00"},
- {"%t", "\t"},
- {"%w", "5"},
- {"%Y", "1970"},
- {"%y", "70"},
- {"%U", "00"},
- {"%W", "00"},
- {"%V", "01"},
- {"%%", "%"},
- {NULL, NULL}
- }
- },
- {216306,
- {
- {"%A", "Saturday"},
- {"%a", "Sat"},
- {"%B", "January"},
- {"%b", "Jan"},
- {"%C", "19"},
- {"%d", "03"},
- {"%e", " 3"},
- {"%H", "12"},
- {"%I", "12"},
- {"%j", "003"},
- {"%k", "12"},
- {"%l", "12"},
- {"%M", "05"},
- {"%m", "01"},
- {"%n", "\n"},
- {"%p", "PM"},
- {"%S", "06"},
- {"%t", "\t"},
- {"%w", "6"},
- {"%Y", "1970"},
- {"%y", "70"},
- {"%U", "00"},
- {"%W", "00"},
- {"%V", "01"},
- {"%%", "%"},
- {NULL, NULL}
- }
- },
- {259200,
- {
- {"%A", "Sunday"},
- {"%a", "Sun"},
- {"%B", "January"},
- {"%b", "Jan"},
- {"%C", "19"},
- {"%d", "04"},
- {"%e", " 4"},
- {"%H", "00"},
- {"%I", "12"},
- {"%j", "004"},
- {"%k", " 0"},
- {"%l", "12"},
- {"%M", "00"},
- {"%m", "01"},
- {"%n", "\n"},
- {"%p", "AM"},
- {"%S", "00"},
- {"%t", "\t"},
- {"%w", "0"},
- {"%Y", "1970"},
- {"%y", "70"},
- {"%U", "01"},
- {"%W", "00"},
- {"%V", "01"},
- {"%%", "%"},
- {NULL, NULL}
- }
- },
- {915148800,
- {
- {"%A", "Friday"},
- {"%a", "Fri"},
- {"%B", "January"},
- {"%b", "Jan"},
- {"%C", "19"},
- {"%d", "01"},
- {"%e", " 1"},
- {"%H", "00"},
- {"%I", "12"},
- {"%j", "001"},
- {"%k", " 0"},
- {"%l", "12"},
- {"%M", "00"},
- {"%m", "01"},
- {"%n", "\n"},
- {"%p", "AM"},
- {"%S", "00"},
- {"%t", "\t"},
- {"%w", "5"},
- {"%Y", "1999"},
- {"%y", "99"},
- {"%U", "00"},
- {"%W", "00"},
- {"%V", "53"},
- {"%%", "%"},
- {NULL, NULL}}
- },
- {942161105,
- {
-
- {"%A", "Tuesday"},
- {"%a", "Tue"},
- {"%B", "November"},
- {"%b", "Nov"},
- {"%C", "19"},
- {"%d", "09"},
- {"%e", " 9"},
- {"%H", "15"},
- {"%I", "03"},
- {"%j", "313"},
- {"%k", "15"},
- {"%l", " 3"},
- {"%M", "25"},
- {"%m", "11"},
- {"%n", "\n"},
- {"%p", "PM"},
- {"%S", "05"},
- {"%t", "\t"},
- {"%w", "2"},
- {"%Y", "1999"},
- {"%y", "99"},
- {"%U", "45"},
- {"%W", "45"},
- {"%V", "45"},
- {"%%", "%"},
- {NULL, NULL}
- }
- }
-};
-
-int
-main(int argc, char **argv)
-{
- int i, j;
- int ret = 0;
-
- for (i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i) {
- struct tm *tm;
-
- tm = gmtime (&tests[i].t);
-
- for (j = 0; tests[i].vals[j].format != NULL; ++j) {
- char buf[128];
- size_t len;
- struct tm tm2;
- char *ptr;
-
- len = strftime (buf, sizeof(buf), tests[i].vals[j].format, tm);
- if (len != strlen (buf)) {
- printf ("length of strftime(\"%s\") = %d (\"%s\")\n",
- tests[i].vals[j].format, len,
- buf);
- ++ret;
- continue;
- }
- if (strcmp (buf, tests[i].vals[j].result) != 0) {
- printf ("result of strftime(\"%s\") = \"%s\" != \"%s\"\n",
- tests[i].vals[j].format, buf,
- tests[i].vals[j].result);
- ++ret;
- continue;
- }
- memset (&tm2, 0, sizeof(tm2));
- ptr = strptime (tests[i].vals[j].result,
- tests[i].vals[j].format,
- &tm2);
- if (ptr == NULL || *ptr != '\0') {
- printf ("bad return value from strptime("
- "\"%s\", \"%s\")\n",
- tests[i].vals[j].result,
- tests[i].vals[j].format);
- ++ret;
- }
- strftime (buf, sizeof(buf), tests[i].vals[j].format, &tm2);
- if (strcmp (buf, tests[i].vals[j].result) != 0) {
- printf ("reverse of \"%s\" failed: \"%s\" vs \"%s\"\n",
- tests[i].vals[j].format,
- buf, tests[i].vals[j].result);
- ++ret;
- }
- }
- }
- if (ret) {
- printf ("%d errors\n", ret);
- return 1;
- } else
- return 0;
-}
diff --git a/crypto/kerberosIV/lib/roken/strptime.c b/crypto/kerberosIV/lib/roken/strptime.c
deleted file mode 100644
index 36f0822431f8..000000000000
--- a/crypto/kerberosIV/lib/roken/strptime.c
+++ /dev/null
@@ -1,444 +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 <ctype.h>
-#include "roken.h"
-
-RCSID("$Id: strptime.c,v 1.2 1999/11/12 15:29:55 assar Exp $");
-
-static const char *abb_weekdays[] = {
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat",
- NULL
-};
-
-static const char *full_weekdays[] = {
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- NULL
-};
-
-static const char *abb_month[] = {
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec",
- NULL
-};
-
-static const char *full_month[] = {
- "January",
- "February",
- "Mars",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December",
- NULL,
-};
-
-static const char *ampm[] = {
- "am",
- "pm",
- NULL
-};
-
-/*
- * Try to match `*buf' to one of the strings in `strs'. Return the
- * index of the matching string (or -1 if none). Also advance buf.
- */
-
-static int
-match_string (const char **buf, const char **strs)
-{
- int i = 0;
-
- for (i = 0; strs[i] != NULL; ++i) {
- int len = strlen (strs[i]);
-
- if (strncasecmp (*buf, strs[i], len) == 0) {
- *buf += len;
- return i;
- }
- }
- return -1;
-}
-
-/*
- * tm_year is relative this year */
-
-const int tm_year_base = 1900;
-
-/*
- * Return TRUE iff `year' was a leap year.
- */
-
-static int
-is_leap_year (int year)
-{
- return (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0);
-}
-
-/*
- * Return the weekday [0,6] (0 = Sunday) of the first day of `year'
- */
-
-static int
-first_day (int year)
-{
- int ret = 4;
-
- for (; year > 1970; --year)
- ret = (ret + 365 + is_leap_year (year) ? 1 : 0) % 7;
- return ret;
-}
-
-/*
- * Set `timeptr' given `wnum' (week number [0, 53])
- */
-
-static void
-set_week_number_sun (struct tm *timeptr, int wnum)
-{
- int fday = first_day (timeptr->tm_year + tm_year_base);
-
- timeptr->tm_yday = wnum * 7 + timeptr->tm_wday - fday;
- if (timeptr->tm_yday < 0) {
- timeptr->tm_wday = fday;
- timeptr->tm_yday = 0;
- }
-}
-
-/*
- * Set `timeptr' given `wnum' (week number [0, 53])
- */
-
-static void
-set_week_number_mon (struct tm *timeptr, int wnum)
-{
- int fday = (first_day (timeptr->tm_year + tm_year_base) + 6) % 7;
-
- timeptr->tm_yday = wnum * 7 + (timeptr->tm_wday + 6) % 7 - fday;
- if (timeptr->tm_yday < 0) {
- timeptr->tm_wday = (fday + 1) % 7;
- timeptr->tm_yday = 0;
- }
-}
-
-/*
- * Set `timeptr' given `wnum' (week number [0, 53])
- */
-
-static void
-set_week_number_mon4 (struct tm *timeptr, int wnum)
-{
- int fday = (first_day (timeptr->tm_year + tm_year_base) + 6) % 7;
- int offset = 0;
-
- if (fday < 4)
- offset += 7;
-
- timeptr->tm_yday = offset + (wnum - 1) * 7 + timeptr->tm_wday - fday;
- if (timeptr->tm_yday < 0) {
- timeptr->tm_wday = fday;
- timeptr->tm_yday = 0;
- }
-}
-
-/*
- *
- */
-
-char *
-strptime (const char *buf, const char *format, struct tm *timeptr)
-{
- char c;
-
- for (; (c = *format) != '\0'; ++format) {
- char *s;
- int ret;
-
- if (isspace (c)) {
- while (isspace (*buf))
- ++buf;
- } else if (c == '%' && format[1] != '\0') {
- c = *++format;
- if (c == 'E' || c == 'O')
- c = *++format;
- switch (c) {
- case 'A' :
- ret = match_string (&buf, full_weekdays);
- if (ret < 0)
- return NULL;
- timeptr->tm_wday = ret;
- break;
- case 'a' :
- ret = match_string (&buf, abb_weekdays);
- if (ret < 0)
- return NULL;
- timeptr->tm_wday = ret;
- break;
- case 'B' :
- ret = match_string (&buf, full_month);
- if (ret < 0)
- return NULL;
- timeptr->tm_mon = ret;
- break;
- case 'b' :
- case 'h' :
- ret = match_string (&buf, abb_month);
- if (ret < 0)
- return NULL;
- timeptr->tm_mon = ret;
- break;
- case 'C' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- timeptr->tm_year = (ret * 100) - tm_year_base;
- buf = s;
- break;
- case 'c' :
- abort ();
- case 'D' : /* %m/%d/%y */
- s = strptime (buf, "%m/%d/%y", timeptr);
- if (s == NULL)
- return NULL;
- buf = s;
- break;
- case 'd' :
- case 'e' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- timeptr->tm_mday = ret;
- buf = s;
- break;
- case 'H' :
- case 'k' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- timeptr->tm_hour = ret;
- buf = s;
- break;
- case 'I' :
- case 'l' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- if (ret == 12)
- timeptr->tm_hour = 0;
- else
- timeptr->tm_hour = ret;
- buf = s;
- break;
- case 'j' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- timeptr->tm_yday = ret - 1;
- buf = s;
- break;
- case 'm' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- timeptr->tm_mon = ret - 1;
- buf = s;
- break;
- case 'M' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- timeptr->tm_min = ret;
- buf = s;
- break;
- case 'n' :
- if (*buf == '\n')
- ++buf;
- else
- return NULL;
- break;
- case 'p' :
- ret = match_string (&buf, ampm);
- if (ret < 0)
- return NULL;
- if (timeptr->tm_hour == 0) {
- if (ret == 1)
- timeptr->tm_hour = 12;
- } else
- timeptr->tm_hour += 12;
- break;
- case 'r' : /* %I:%M:%S %p */
- s = strptime (buf, "%I:%M:%S %p", timeptr);
- if (s == NULL)
- return NULL;
- buf = s;
- break;
- case 'R' : /* %H:%M */
- s = strptime (buf, "%H:%M", timeptr);
- if (s == NULL)
- return NULL;
- buf = s;
- break;
- case 'S' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- timeptr->tm_sec = ret;
- buf = s;
- break;
- case 't' :
- if (*buf == '\t')
- ++buf;
- else
- return NULL;
- break;
- case 'T' : /* %H:%M:%S */
- case 'X' :
- s = strptime (buf, "%H:%M:%S", timeptr);
- if (s == NULL)
- return NULL;
- buf = s;
- break;
- case 'u' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- timeptr->tm_wday = ret - 1;
- buf = s;
- break;
- case 'w' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- timeptr->tm_wday = ret;
- buf = s;
- break;
- case 'U' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- set_week_number_sun (timeptr, ret);
- buf = s;
- break;
- case 'V' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- set_week_number_mon4 (timeptr, ret);
- buf = s;
- break;
- case 'W' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- set_week_number_mon (timeptr, ret);
- buf = s;
- break;
- case 'x' :
- s = strptime (buf, "%Y:%m:%d", timeptr);
- if (s == NULL)
- return NULL;
- buf = s;
- break;
- case 'y' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- if (ret < 70)
- timeptr->tm_year = 100 + ret;
- else
- timeptr->tm_year = ret;
- buf = s;
- break;
- case 'Y' :
- ret = strtol (buf, &s, 10);
- if (s == buf)
- return NULL;
- timeptr->tm_year = ret - tm_year_base;
- buf = s;
- break;
- case 'Z' :
- abort ();
- case '\0' :
- --format;
- /* FALLTHROUGH */
- case '%' :
- if (*buf == '%')
- ++buf;
- else
- return NULL;
- break;
- default :
- if (*buf == '%' || *++buf == c)
- ++buf;
- else
- return NULL;
- break;
- }
- } else {
- if (*buf == c)
- ++buf;
- else
- return NULL;
- }
- }
- return (char *)buf;
-}
diff --git a/crypto/kerberosIV/lib/roken/strsep.c b/crypto/kerberosIV/lib/roken/strsep.c
deleted file mode 100644
index efc714a66426..000000000000
--- a/crypto/kerberosIV/lib/roken/strsep.c
+++ /dev/null
@@ -1,61 +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. 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: strsep.c,v 1.3 1999/12/02 16:58:53 joda Exp $");
-#endif
-
-#include <string.h>
-
-#include "roken.h"
-
-#ifndef HAVE_STRSEP
-
-char *
-strsep(char **str, const char *delim)
-{
- char *save = *str;
- if(*str == NULL)
- return NULL;
- *str = *str + strcspn(*str, delim);
- if(**str == 0)
- *str = NULL;
- else{
- **str = 0;
- (*str)++;
- }
- return save;
-}
-
-#endif
diff --git a/crypto/kerberosIV/lib/roken/swab.c b/crypto/kerberosIV/lib/roken/swab.c
deleted file mode 100644
index c623bd0708e7..000000000000
--- a/crypto/kerberosIV/lib/roken/swab.c
+++ /dev/null
@@ -1,54 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "roken.h"
-
-#ifndef HAVE_SWAB
-
-RCSID("$Id: swab.c,v 1.7 1999/12/02 16:58:53 joda Exp $");
-
-void
-swab (char *from, char *to, int nbytes)
-{
- while(nbytes >= 2) {
- *(to + 1) = *from;
- *to = *(from + 1);
- to += 2;
- from += 2;
- nbytes -= 2;
- }
-}
-#endif
diff --git a/crypto/kerberosIV/lib/roken/vsyslog.c b/crypto/kerberosIV/lib/roken/vsyslog.c
deleted file mode 100644
index 22e6a35a80c0..000000000000
--- a/crypto/kerberosIV/lib/roken/vsyslog.c
+++ /dev/null
@@ -1,57 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: vsyslog.c,v 1.3 1999/12/02 16:58:54 joda Exp $");
-#endif
-
-#ifndef HAVE_VSYSLOG
-
-#include <stdio.h>
-#include <syslog.h>
-#include <stdarg.h>
-
-#include "roken.h"
-
-void
-vsyslog(int pri, const char *fmt, va_list ap)
-{
- char *p;
-
- vasprintf (&p, fmt, ap);
- syslog (pri, "%s", p);
- free (p);
-}
-
-#endif
diff --git a/crypto/kerberosIV/lib/roken/writev.c b/crypto/kerberosIV/lib/roken/writev.c
deleted file mode 100644
index e3859bfe332c..000000000000
--- a/crypto/kerberosIV/lib/roken/writev.c
+++ /dev/null
@@ -1,64 +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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-RCSID("$Id: writev.c,v 1.3 1999/12/02 16:58:54 joda Exp $");
-#endif
-
-#include "roken.h"
-
-ssize_t
-writev(int d, const struct iovec *iov, int iovcnt)
-{
- ssize_t ret;
- size_t tot = 0;
- int i;
- char *buf, *p;
-
- for(i = 0; i < iovcnt; ++i)
- tot += iov[i].iov_len;
- buf = malloc(tot);
- if (tot != 0 && buf == NULL) {
- errno = ENOMEM;
- return -1;
- }
- p = buf;
- for (i = 0; i < iovcnt; ++i) {
- memcpy (p, iov[i].iov_base, iov[i].iov_len);
- p += iov[i].iov_len;
- }
- ret = write (d, buf, tot);
- free (buf);
- return ret;
-}
diff --git a/crypto/kerberosIV/lib/sl/ChangeLog b/crypto/kerberosIV/lib/sl/ChangeLog
deleted file mode 100644
index a8647de0ed27..000000000000
--- a/crypto/kerberosIV/lib/sl/ChangeLog
+++ /dev/null
@@ -1,112 +0,0 @@
-Thu Apr 1 17:03:59 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * make_cmds.c: use getarg
-
-Tue Mar 23 14:36:21 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: don't rename
-
-Sun Mar 21 14:13:29 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: don't roken-rename
-
-Sat Mar 20 03:43:30 1999 Assar Westerlund <assar@sics.se>
-
- * parse.y: replace return with YYACCEPT
-
-Fri Mar 19 14:53:20 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.am: add libss; add version-info
-
-Thu Mar 18 15:07:06 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * 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 <joda@hella.pdc.kth.se>
-
- * parse.y: prototype for error_message
-
-Tue Feb 9 23:45:37 1999 Johan Danielsson <joda@hella.pdc.kth.se>
-
- * Makefile.in: add snprintf.o to make_cmds
-
-Sun Nov 22 10:46:23 1998 Assar Westerlund <assar@sics.se>
-
- * 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 <assar@sics.se>
-
- * make_cmds.c: clean-up and simplification
-
-Mon May 25 02:54:13 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in (clean): try to remove shared library debris
-
- * Makefile.in: make symlink magic work
-
-Sun Apr 19 10:00:26 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.in: add symlink magic for linux
-
-Sun Apr 5 09:21:43 1998 Assar Westerlund <assar@sics.se>
-
- * 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 <assar@sics.se>
-
- * sl.c (sl_loop): s/2/1
-
-Sat Mar 21 00:46:51 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * 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 <joda@emma.pdc.kth.se>
-
- * sl.c (sl_loop): Fix general broken-ness.
-
- * sl.c: Cleanup printing of help strings.
-
-Thu Feb 26 02:22:02 1998 Assar Westerlund <assar@sics.se>
-
- * Makefile.am: @LEXLIB@
-
-Sat Feb 21 15:18:21 1998 assar westerlund <assar@sics.se>
-
- * Makefile.in: set YACC and LEX
-
-Mon Feb 16 16:08:25 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * Makefile.am: Some fixes for ss/mk_cmds.
-
-Sun Feb 15 05:12:11 1998 Johan Danielsson <joda@emma.pdc.kth.se>
-
- * 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 <joda@emma.pdc.kth.se>
-
- * sl.c: Add sl_command_loop, that is the loop body of sl_loop.
-
-Mon Oct 20 01:13:21 1997 Assar Westerlund <assar@sics.se>
-
- * sl.c (sl_help): actually use the `help' field of `SL_cmd'
-
diff --git a/crypto/kerberosIV/lib/sl/Makefile.am b/crypto/kerberosIV/lib/sl/Makefile.am
deleted file mode 100644
index 54bc75b033ca..000000000000
--- a/crypto/kerberosIV/lib/sl/Makefile.am
+++ /dev/null
@@ -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 .
diff --git a/crypto/kerberosIV/lib/sl/lex.l b/crypto/kerberosIV/lib/sl/lex.l
deleted file mode 100644
index b7c1c4432346..000000000000
--- a/crypto/kerberosIV/lib/sl/lex.l
+++ /dev/null
@@ -1,114 +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. 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 "make_cmds.h"
-#include "parse.h"
-
-RCSID("$Id: lex.l,v 1.3 1999/12/02 16:58:55 joda Exp $");
-
-static unsigned lineno = 1;
-void error_message(char *, ...);
-int getstring(void);
-
-%}
-
-
-%%
-command_table { return TABLE; }
-request { return REQUEST; }
-unknown { return UNKNOWN; }
-unimplemented { return UNIMPLEMENTED; }
-end { return END; }
-#[^\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 backslash = 0;
- while((c = input()) != EOF){
- if(backslash) {
- if(c == 'n')
- c = '\n';
- else if(c == 't')
- c = '\t';
- x[i++] = c;
- backslash = 0;
- continue;
- }
- if(c == '\n'){
- error_message("unterminated string");
- lineno++;
- break;
- }
- if(c == '\\'){
- backslash++;
- 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++;
-}
diff --git a/crypto/kerberosIV/lib/sl/make_cmds.c b/crypto/kerberosIV/lib/sl/make_cmds.c
deleted file mode 100644
index 492e9e671272..000000000000
--- a/crypto/kerberosIV/lib/sl/make_cmds.c
+++ /dev/null
@@ -1,240 +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. 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 "make_cmds.h"
-#include <getarg.h>
-
-RCSID("$Id: make_cmds.c,v 1.6 1999/12/02 16:58:55 joda Exp $");
-
-#include <roken.h>
-#include <err.h>
-#include "parse.h"
-
-int numerror;
-extern FILE *yyin;
-FILE *c_file;
-
-extern void yyparse(void);
-
-#ifdef YYDEBUG
-extern int yydebug = 1;
-#endif
-
-char *filename;
-char *table_name;
-
-static struct command_list *commands;
-
-void
-add_command(char *function,
- char *help,
- struct string_list *aliases,
- unsigned flags)
-{
- struct command_list *cl = malloc(sizeof(*cl));
-
- if (cl == NULL)
- err (1, "malloc");
- cl->function = function;
- cl->help = help;
- cl->aliases = aliases;
- cl->flags = flags;
- cl->next = NULL;
- if(commands) {
- *commands->tail = cl;
- commands->tail = &cl->next;
- return;
- }
- cl->tail = &cl->next;
- commands = cl;
-}
-
-static char *
-quote(const char *str)
-{
- char buf[1024]; /* XXX */
- const char *p;
- char *q;
- q = buf;
-
- *q++ = '\"';
- for(p = str; *p != '\0'; p++) {
- if(*p == '\n') {
- *q++ = '\\';
- *q++ = 'n';
- continue;
- }
- if(*p == '\t') {
- *q++ = '\\';
- *q++ = 't';
- continue;
- }
- if(*p == '\"' || *p == '\\')
- *q++ = '\\';
- *q++ = *p;
- }
- *q++ = '\"';
- *q++ = '\0';
- return strdup(buf);
-}
-
-static void
-generate_commands(void)
-{
- char *base;
- char *cfn;
- char *p;
-
- p = strrchr(table_name, '/');
- if(p == NULL)
- p = table_name;
- else
- p++;
-
- base = strdup (p);
- if (base == NULL)
- err (1, "strdup");
-
- p = strrchr(base, '.');
- if(p)
- *p = '\0';
-
- asprintf(&cfn, "%s.c", base);
- if (cfn == NULL)
- err (1, "asprintf");
-
- c_file = fopen(cfn, "w");
- if (c_file == NULL)
- err (1, "cannot fopen %s", cfn);
-
- fprintf(c_file, "/* Generated from %s */\n", filename);
- fprintf(c_file, "\n");
- fprintf(c_file, "#include <stddef.h>\n");
- fprintf(c_file, "#include <sl.h>\n");
- fprintf(c_file, "\n");
-
- {
- struct command_list *cl, *xl;
- char *p, *q;
-
- for(cl = commands; cl; cl = cl->next) {
- for(xl = commands; xl != cl; xl = xl->next)
- if(strcmp(cl->function, xl->function) == 0)
- break;
- if(xl != cl)
- continue;
- /* XXX hack for ss_quit */
- if(strcmp(cl->function, "ss_quit") == 0) {
- fprintf(c_file, "int %s (int, char**);\n", cl->function);
- fprintf(c_file, "#define _ss_quit_wrap ss_quit\n\n");
- continue;
- }
- fprintf(c_file, "void %s (int, char**);\n", cl->function);
- fprintf(c_file, "static int _%s_wrap (int argc, char **argv)\n",
- cl->function);
- fprintf(c_file, "{\n");
- fprintf(c_file, " %s (argc, argv);\n", cl->function);
- fprintf(c_file, " return 0;\n");
- fprintf(c_file, "}\n\n");
- }
-
- fprintf(c_file, "SL_cmd %s[] = {\n", table_name);
- for(cl = commands; cl; cl = cl->next) {
- struct string_list *sl;
- sl = cl->aliases;
- p = quote(sl->string);
- q = quote(cl->help);
- fprintf(c_file, " { %s, _%s_wrap, %s },\n", p, cl->function, q);
- free(p);
- free(q);
-
- for(sl = sl->next; sl; sl = sl->next) {
- p = quote(sl->string);
- fprintf(c_file, " { %s },\n", p);
- free(p);
- }
- }
- fprintf(c_file, " { NULL },\n");
- fprintf(c_file, "};\n");
- fprintf(c_file, "\n");
- }
- fclose(c_file);
- free(base);
- free(cfn);
-}
-
-int version_flag;
-int help_flag;
-struct getargs args[] = {
- { "version", 0, arg_flag, &version_flag },
- { "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, "command-table");
- exit(code);
-}
-
-int
-main(int argc, char **argv)
-{
- int optind = 0;
-
- set_progname(argv[0]);
- if(getarg(args, num_args, argc, argv, &optind))
- usage(1);
- if(help_flag)
- usage(0);
- if(version_flag) {
- print_version(NULL);
- exit(0);
- }
-
- if(argc == optind)
- usage(1);
- filename = argv[optind];
- yyin = fopen(filename, "r");
- if(yyin == NULL)
- err(1, "%s", filename);
-
- yyparse();
-
- generate_commands();
-
- if(numerror)
- return 1;
- return 0;
-}
diff --git a/crypto/kerberosIV/lib/sl/make_cmds.h b/crypto/kerberosIV/lib/sl/make_cmds.h
deleted file mode 100644
index 24dbd60d6c59..000000000000
--- a/crypto/kerberosIV/lib/sl/make_cmds.h
+++ /dev/null
@@ -1,69 +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. 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: make_cmds.h,v 1.2 1999/12/02 16:58:55 joda Exp $ */
-
-#ifndef __MAKE_CMDS_H__
-#define __MAKE_CMDS_H__
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-extern char *filename;
-extern char *table_name;
-extern int numerror;
-
-struct command_list {
- char *function;
- char *help;
- struct string_list *aliases;
- unsigned flags;
- struct command_list *next;
- struct command_list **tail;
-};
-
-struct string_list {
- char *string;
- struct string_list *next;
- struct string_list **tail;
-};
-
-void add_command(char*, char*, struct string_list*, unsigned);
-
-#endif /* __MAKE_CMDS_H__ */
diff --git a/crypto/kerberosIV/lib/sl/parse.y b/crypto/kerberosIV/lib/sl/parse.y
deleted file mode 100644
index b8b2d6335f71..000000000000
--- a/crypto/kerberosIV/lib/sl/parse.y
+++ /dev/null
@@ -1,194 +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. 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 "make_cmds.h"
-RCSID("$Id: parse.y,v 1.5 1999/12/02 16:58:55 joda Exp $");
-
-void yyerror (char *s);
-long name2number(const char *str);
-void error_message(char *, ...);
-
-struct string_list* append_string(struct string_list*, char*);
-void free_string_list(struct string_list *list);
-unsigned string_to_flag(const char *);
-
-/* This is for bison */
-
-#if !defined(alloca) && !defined(HAVE_ALLOCA)
-#define alloca(x) malloc(x)
-#endif
-
-%}
-
-%union {
- char *string;
- unsigned number;
- struct string_list *list;
-}
-
-%token TABLE REQUEST UNKNOWN UNIMPLEMENTED END
-%token <string> STRING
-%type <number> flag flags
-%type <list> aliases
-
-%%
-
-file : /* */
- | statements
- ;
-
-statements : statement
- | statements statement
- ;
-
-statement : TABLE STRING ';'
- {
- table_name = $2;
- }
- | REQUEST STRING ',' STRING ',' aliases ',' '(' flags ')' ';'
- {
- add_command($2, $4, $6, $9);
- }
- | REQUEST STRING ',' STRING ',' aliases ';'
- {
- add_command($2, $4, $6, 0);
- }
- | UNIMPLEMENTED STRING ',' STRING ',' aliases ';'
- {
- free($2);
- free($4);
- free_string_list($6);
- }
- | UNKNOWN aliases ';'
- {
- free_string_list($2);
- }
- | END ';'
- {
- YYACCEPT;
- }
- ;
-
-aliases : STRING
- {
- $$ = append_string(NULL, $1);
- }
- | aliases ',' STRING
- {
- $$ = append_string($1, $3);
- }
- ;
-
-flags : flag
- {
- $$ = $1;
- }
- | flags ',' flag
- {
- $$ = $1 | $3;
- }
- ;
-flag : STRING
- {
- $$ = string_to_flag($1);
- free($1);
- }
- ;
-
-
-
-%%
-
-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);
-}
-
-struct string_list*
-append_string(struct string_list *list, char *str)
-{
- struct string_list *sl = malloc(sizeof(*sl));
- sl->string = str;
- sl->next = NULL;
- if(list) {
- *list->tail = sl;
- list->tail = &sl->next;
- return list;
- }
- sl->tail = &sl->next;
- return sl;
-}
-
-void
-free_string_list(struct string_list *list)
-{
- while(list) {
- struct string_list *sl = list->next;
- free(list->string);
- free(list);
- list = sl;
- }
-}
-
-unsigned
-string_to_flag(const char *string)
-{
- return 0;
-}
diff --git a/crypto/kerberosIV/lib/sl/roken_rename.h b/crypto/kerberosIV/lib/sl/roken_rename.h
deleted file mode 100644
index c668802ac5d5..000000000000
--- a/crypto/kerberosIV/lib/sl/roken_rename.h
+++ /dev/null
@@ -1,61 +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. 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.3 1999/12/02 16:58:55 joda Exp $ */
-
-#ifndef __roken_rename_h__
-#define __roken_rename_h__
-
-#ifndef HAVE_STRTOK_R
-#define strtok_r _sl_strtok_r
-#endif
-#ifndef HAVE_SNPRINTF
-#define snprintf _sl_snprintf
-#endif
-#ifndef HAVE_ASPRINTF
-#define asprintf _sl_asprintf
-#endif
-#ifndef HAVE_ASNPRINTF
-#define asnprintf _sl_asnprintf
-#endif
-#ifndef HAVE_VASPRINTF
-#define vasprintf _sl_vasprintf
-#endif
-#ifndef HAVE_VASNPRINTF
-#define vasnprintf _sl_vasnprintf
-#endif
-#ifndef HAVE_VSNPRINTF
-#define vsnprintf _sl_vsnprintf
-#endif
-
-#endif /* __roken_rename_h__ */
diff --git a/crypto/kerberosIV/lib/sl/ss.c b/crypto/kerberosIV/lib/sl/ss.c
deleted file mode 100644
index f3c0546b4d78..000000000000
--- a/crypto/kerberosIV/lib/sl/ss.c
+++ /dev/null
@@ -1,133 +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. 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 "sl_locl.h"
-#include <com_err.h>
-#include "ss.h"
-
-RCSID("$Id: ss.c,v 1.4 1999/12/02 16:58:55 joda Exp $");
-
-struct ss_subst {
- char *name;
- char *version;
- char *info;
- ss_request_table *table;
-};
-
-static struct ss_subst subsystems[2];
-static int num_subsystems;
-
-int
-ss_create_invocation(const char *subsystem,
- const char *version,
- const char *info,
- ss_request_table *table,
- int *code)
-{
- struct ss_subst *ss;
- if(num_subsystems >= sizeof(subsystems) / sizeof(subsystems[0])) {
- *code = 17;
- return 0;
- }
- ss = &subsystems[num_subsystems];
- ss->name = subsystem ? strdup(subsystem) : NULL;
- ss->version = version ? strdup(version) : NULL;
- ss->info = info ? strdup(info) : NULL;
- ss->table = table;
- *code = 0;
- return num_subsystems++;
-}
-
-void
-ss_error (int index, long code, const char *fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
- com_err_va (subsystems[index].name, code, fmt, ap);
- va_end(ap);
-}
-
-void
-ss_perror (int index, long code, const char *msg)
-{
- ss_error(index, code, "%s", msg);
-}
-
-int
-ss_execute_command(int index, char **argv)
-{
- int argc = 0;
- while(argv[argc++]);
- sl_command(subsystems[index].table, argc, argv);
- return 0;
-}
-
-int
-ss_execute_line (int index, const char *line)
-{
- char *buf = strdup(line);
- int argc;
- char **argv;
-
- sl_make_argv(buf, &argc, &argv);
- sl_command(subsystems[index].table, argc, argv);
- free(buf);
- return 0;
-}
-
-int
-ss_listen (int index)
-{
- char *prompt = malloc(strlen(subsystems[index].name) + 3);
- if(prompt == NULL) {
- abort();
- }
- strcpy(prompt, subsystems[index].name);
- strcat(prompt, ": ");
- sl_loop(subsystems[index].table, prompt);
- free(prompt);
- return 0;
-}
-
-int
-ss_list_requests(int argc, char **argv /* , int index, void *info */)
-{
- sl_help(subsystems[0 /* index */].table, argc, argv);
- return 0;
-}
-
-int
-ss_quit(int argc, char **argv)
-{
- return 1;
-}
diff --git a/crypto/kerberosIV/lib/sl/ss.h b/crypto/kerberosIV/lib/sl/ss.h
deleted file mode 100644
index 0d9d2977b7ac..000000000000
--- a/crypto/kerberosIV/lib/sl/ss.h
+++ /dev/null
@@ -1,55 +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. 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: ss.h,v 1.2 1999/12/02 16:58:55 joda Exp $ */
-
-/* SS compatibility for SL */
-
-#ifndef __ss_h__
-#define __ss_h__
-
-#include <sl.h>
-
-typedef SL_cmd ss_request_table;
-
-int ss_create_invocation (const char *, const char *, const char*,
- ss_request_table*, int*);
-
-void ss_error (int, long, const char*, ...);
-int ss_execute_command (int, char**);
-int ss_execute_line (int, const char*);
-int ss_list_requests (int argc, char**);
-int ss_listen (int);
-void ss_perror (int, long, const char*);
-int ss_quit (int argc, char**);
-
-#endif /* __ss_h__ */
diff --git a/crypto/kerberosIV/man/Makefile b/crypto/kerberosIV/man/Makefile
deleted file mode 100644
index 6e6442add459..000000000000
--- a/crypto/kerberosIV/man/Makefile
+++ /dev/null
@@ -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] *~
diff --git a/crypto/kerberosIV/man/afslog.1 b/crypto/kerberosIV/man/afslog.1
deleted file mode 100644
index 625f83130a03..000000000000
--- a/crypto/kerberosIV/man/afslog.1
+++ /dev/null
@@ -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.
diff --git a/crypto/kerberosIV/man/ftp.1 b/crypto/kerberosIV/man/ftp.1
deleted file mode 100644
index e5c21f096145..000000000000
--- a/crypto/kerberosIV/man/ftp.1
+++ /dev/null
@@ -1,1193 +0,0 @@
-.\" $NetBSD: ftp.1,v 1.11 1995/09/08 01:06:24 tls Exp $
-.\"
-.\" Copyright (c) 1985, 1989, 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.
-.\"
-.\" @(#)ftp.1 8.3 (Berkeley) 10/9/94
-.\"
-.Dd April 27, 1996
-.Dt FTP 1
-.Os BSD 4.2
-.Sh NAME
-.Nm ftp
-.Nd
-.Tn ARPANET
-file transfer program
-.Sh SYNOPSIS
-.Nm ftp
-.Op Fl t
-.Op Fl v
-.Op Fl d
-.Op Fl i
-.Op Fl n
-.Op Fl g
-.Op Fl p
-.Op Ar host
-.Sh DESCRIPTION
-.Nm Ftp
-is the user interface to the
-.Tn ARPANET
-standard File Transfer Protocol.
-The program allows a user to transfer files to and from a
-remote network site.
-.Pp
-Modifications has been made so that it almost follows the ftpsec
-Internet draft.
-.Pp
-Options may be specified at the command line, or to the
-command interpreter.
-.Bl -tag -width flag
-.It Fl t
-Enables packet tracing.
-.It Fl v
-Verbose option forces
-.Nm ftp
-to show all responses from the remote server, as well
-as report on data transfer statistics.
-.It Fl n
-Restrains
-.Nm ftp
-from attempting \*(Lqauto-login\*(Rq upon initial connection.
-If auto-login is enabled,
-.Nm ftp
-will check the
-.Pa .netrc
-(see below) file in the user's home directory for an entry describing
-an account on the remote machine.
-If no entry exists,
-.Nm ftp
-will prompt for the remote machine login name (default is the user
-identity on the local machine), and, if necessary, prompt for a password
-and an account with which to login.
-.It Fl i
-Turns off interactive prompting during
-multiple file transfers.
-.It Fl p
-Turn on passive mode.
-.It Fl d
-Enables debugging.
-.It Fl g
-Disables file name globbing.
-.El
-.Pp
-The client host with which
-.Nm ftp
-is to communicate may be specified on the command line.
-If this is done,
-.Nm ftp
-will immediately attempt to establish a connection to an
-.Tn FTP
-server on that host; otherwise,
-.Nm ftp
-will enter its command interpreter and await instructions
-from the user.
-When
-.Nm ftp
-is awaiting commands from the user the prompt
-.Ql ftp>
-is provided to the user.
-The following commands are recognized
-by
-.Nm ftp :
-.Bl -tag -width Fl
-.It Ic \&! Op Ar command Op Ar args
-Invoke an interactive shell on the local machine.
-If there are arguments, the first is taken to be a command to execute
-directly, with the rest of the arguments as its arguments.
-.It Ic \&$ Ar macro-name Op Ar args
-Execute the macro
-.Ar macro-name
-that was defined with the
-.Ic macdef
-command.
-Arguments are passed to the macro unglobbed.
-.It Ic account Op Ar passwd
-Supply a supplemental password required by a remote system for access
-to resources once a login has been successfully completed.
-If no argument is included, the user will be prompted for an account
-password in a non-echoing input mode.
-.It Ic append Ar local-file Op Ar remote-file
-Append a local file to a file on the remote machine.
-If
-.Ar remote-file
-is left unspecified, the local file name is used in naming the
-remote file after being altered by any
-.Ic ntrans
-or
-.Ic nmap
-setting.
-File transfer uses the current settings for
-.Ic type ,
-.Ic format ,
-.Ic mode ,
-and
-.Ic structure .
-.It Ic ascii
-Set the file transfer
-.Ic type
-to network
-.Tn ASCII .
-This is the default type.
-.It Ic bell
-Arrange that a bell be sounded after each file transfer
-command is completed.
-.It Ic binary
-Set the file transfer
-.Ic type
-to support binary image transfer.
-.It Ic bye
-Terminate the
-.Tn FTP
-session with the remote server
-and exit
-.Nm ftp .
-An end of file will also terminate the session and exit.
-.It Ic case
-Toggle remote computer file name case mapping during
-.Ic mget
-commands.
-When
-.Ic case
-is on (default is off), remote computer file names with all letters in
-upper case are written in the local directory with the letters mapped
-to lower case.
-.It Ic \&cd Ar remote-directory
-Change the working directory on the remote machine
-to
-.Ar remote-directory .
-.It Ic cdup
-Change the remote machine working directory to the parent of the
-current remote machine working directory.
-.It Ic chmod Ar mode file-name
-Change the permission modes of the file
-.Ar file-name
-on the remote
-sytem to
-.Ar mode .
-.It Ic close
-Terminate the
-.Tn FTP
-session with the remote server, and
-return to the command interpreter.
-Any defined macros are erased.
-.It Ic \&cr
-Toggle carriage return stripping during
-ascii type file retrieval.
-Records are denoted by a carriage return/linefeed sequence
-during ascii type file transfer.
-When
-.Ic \&cr
-is on (the default), carriage returns are stripped from this
-sequence to conform with the
-.Ux
-single linefeed record
-delimiter.
-Records on
-.Pf non\- Ns Ux
-remote systems may contain single linefeeds;
-when an ascii type transfer is made, these linefeeds may be
-distinguished from a record delimiter only when
-.Ic \&cr
-is off.
-.It Ic delete Ar remote-file
-Delete the file
-.Ar remote-file
-on the remote machine.
-.It Ic debug Op Ar debug-value
-Toggle debugging mode.
-If an optional
-.Ar debug-value
-is specified it is used to set the debugging level.
-When debugging is on,
-.Nm ftp
-prints each command sent to the remote machine, preceded
-by the string
-.Ql \-\->
-.It Xo
-.Ic dir
-.Op Ar remote-directory
-.Op Ar local-file
-.Xc
-Print a listing of the directory contents in the
-directory,
-.Ar remote-directory ,
-and, optionally, placing the output in
-.Ar local-file .
-If interactive prompting is on,
-.Nm ftp
-will prompt the user to verify that the last argument is indeed the
-target local file for receiving
-.Ic dir
-output.
-If no directory is specified, the current working
-directory on the remote machine is used.
-If no local
-file is specified, or
-.Ar local-file
-is
-.Fl ,
-output comes to the terminal.
-.It Ic disconnect
-A synonym for
-.Ar close .
-.It Ic form Ar format
-Set the file transfer
-.Ic form
-to
-.Ar format .
-The default format is \*(Lqfile\*(Rq.
-.It Ic get Ar remote-file Op Ar local-file
-Retrieve the
-.Ar remote-file
-and store it on the local machine.
-If the local
-file name is not specified, it is given the same
-name it has on the remote machine, subject to
-alteration by the current
-.Ic case ,
-.Ic ntrans ,
-and
-.Ic nmap
-settings.
-The current settings for
-.Ic type ,
-.Ic form ,
-.Ic mode ,
-and
-.Ic structure
-are used while transferring the file.
-.It Ic glob
-Toggle filename expansion for
-.Ic mdelete ,
-.Ic mget
-and
-.Ic mput .
-If globbing is turned off with
-.Ic glob ,
-the file name arguments
-are taken literally and not expanded.
-Globbing for
-.Ic mput
-is done as in
-.Xr csh 1 .
-For
-.Ic mdelete
-and
-.Ic mget ,
-each remote file name is expanded
-separately on the remote machine and the lists are not merged.
-Expansion of a directory name is likely to be
-different from expansion of the name of an ordinary file:
-the exact result depends on the foreign operating system and ftp server,
-and can be previewed by doing
-.Ql mls remote-files \- .
-As a security measure, remotely globbed files that starts with
-.Sq /
-or contains
-.Sq ../ ,
-will not be automatically received. If you have interactive prompting
-turned off, these filenames will be ignored. Note:
-.Ic mget
-and
-.Ic mput
-are not meant to transfer
-entire directory subtrees of files.
-That can be done by
-transferring a
-.Xr tar 1
-archive of the subtree (in binary mode).
-.It Ic hash
-Toggle hash-sign (``#'') printing for each data block
-transferred.
-The size of a data block is 1024 bytes.
-.It Ic help Op Ar command
-Print an informative message about the meaning of
-.Ar command .
-If no argument is given,
-.Nm ftp
-prints a list of the known commands.
-.It Ic idle Op Ar seconds
-Set the inactivity timer on the remote server to
-.Ar seconds
-seconds.
-If
-.Ar seconds
-is omitted, the current inactivity timer is printed.
-.It Ic lcd Op Ar directory
-Change the working directory on the local machine.
-If
-no
-.Ar directory
-is specified, the user's home directory is used.
-.It Xo
-.Ic \&ls
-.Op Ar remote-directory
-.Op Ar local-file
-.Xc
-Print a listing of the contents of a
-directory on the remote machine.
-The listing includes any system-dependent information that the server
-chooses to include; for example, most
-.Ux
-systems will produce
-output from the command
-.Ql ls \-l .
-(See also
-.Ic nlist . )
-If
-.Ar remote-directory
-is left unspecified, the current working directory is used.
-If interactive prompting is on,
-.Nm ftp
-will prompt the user to verify that the last argument is indeed the
-target local file for receiving
-.Ic \&ls
-output.
-If no local file is specified, or if
-.Ar local-file
-is
-.Sq Fl ,
-the output is sent to the terminal.
-.It Ic macdef Ar macro-name
-Define a macro.
-Subsequent lines are stored as the macro
-.Ar macro-name ;
-a null line (consecutive newline characters
-in a file or
-carriage returns from the terminal) terminates macro input mode.
-There is a limit of 16 macros and 4096 total characters in all
-defined macros.
-Macros remain defined until a
-.Ic close
-command is executed.
-The macro processor interprets `$' and `\e' as special characters.
-A `$' followed by a number (or numbers) is replaced by the
-corresponding argument on the macro invocation command line.
-A `$' followed by an `i' signals that macro processor that the
-executing macro is to be looped.
-On the first pass `$i' is
-replaced by the first argument on the macro invocation command line,
-on the second pass it is replaced by the second argument, and so on.
-A `\e' followed by any character is replaced by that character.
-Use the `\e' to prevent special treatment of the `$'.
-.It Ic mdelete Op Ar remote-files
-Delete the
-.Ar remote-files
-on the remote machine.
-.It Ic mdir Ar remote-files local-file
-Like
-.Ic dir ,
-except multiple remote files may be specified.
-If interactive prompting is on,
-.Nm ftp
-will prompt the user to verify that the last argument is indeed the
-target local file for receiving
-.Ic mdir
-output.
-.It Ic mget Ar remote-files
-Expand the
-.Ar remote-files
-on the remote machine
-and do a
-.Ic get
-for each file name thus produced.
-See
-.Ic glob
-for details on the filename expansion.
-Resulting file names will then be processed according to
-.Ic case ,
-.Ic ntrans ,
-and
-.Ic nmap
-settings.
-Files are transferred into the local working directory,
-which can be changed with
-.Ql lcd directory ;
-new local directories can be created with
-.Ql "\&! mkdir directory" .
-.It Ic mkdir Ar directory-name
-Make a directory on the remote machine.
-.It Ic mls Ar remote-files local-file
-Like
-.Ic nlist ,
-except multiple remote files may be specified,
-and the
-.Ar local-file
-must be specified.
-If interactive prompting is on,
-.Nm ftp
-will prompt the user to verify that the last argument is indeed the
-target local file for receiving
-.Ic mls
-output.
-.It Ic mode Op Ar mode-name
-Set the file transfer
-.Ic mode
-to
-.Ar mode-name .
-The default mode is \*(Lqstream\*(Rq mode.
-.It Ic modtime Ar file-name
-Show the last modification time of the file on the remote machine.
-.It Ic mput Ar local-files
-Expand wild cards in the list of local files given as arguments
-and do a
-.Ic put
-for each file in the resulting list.
-See
-.Ic glob
-for details of filename expansion.
-Resulting file names will then be processed according to
-.Ic ntrans
-and
-.Ic nmap
-settings.
-.It Ic newer Ar file-name
-Get the file only if the modification time of the remote file is more
-recent that the file on the current system.
-If the file does not
-exist on the current system, the remote file is considered
-.Ic newer .
-Otherwise, this command is identical to
-.Ar get .
-.It Xo
-.Ic nlist
-.Op Ar remote-directory
-.Op Ar local-file
-.Xc
-Print a list of the files in a
-directory on the remote machine.
-If
-.Ar remote-directory
-is left unspecified, the current working directory is used.
-If interactive prompting is on,
-.Nm ftp
-will prompt the user to verify that the last argument is indeed the
-target local file for receiving
-.Ic nlist
-output.
-If no local file is specified, or if
-.Ar local-file
-is
-.Fl ,
-the output is sent to the terminal.
-.It Ic nmap Op Ar inpattern outpattern
-Set or unset the filename mapping mechanism.
-If no arguments are specified, the filename mapping mechanism is unset.
-If arguments are specified, remote filenames are mapped during
-.Ic mput
-commands and
-.Ic put
-commands issued without a specified remote target filename.
-If arguments are specified, local filenames are mapped during
-.Ic mget
-commands and
-.Ic get
-commands issued without a specified local target filename.
-This command is useful when connecting to a
-.No non\- Ns Ux
-remote computer
-with different file naming conventions or practices.
-The mapping follows the pattern set by
-.Ar inpattern
-and
-.Ar outpattern .
-.Op Ar Inpattern
-is a template for incoming filenames (which may have already been
-processed according to the
-.Ic ntrans
-and
-.Ic case
-settings).
-Variable templating is accomplished by including the
-sequences `$1', `$2', ..., `$9' in
-.Ar inpattern .
-Use `\\' to prevent this special treatment of the `$' character.
-All other characters are treated literally, and are used to determine the
-.Ic nmap
-.Op Ar inpattern
-variable values.
-For example, given
-.Ar inpattern
-$1.$2 and the remote file name "mydata.data", $1 would have the value
-"mydata", and $2 would have the value "data".
-The
-.Ar outpattern
-determines the resulting mapped filename.
-The sequences `$1', `$2', ...., `$9' are replaced by any value resulting
-from the
-.Ar inpattern
-template.
-The sequence `$0' is replace by the original filename.
-Additionally, the sequence
-.Ql Op Ar seq1 , Ar seq2
-is replaced by
-.Op Ar seq1
-if
-.Ar seq1
-is not a null string; otherwise it is replaced by
-.Ar seq2 .
-For example, the command
-.Pp
-.Bd -literal -offset indent -compact
-nmap $1.$2.$3 [$1,$2].[$2,file]
-.Ed
-.Pp
-would yield
-the output filename "myfile.data" for input filenames "myfile.data" and
-"myfile.data.old", "myfile.file" for the input filename "myfile", and
-"myfile.myfile" for the input filename ".myfile".
-Spaces may be included in
-.Ar outpattern ,
-as in the example: `nmap $1 sed "s/ *$//" > $1' .
-Use the `\e' character to prevent special treatment
-of the `$','[','[', and `,' characters.
-.It Ic ntrans Op Ar inchars Op Ar outchars
-Set or unset the filename character translation mechanism.
-If no arguments are specified, the filename character
-translation mechanism is unset.
-If arguments are specified, characters in
-remote filenames are translated during
-.Ic mput
-commands and
-.Ic put
-commands issued without a specified remote target filename.
-If arguments are specified, characters in
-local filenames are translated during
-.Ic mget
-commands and
-.Ic get
-commands issued without a specified local target filename.
-This command is useful when connecting to a
-.No non\- Ns Ux
-remote computer
-with different file naming conventions or practices.
-Characters in a filename matching a character in
-.Ar inchars
-are replaced with the corresponding character in
-.Ar outchars .
-If the character's position in
-.Ar inchars
-is longer than the length of
-.Ar outchars ,
-the character is deleted from the file name.
-.It Ic open Ar host Op Ar port
-Establish a connection to the specified
-.Ar host
-.Tn FTP
-server.
-An optional port number may be supplied,
-in which case,
-.Nm ftp
-will attempt to contact an
-.Tn FTP
-server at that port.
-If the
-.Ic auto-login
-option is on (default),
-.Nm ftp
-will also attempt to automatically log the user in to
-the
-.Tn FTP
-server (see below).
-.It Ic passive
-Toggle passive mode. If passive mode is turned on
-(default is off), the ftp client will
-send a
-.Dv PASV
-command for all data connections instead of the usual
-.Dv PORT
-command. The
-.Dv PASV
-command requests that the remote server open a port for the data connection
-and return the address of that port. The remote server listens on that
-port and the client connects to it. When using the more traditional
-.Dv PORT
-command, the client listens on a port and sends that address to the remote
-server, who connects back to it. Passive mode is useful when using
-.Nm ftp
-through a gateway router or host that controls the directionality of
-traffic.
-(Note that though ftp servers are required to support the
-.Dv PASV
-command by RFC 1123, some do not.)
-.It Ic prompt
-Toggle interactive prompting.
-Interactive prompting
-occurs during multiple file transfers to allow the
-user to selectively retrieve or store files.
-If prompting is turned off (default is on), any
-.Ic mget
-or
-.Ic mput
-will transfer all files, and any
-.Ic mdelete
-will delete all files.
-.It Ic proxy Ar ftp-command
-Execute an ftp command on a secondary control connection.
-This command allows simultaneous connection to two remote ftp
-servers for transferring files between the two servers.
-The first
-.Ic proxy
-command should be an
-.Ic open ,
-to establish the secondary control connection.
-Enter the command "proxy ?" to see other ftp commands executable on the
-secondary connection.
-The following commands behave differently when prefaced by
-.Ic proxy :
-.Ic open
-will not define new macros during the auto-login process,
-.Ic close
-will not erase existing macro definitions,
-.Ic get
-and
-.Ic mget
-transfer files from the host on the primary control connection
-to the host on the secondary control connection, and
-.Ic put ,
-.Ic mput ,
-and
-.Ic append
-transfer files from the host on the secondary control connection
-to the host on the primary control connection.
-Third party file transfers depend upon support of the ftp protocol
-.Dv PASV
-command by the server on the secondary control connection.
-.It Ic put Ar local-file Op Ar remote-file
-Store a local file on the remote machine.
-If
-.Ar remote-file
-is left unspecified, the local file name is used
-after processing according to any
-.Ic ntrans
-or
-.Ic nmap
-settings
-in naming the remote file.
-File transfer uses the
-current settings for
-.Ic type ,
-.Ic format ,
-.Ic mode ,
-and
-.Ic structure .
-.It Ic pwd
-Print the name of the current working directory on the remote
-machine.
-.It Ic quit
-A synonym for
-.Ic bye .
-.It Ic quote Ar arg1 arg2 ...
-The arguments specified are sent, verbatim, to the remote
-.Tn FTP
-server.
-.It Ic recv Ar remote-file Op Ar local-file
-A synonym for get.
-.It Ic reget Ar remote-file Op Ar local-file
-Reget acts like get, except that if
-.Ar local-file
-exists and is
-smaller than
-.Ar remote-file ,
-.Ar local-file
-is presumed to be
-a partially transferred copy of
-.Ar remote-file
-and the transfer
-is continued from the apparent point of failure.
-This command
-is useful when transferring very large files over networks that
-are prone to dropping connections.
-.It Ic remotehelp Op Ar command-name
-Request help from the remote
-.Tn FTP
-server.
-If a
-.Ar command-name
-is specified it is supplied to the server as well.
-.It Ic remotestatus Op Ar file-name
-With no arguments, show status of remote machine.
-If
-.Ar file-name
-is specified, show status of
-.Ar file-name
-on remote machine.
-.It Xo
-.Ic rename
-.Op Ar from
-.Op Ar to
-.Xc
-Rename the file
-.Ar from
-on the remote machine, to the file
-.Ar to .
-.It Ic reset
-Clear reply queue.
-This command re-synchronizes command/reply sequencing with the remote
-ftp server.
-Resynchronization may be necessary following a violation of the ftp protocol
-by the remote server.
-.It Ic restart Ar marker
-Restart the immediately following
-.Ic get
-or
-.Ic put
-at the
-indicated
-.Ar marker .
-On
-.Ux
-systems, marker is usually a byte
-offset into the file.
-.It Ic rmdir Ar directory-name
-Delete a directory on the remote machine.
-.It Ic runique
-Toggle storing of files on the local system with unique filenames.
-If a file already exists with a name equal to the target
-local filename for a
-.Ic get
-or
-.Ic mget
-command, a ".1" is appended to the name.
-If the resulting name matches another existing file,
-a ".2" is appended to the original name.
-If this process continues up to ".99", an error
-message is printed, and the transfer does not take place.
-The generated unique filename will be reported.
-Note that
-.Ic runique
-will not affect local files generated from a shell command
-(see below).
-The default value is off.
-.It Ic send Ar local-file Op Ar remote-file
-A synonym for put.
-.It Ic sendport
-Toggle the use of
-.Dv PORT
-commands.
-By default,
-.Nm ftp
-will attempt to use a
-.Dv PORT
-command when establishing
-a connection for each data transfer.
-The use of
-.Dv PORT
-commands can prevent delays
-when performing multiple file transfers.
-If the
-.Dv PORT
-command fails,
-.Nm ftp
-will use the default data port.
-When the use of
-.Dv PORT
-commands is disabled, no attempt will be made to use
-.Dv PORT
-commands for each data transfer.
-This is useful
-for certain
-.Tn FTP
-implementations which do ignore
-.Dv PORT
-commands but, incorrectly, indicate they've been accepted.
-.It Ic site Ar arg1 arg2 ...
-The arguments specified are sent, verbatim, to the remote
-.Tn FTP
-server as a
-.Dv SITE
-command.
-.It Ic size Ar file-name
-Return size of
-.Ar file-name
-on remote machine.
-.It Ic status
-Show the current status of
-.Nm ftp .
-.It Ic struct Op Ar struct-name
-Set the file transfer
-.Ar structure
-to
-.Ar struct-name .
-By default \*(Lqstream\*(Rq structure is used.
-.It Ic sunique
-Toggle storing of files on remote machine under unique file names.
-Remote ftp server must support ftp protocol
-.Dv STOU
-command for
-successful completion.
-The remote server will report unique name.
-Default value is off.
-.It Ic system
-Show the type of operating system running on the remote machine.
-.It Ic tenex
-Set the file transfer type to that needed to
-talk to
-.Tn TENEX
-machines.
-.It Ic trace
-Toggle packet tracing.
-.It Ic type Op Ar type-name
-Set the file transfer
-.Ic type
-to
-.Ar type-name .
-If no type is specified, the current type
-is printed.
-The default type is network
-.Tn ASCII .
-.It Ic umask Op Ar newmask
-Set the default umask on the remote server to
-.Ar newmask .
-If
-.Ar newmask
-is omitted, the current umask is printed.
-.It Xo
-.Ic user Ar user-name
-.Op Ar password
-.Op Ar account
-.Xc
-Identify yourself to the remote
-.Tn FTP
-server.
-If the
-.Ar password
-is not specified and the server requires it,
-.Nm ftp
-will prompt the user for it (after disabling local echo).
-If an
-.Ar account
-field is not specified, and the
-.Tn FTP
-server
-requires it, the user will be prompted for it.
-If an
-.Ar account
-field is specified, an account command will
-be relayed to the remote server after the login sequence
-is completed if the remote server did not require it
-for logging in.
-Unless
-.Nm ftp
-is invoked with \*(Lqauto-login\*(Rq disabled, this
-process is done automatically on initial connection to
-the
-.Tn FTP
-server.
-.It Ic verbose
-Toggle verbose mode.
-In verbose mode, all responses from
-the
-.Tn FTP
-server are displayed to the user.
-In addition,
-if verbose is on, when a file transfer completes, statistics
-regarding the efficiency of the transfer are reported.
-By default,
-verbose is on.
-.It Ic ? Op Ar command
-A synonym for help.
-.El
-.Pp
-The following command can be used with ftpsec-aware servers.
-.Bl -tag -width Fl
-.It Xo
-.Ic prot
-.Ar clear |
-.Ar safe |
-.Ar confidential |
-.Ar private
-.Xc
-Set the data protection level to the requested level.
-.El
-.Pp
-The following command can be used with ftp servers that has
-implemented the KAUTH site command.
-.Bl -tag -width Fl
-.It Ic kauth Op Ar principal
-Obtain remote tickets.
-.El
-.Pp
-Command arguments which have embedded spaces may be quoted with
-quote `"' marks.
-.Sh ABORTING A FILE TRANSFER
-To abort a file transfer, use the terminal interrupt key
-(usually Ctrl-C).
-Sending transfers will be immediately halted.
-Receiving transfers will be halted by sending a ftp protocol
-.Dv ABOR
-command to the remote server, and discarding any further data received.
-The speed at which this is accomplished depends upon the remote
-server's support for
-.Dv ABOR
-processing.
-If the remote server does not support the
-.Dv ABOR
-command, an
-.Ql ftp>
-prompt will not appear until the remote server has completed
-sending the requested file.
-.Pp
-The terminal interrupt key sequence will be ignored when
-.Nm ftp
-has completed any local processing and is awaiting a reply
-from the remote server.
-A long delay in this mode may result from the ABOR processing described
-above, or from unexpected behavior by the remote server, including
-violations of the ftp protocol.
-If the delay results from unexpected remote server behavior, the local
-.Nm ftp
-program must be killed by hand.
-.Sh FILE NAMING CONVENTIONS
-Files specified as arguments to
-.Nm ftp
-commands are processed according to the following rules.
-.Bl -enum
-.It
-If the file name
-.Sq Fl
-is specified, the
-.Ar stdin
-(for reading) or
-.Ar stdout
-(for writing) is used.
-.It
-If the first character of the file name is
-.Sq \&| ,
-the
-remainder of the argument is interpreted as a shell command.
-.Nm Ftp
-then forks a shell, using
-.Xr popen 3
-with the argument supplied, and reads (writes) from the stdout
-(stdin).
-If the shell command includes spaces, the argument
-must be quoted; e.g.
-\*(Lq" ls -lt"\*(Rq.
-A particularly
-useful example of this mechanism is: \*(Lqdir more\*(Rq.
-.It
-Failing the above checks, if ``globbing'' is enabled,
-local file names are expanded
-according to the rules used in the
-.Xr csh 1 ;
-c.f. the
-.Ic glob
-command.
-If the
-.Nm ftp
-command expects a single local file (.e.g.
-.Ic put ) ,
-only the first filename generated by the "globbing" operation is used.
-.It
-For
-.Ic mget
-commands and
-.Ic get
-commands with unspecified local file names, the local filename is
-the remote filename, which may be altered by a
-.Ic case ,
-.Ic ntrans ,
-or
-.Ic nmap
-setting.
-The resulting filename may then be altered if
-.Ic runique
-is on.
-.It
-For
-.Ic mput
-commands and
-.Ic put
-commands with unspecified remote file names, the remote filename is
-the local filename, which may be altered by a
-.Ic ntrans
-or
-.Ic nmap
-setting.
-The resulting filename may then be altered by the remote server if
-.Ic sunique
-is on.
-.El
-.Sh FILE TRANSFER PARAMETERS
-The FTP specification specifies many parameters which may
-affect a file transfer.
-The
-.Ic type
-may be one of \*(Lqascii\*(Rq, \*(Lqimage\*(Rq (binary),
-\*(Lqebcdic\*(Rq, and \*(Lqlocal byte size\*(Rq (for
-.Tn PDP Ns -10's
-and
-.Tn PDP Ns -20's
-mostly).
-.Nm Ftp
-supports the ascii and image types of file transfer,
-plus local byte size 8 for
-.Ic tenex
-mode transfers.
-.Pp
-.Nm Ftp
-supports only the default values for the remaining
-file transfer parameters:
-.Ic mode ,
-.Ic form ,
-and
-.Ic struct .
-.Sh THE .netrc FILE
-The
-.Pa .netrc
-file contains login and initialization information
-used by the auto-login process.
-It resides in the user's home directory.
-The following tokens are recognized; they may be separated by spaces,
-tabs, or new-lines:
-.Bl -tag -width password
-.It Ic machine Ar name
-Identify a remote machine
-.Ar name .
-The auto-login process searches the
-.Pa .netrc
-file for a
-.Ic machine
-token that matches the remote machine specified on the
-.Nm ftp
-command line or as an
-.Ic open
-command argument.
-Once a match is made, the subsequent
-.Pa .netrc
-tokens are processed,
-stopping when the end of file is reached or another
-.Ic machine
-or a
-.Ic default
-token is encountered.
-.It Ic default
-This is the same as
-.Ic machine
-.Ar name
-except that
-.Ic default
-matches any name.
-There can be only one
-.Ic default
-token, and it must be after all
-.Ic machine
-tokens.
-This is normally used as:
-.Pp
-.Dl default login anonymous password user@site
-.Pp
-thereby giving the user
-.Ar automatic
-anonymous ftp login to
-machines not specified in
-.Pa .netrc .
-This can be overridden
-by using the
-.Fl n
-flag to disable auto-login.
-.It Ic login Ar name
-Identify a user on the remote machine.
-If this token is present, the auto-login process will initiate
-a login using the specified
-.Ar name .
-.It Ic password Ar string
-Supply a password.
-If this token is present, the auto-login process will supply the
-specified string if the remote server requires a password as part
-of the login process.
-Note that if this token is present in the
-.Pa .netrc
-file for any user other
-than
-.Ar anonymous ,
-.Nm ftp
-will abort the auto-login process if the
-.Pa .netrc
-is readable by
-anyone besides the user.
-.It Ic account Ar string
-Supply an additional account password.
-If this token is present, the auto-login process will supply the
-specified string if the remote server requires an additional
-account password, or the auto-login process will initiate an
-.Dv ACCT
-command if it does not.
-.It Ic macdef Ar name
-Define a macro.
-This token functions like the
-.Nm ftp
-.Ic macdef
-command functions.
-A macro is defined with the specified name; its contents begin with the
-next
-.Pa .netrc
-line and continue until a null line (consecutive new-line
-characters) is encountered.
-If a macro named
-.Ic init
-is defined, it is automatically executed as the last step in the
-auto-login process.
-.El
-.Sh ENVIRONMENT
-.Nm Ftp
-utilizes the following environment variables.
-.Bl -tag -width Fl
-.It Ev HOME
-For default location of a
-.Pa .netrc
-file, if one exists.
-.It Ev SHELL
-For default shell.
-.El
-.Sh SEE ALSO
-.Xr ftpd 8 ,
-.%T RFC2228
-.Sh HISTORY
-The
-.Nm ftp
-command appeared in
-.Bx 4.2 .
-.Sh BUGS
-Correct execution of many commands depends upon proper behavior
-by the remote server.
-.Pp
-An error in the treatment of carriage returns
-in the
-.Bx 4.2
-ascii-mode transfer code
-has been corrected.
-This correction may result in incorrect transfers of binary files
-to and from
-.Bx 4.2
-servers using the ascii type.
-Avoid this problem by using the binary image type.
diff --git a/crypto/kerberosIV/man/ftpd.8 b/crypto/kerberosIV/man/ftpd.8
deleted file mode 100644
index c51de1ce06dc..000000000000
--- a/crypto/kerberosIV/man/ftpd.8
+++ /dev/null
@@ -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 .
diff --git a/crypto/kerberosIV/man/ftpusers.5 b/crypto/kerberosIV/man/ftpusers.5
deleted file mode 100644
index dfd66f94003b..000000000000
--- a/crypto/kerberosIV/man/ftpusers.5
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/man/kpasswd.1 b/crypto/kerberosIV/man/kpasswd.1
deleted file mode 100644
index ad0c8584a83e..000000000000
--- a/crypto/kerberosIV/man/kpasswd.1
+++ /dev/null
@@ -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)
diff --git a/crypto/kerberosIV/man/krb.extra.5 b/crypto/kerberosIV/man/krb.extra.5
deleted file mode 100644
index 38569fdcd805..000000000000
--- a/crypto/kerberosIV/man/krb.extra.5
+++ /dev/null
@@ -1,51 +0,0 @@
-.\" $Id: krb.extra.5,v 1.4 1999/11/25 05:30:42 assar Exp $
-.\"
-.Dd June 24, 1999
-.Dt KRB.EXTRA 5
-.Os KTH-KRB
-.Sh NAME
-.Nm krb.extra
-.Nd
-Kerberos misc configuration file
-.Sh DESCRIPTION
-.Nm
-contains a number of settings that are used by the kerberos library,
-or directly by applications. Each line in the file consists of a
-variable, an equal sign, and a value. Lines beginning with hash are
-ignored.
-.Pp
-Currently defined variables are:
-.Bl -tag -width foo
-.It kdc_timeout
-time in seconds to wait for an answer from the KDC (default is 4
-seconds)
-.It kdc_timesync
-if this is enabled, the time differential between the client and the
-KDC will be stored, and used later on when computing the correct time;
-this is useful if the client's clock is drifting
-.It firewall_address
-the outside address of the firewall; this is used in some places to
-compute a direction bit, and this might break if the server has a
-different idea about which address to use then the client
-.It krb4_proxy
-address of a web-proxy to use when connecting to the KDC via HTTP
-.It krb_default_tkt_root
-the default prefix for ticket files. E.g, if your uid is 42 and the
-prefix is /tmp/tkt then your default ticket file will be /tmp/tkt42
-.It krb_default_keyfile
-the default kefile, normally /etc/srvtab
-.It nat_in_use
-if a Network Address Translator (NAT) is being used.
-.El
-.Sh EXAMPLES
-.Bd -literal
-# this is a comment
-krb_default_tkt_root = /tkt/tkt_
-kdc_timesync = yes
-firewall_address = 10.0.0.1
-krb_default_keyfile = /etc/kerberosIV/srvtab
-.Ed
-.Sh SEE ALSO
-.Xr krb.equiv 5 ,
-.Xr krb.conf 5 ,
-.Xr krb.realms 5
diff --git a/crypto/kerberosIV/man/login.1 b/crypto/kerberosIV/man/login.1
deleted file mode 100644
index b05a6a4dce61..000000000000
--- a/crypto/kerberosIV/man/login.1
+++ /dev/null
@@ -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 .
diff --git a/crypto/kerberosIV/man/login.access.5 b/crypto/kerberosIV/man/login.access.5
deleted file mode 100644
index 28d423c9156c..000000000000
--- a/crypto/kerberosIV/man/login.access.5
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/man/pagsh.1 b/crypto/kerberosIV/man/pagsh.1
deleted file mode 100644
index cd95f8bfc90c..000000000000
--- a/crypto/kerberosIV/man/pagsh.1
+++ /dev/null
@@ -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
diff --git a/crypto/kerberosIV/man/rcp.1 b/crypto/kerberosIV/man/rcp.1
deleted file mode 100644
index cc5efd0c7b4f..000000000000
--- a/crypto/kerberosIV/man/rcp.1
+++ /dev/null
@@ -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 .
diff --git a/crypto/kerberosIV/man/rlogin.1 b/crypto/kerberosIV/man/rlogin.1
deleted file mode 100644
index 3e1fd8d06e37..000000000000
--- a/crypto/kerberosIV/man/rlogin.1
+++ /dev/null
@@ -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.
diff --git a/crypto/kerberosIV/man/rlogind.8 b/crypto/kerberosIV/man/rlogind.8
deleted file mode 100644
index bc99529b81a0..000000000000
--- a/crypto/kerberosIV/man/rlogind.8
+++ /dev/null
@@ -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 .
diff --git a/crypto/kerberosIV/man/rsh.1 b/crypto/kerberosIV/man/rsh.1
deleted file mode 100644
index 5d79faf87feb..000000000000
--- a/crypto/kerberosIV/man/rsh.1
+++ /dev/null
@@ -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.
diff --git a/crypto/kerberosIV/man/rshd.8 b/crypto/kerberosIV/man/rshd.8
deleted file mode 100644
index 8bd661f1527f..000000000000
--- a/crypto/kerberosIV/man/rshd.8
+++ /dev/null
@@ -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.
diff --git a/crypto/kerberosIV/man/su.1 b/crypto/kerberosIV/man/su.1
deleted file mode 100644
index 78d5c8d48304..000000000000
--- a/crypto/kerberosIV/man/su.1
+++ /dev/null
@@ -1,189 +0,0 @@
-.\" Copyright (c) 1988, 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: @(#)su.1 6.12 (Berkeley) 7/29/91
-.\" $Id: su.1,v 1.3 1996/02/11 23:56:09 d91-jda Exp $
-.\"
-.Dd July 29, 1991
-.Dt SU 1
-.Os
-.Sh NAME
-.Nm su
-.Nd substitute user identity
-.Sh SYNOPSIS
-.Nm su
-.Op Fl Kflmi
-.Op Ar login Op Ar "shell arguments"
-.Sh DESCRIPTION
-.Nm Su
-requests the Kerberos password for
-.Ar login
-(or for
-.Dq Ar login Ns .root ,
-if no login is provided), and switches to
-that user and group ID after obtaining a Kerberos ticket granting ticket.
-A shell is then executed, and any additional
-.Ar "shell arguments"
-after the login name
-are passed to the shell.
-.Nm Su
-will resort to the local password file to find the password for
-.Ar login
-if there is a Kerberos error.
-If
-.Nm su
-is executed by root, no password is requested and a shell
-with the appropriate user ID is executed; no additional Kerberos tickets
-are obtained.
-.Pp
-Alternately, if the user enters the password "s/key", they will be
-authenticated using the S/Key one-time password system as described in
-.Xr skey 1 .
-S/Key is a Trademark of Bellcore.
-.Pp
-By default, the environment is unmodified with the exception of
-.Ev USER ,
-.Ev HOME ,
-and
-.Ev SHELL .
-.Ev HOME
-and
-.Ev SHELL
-are set to the target login's default values.
-.Ev USER
-is set to the target login, unless the target login has a user ID of 0,
-in which case it is unmodified.
-The invoked shell is the target login's.
-This is the traditional behavior of
-.Nm su .
-.Pp
-The options are as follows:
-.Bl -tag -width Ds
-.It Fl K
-Do not attempt to use Kerberos to authenticate the user.
-.It Fl f
-If the invoked shell is
-.Xr csh 1 ,
-this option prevents it from reading the
-.Dq Pa .cshrc
-file.
-.It Fl l
-Simulate a full login.
-The environment is discarded except for
-.Ev HOME ,
-.Ev SHELL ,
-.Ev PATH ,
-.Ev TERM ,
-and
-.Ev USER .
-.Ev HOME
-and
-.Ev SHELL
-are modified as above.
-.Ev USER
-is set to the target login.
-.Ev PATH
-is set to
-.Dq Pa /bin:/usr/bin .
-.Ev TERM
-is imported from your current environment.
-The invoked shell is the target login's, and
-.Nm su
-will change directory to the target login's home directory.
-.It Fl m
-Leave the environment unmodified.
-The invoked shell is your login shell, and no directory changes are made.
-As a security precaution, if the target user's shell is a non-standard
-shell (as defined by
-.Xr getusershell 3 )
-and the caller's real uid is
-non-zero,
-.Nm su
-will fail.
-.It Fl i
-If the kerberos root instance is not root any other value can be passed
-using this switch.
-.El
-.Pp
-The
-.Fl l
-and
-.Fl m
-options are mutually exclusive; the last one specified
-overrides any previous ones.
-.Pp
-Only users mentioned in
-.Dq Pa ~root/.klogin
-(or in group 0 when not doing kerberos) can
-.Nm su
-to
-.Dq root .
-.Pp
-By default (unless the prompt is reset by a startup file) the super-user
-prompt is set to
-.Dq Sy \&#
-to remind one of its awesome power.
-.Sh SEE ALSO
-.Xr csh 1 ,
-.Xr login 1 ,
-.Xr sh 1 ,
-.Xr skey 1 ,
-.Xr kinit 1 ,
-.Xr kerberos 1 ,
-.Xr passwd 5 ,
-.Xr group 5 ,
-.Xr environ 7
-.Sh ENVIRONMENT
-Environment variables used by
-.Nm su :
-.Bl -tag -width HOME
-.It Ev HOME
-Default home directory of real user ID unless modified as
-specified above.
-.It Ev PATH
-Default search path of real user ID unless modified as specified above.
-.It Ev TERM
-Provides terminal type which may be retained for the substituted
-user ID.
-.It Ev USER
-The user ID is always the effective ID (the target user ID) after an
-.Nm su
-unless the user ID is 0 (root).
-.El
-.Sh HISTORY
-A
-.Nm
-command appeared in
-.At v7 .
-The version described
-here is an adaptation of the
-.Tn MIT
-Athena Kerberos command.
diff --git a/kerberosIV/include/roken.h b/kerberosIV/include/roken.h
deleted file mode 100755
index e9bbff883ae9..000000000000
--- a/kerberosIV/include/roken.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/* This is an OS dependent, generated file */
-/* Generated by Mark Murray */
-
-#ifndef __ROKEN_H__
-#define __ROKEN_H__
-
-/* -*- C -*- */
-/*
- * 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: roken.h.in,v 1.125 1999/12/02 16:58:52 joda Exp $ */
-/* $FreeBSD$ */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-#include <grp.h>
-#include <sys/stat.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <syslog.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <err.h>
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <time.h>
-
-#include <paths.h>
-
-
-#define ROKEN_LIB_FUNCTION
-
-#include <roken-common.h>
-
-
-
-
-
-
-
-
-
-
-int asnprintf (char **ret, size_t max_sz, const char *format, ...)
- __attribute__ ((format (printf, 3, 4)));
-
-int vasnprintf (char **ret, size_t max_sz, const char *format, va_list ap)
- __attribute__((format (printf, 3, 0)));
-
-
-char * strndup(const char *old, size_t sz);
-
-char * strlwr(char *);
-
-size_t strnlen(const char*, size_t);
-
-
-
-
-
-char * strupr(char *);
-
-
-
-
-
-
-
-
-
-
-
-#include <pwd.h>
-struct passwd *k_getpwnam (const char *user);
-struct passwd *k_getpwuid (uid_t uid);
-
-const char *get_default_username (void);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-time_t tm2time (struct tm tm, int local);
-
-int unix_verify_user(char *user, char *password);
-
-void inaddr2str(struct in_addr addr, char *s, size_t len);
-
-void mini_inetd (int port);
-
-int roken_concat (char *s, size_t len, ...);
-
-size_t roken_mconcat (char **s, size_t max_len, ...);
-
-int roken_vconcat (char *s, size_t len, va_list args);
-
-size_t roken_vmconcat (char **s, size_t max_len, va_list args);
-
-ssize_t net_write (int fd, const void *buf, size_t nbytes);
-
-ssize_t net_read (int fd, void *buf, size_t nbytes);
-
-int issuid(void);
-
-
-int get_window_size(int fd, struct winsize *);
-
-
-
-extern const char *__progname;
-
-extern char **environ;
-
-
-
-
-struct hostent *
-copyhostent (const struct hostent *h);
-
-
-/*
- * kludges and such
- */
-
-int roken_gethostby_setup(const char*, const char*);
-struct hostent* roken_gethostbyname(const char*);
-struct hostent* roken_gethostbyaddr(const void*, size_t, int);
-
-#define roken_getservbyname(x,y) getservbyname(x,y)
-
-#define roken_openlog(a,b,c) openlog(a,b,c)
-
-void set_progname(char *argv0);
-
-#endif /* __ROKEN_H__ */
diff --git a/release/texts/alpha/RELNOTES.TXT b/release/texts/alpha/RELNOTES.TXT
index 8d8f93277aec..b8379652620d 100644
--- a/release/texts/alpha/RELNOTES.TXT
+++ b/release/texts/alpha/RELNOTES.TXT
@@ -45,45 +45,81 @@ Table of contents:
1.1. KERNEL CHANGES
-------------------
-Support for Adaptec 152x/151x/AIC-6360 SCSI controllers is back.
+The loader was substantially updated from -current
-netgraph(4) has been added. Netgraph provides a uniform and modular system
-for the implementation of kernel objects which perform various networking
-functions. To enable it, ``options NETGRAPH'' must be added to the kernel.
+Various bugs in the CAM driver fixed.
-i4b(4) has been upgraded to version 00.83.00, providing increased robustness
-and stability, and supporting many new cards (Asuscom ISDNlink 128K,
-AVM Fritz!Card PCI, AVM Fritz!Card PnP, ELSA PCC-16, ITK ix1 micro V.3,
-Siemens I-Surf 2.0).
+oltr [Olicom NIC] driver updated.
+bktr(4) [Brooktree frame-grabber] driver updated.
-1.2. SECURITY CHANGES
----------------------
+isp(4) [Compaq Qlogic] driver updated.
+
+sym(4) [NCR/Symbios SCSI controller] driver updated.
+
+A number of bugs in syscons(4) fixed.
+
+A number of bugs in vinum(4) fixed.
+
+Better support for LBA in wd(4) driver.
+
+Audio mixer(8) support substantially updated.
-Support has been added for blocking incoming ICMP redirects, outgoing RST
-frames and incoming SYN|FIN frames in order to lessen or nullify the
-impact of certain kinds of DoS attacks.
+Support for Microsoft Sound Source (MSS) audio devices.
-Support has been added for forwarding IP datagrams without inspecting or
-decreasing the TTL in order to make gateways and firewalls less visible
-and therefore less exposed to attacks.
+Support for more Linux system calls in the Linux compatability code.
-New networking security features include the ability to drop TCP packets with
-SYN+FIN (NOTE: this breaks rfc1644 extensions (T/TCP)), restrict emission of
-RST, ignore incoming ICMP REDIRECT messages, and also set to log incoming
-ICMP REDIRECT messages. See rc.conf(5) for details on how to utilize these
-new features.
+netgraph(4) updated: new node types and documentation added.
+
+Various bugs in msdosfs code fixed.
+
+
+1.2. SECURITY CHANGES
+---------------------
+
+Many small but meaningful changes, too many to list. See CVS repository
+for more details. Suffice it to say from a user perspective that
+"various things were tightened up."
1.3. USERLAND CHANGES
---------------------
+vinum(8) substantially updated.
+
+chmod(1) has gained a -v flag. See man page for details.
+
+df(1) gains new unit types. See man page for details.
+
+ppp(1) substantially updated.
+
+Various bugs in date(1), ed(1), ln(1), sh(1), camcontrol(8), vinum(8)
+and quite a number of other user commands fixed (see CVS for details :).
+
+groff(1), grep(1) texinfo(1) utilities updated.
+
+Quite a few enhancements to /etc from -current merged.
+
+Many doc bugs fixed in man pages.
+
+Thread locking functions added to dynamic linker (see dllockinit(3)).
+
+pthread_cancel(3) function added.
+
ppp(8) has undergone some changes and bug fixes. One change in particular
may disturb existing configurations. The # character is now treated
as a comment start, irrespective of whether it's the first non-blank
character on the line. Some ISPs allocate authnames with embedded #
characters. These must now be escaped or quoted.
+picobsd support (/usr/src/release/picobsd) substantially updated.
+
+HTTP installation option added to system installer (sysinstall(8)).
+
+XFree86 updated from 3.3.5 to 3.3.6 (XFree86 4.0 not quite ready for
+prime-time yet).
+
+
2. Supported Configurations
---------------------------
FreeBSD currently runs on a wide variety of ISA, VLB, EISA and PCI bus
diff --git a/release/texts/i386/RELNOTES.TXT b/release/texts/i386/RELNOTES.TXT
index 675e788ac69d..f3ebd971d5de 100644
--- a/release/texts/i386/RELNOTES.TXT
+++ b/release/texts/i386/RELNOTES.TXT
@@ -44,50 +44,80 @@ Table of contents:
1.1. KERNEL CHANGES
-------------------
-Support for Adaptec 152x/151x/AIC-6360 SCSI controllers is back.
+The loader was substantially updated from -current
-netgraph(4) has been added. Netgraph provides a uniform and modular system
-for the implementation of kernel objects which perform various networking
-functions. To enable it, ``options NETGRAPH'' must be added to the kernel.
+Various bugs in the CAM driver fixed.
-i4b(4) has been upgraded to version 00.83.00, providing increased robustness
-and stability, and supporting many new cards (Asuscom ISDNlink 128K,
-AVM Fritz!Card PCI, AVM Fritz!Card PnP, ELSA PCC-16, ITK ix1 micro V.3,
-Siemens I-Surf 2.0).
+oltr [Olicom NIC] driver updated.
-RAID-5 support has been added to vinum(8).
+bktr(4) [Brooktree frame-grabber] driver updated.
-Driver support for the Intel PIIX4 and AcerLabs M15x3 power management
-controllers has been added.
+isp(4) [Compaq Qlogic] driver updated.
+sym(4) [NCR/Symbios SCSI controller] driver updated.
-1.2. SECURITY CHANGES
----------------------
+A number of bugs in syscons(4) fixed.
+
+A number of bugs in vinum(4) fixed.
+
+Better support for LBA in wd(4) driver.
+
+Audio mixer(8) support substantially updated.
+
+Support for Microsoft Sound Source (MSS) audio devices.
-Support has been added for blocking incoming ICMP redirects, outgoing RST
-frames and incoming SYN|FIN frames in order to lessen or nullify the
-impact of certain kinds of DoS attacks.
+Support for more Linux system calls in the Linux compatability code.
-Support has been added for forwarding IP datagrams without inspecting or
-decreasing the TTL in order to make gateways and firewalls less visible
-and therefore less exposed to attacks.
+netgraph(4) updated: new node types and documentation added.
-New networking security features include the ability to drop TCP packets with
-SYN+FIN (NOTE: this breaks rfc1644 extensions (T/TCP)), restrict emission of
-RST, ignore incoming ICMP REDIRECT messages, and also set to log incoming
-ICMP REDIRECT messages. See rc.conf(5) for details on how to utilize these
-new features.
+Various bugs in msdosfs code fixed.
+
+
+1.2. SECURITY CHANGES
+---------------------
+
+Many small but meaningful changes, too many to list. See CVS repository
+for more details. Suffice it to say from a user perspective that
+"various things were tightened up."
1.3. USERLAND CHANGES
---------------------
+vinum(8) substantially updated.
+
+chmod(1) has gained a -v flag. See man page for details.
+
+df(1) gains new unit types. See man page for details.
+
+ppp(1) substantially updated.
+
+Various bugs in date(1), ed(1), ln(1), sh(1), camcontrol(8), vinum(8)
+and quite a number of other user commands fixed (see CVS for details :).
+
+groff(1), grep(1) texinfo(1) utilities updated.
+
+Quite a few enhancements to /etc from -current merged.
+
+Many doc bugs fixed in man pages.
+
+Thread locking functions added to dynamic linker (see dllockinit(3)).
+
+pthread_cancel(3) function added.
+
ppp(8) has undergone some changes and bug fixes. One change in particular
may disturb existing configurations. The # character is now treated
as a comment start, irrespective of whether it's the first non-blank
character on the line. Some ISPs allocate authnames with embedded #
characters. These must now be escaped or quoted.
+picobsd support (/usr/src/release/picobsd) substantially updated.
+
+HTTP installation option added to system installer (sysinstall(8)).
+
+XFree86 updated from 3.3.5 to 3.3.6 (XFree86 4.0 not quite ready for
+prime-time yet).
+
2. Supported Configurations
---------------------------
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 0d732f78c5a5..601c8827795d 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -36,7 +36,7 @@
TYPE="FreeBSD"
REVISION="3.5"
-BRANCH="STABLE"
+BRANCH="RELEASE"
RELEASE="${REVISION}-${BRANCH}"
SNAPDATE=""
if [ "X${SNAPDATE}" != "X" ]; then
diff --git a/usr.sbin/ypserv/Makefile.yp b/usr.sbin/ypserv/Makefile.yp
index 354987783dde..61a5636f7b21 100644
--- a/usr.sbin/ypserv/Makefile.yp
+++ b/usr.sbin/ypserv/Makefile.yp
@@ -478,8 +478,7 @@ $(PASSWD): $(MASTER)
passwd.byname: $(PASSWD)
@echo "Updating $@..."
$(CAT) $(PASSWD) | \
- $(AWK) -F: '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \
- print $$1"\t"$$0 }' $^ \
+ $(AWK) -F: '{ if ($$1 != "+") print $$1"\t"$$0 }' $^ \
| $(DBLOAD) -f -i $(PASSWD) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c
@@ -490,8 +489,7 @@ passwd.byname: $(PASSWD)
passwd.byuid: $(PASSWD)
@echo "Updating $@..."
$(CAT) $(PASSWD) | \
- $(AWK) -F: '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \
- print $$3"\t"$$0 }' $^ \
+ $(AWK) -F: '{ if ($$1 != "+") print $$3"\t"$$0 }' $^ \
| $(DBLOAD) -f -i $(PASSWD) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c
@@ -503,8 +501,7 @@ passwd.byuid: $(PASSWD)
group.byname: $(GROUP)
@echo "Updating $@..."
$(CAT) $(GROUP) | \
- $(AWK) -F: '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \
- print $$1"\t"$$0 }' $^ \
+ $(AWK) -F: '{ if ($$1 != "+") print $$1"\t"$$0 }' $^ \
| $(DBLOAD) -f -i $(GROUP) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c
@@ -515,8 +512,7 @@ group.byname: $(GROUP)
group.bygid: $(GROUP)
@echo "Updating $@..."
$(CAT) $(GROUP) | \
- $(AWK) -F: '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \
- print $$3"\t"$$0 }' $^ \
+ $(AWK) -F: '{ if ($$1 != "+") print $$3"\t"$$0 }' $^ \
| $(DBLOAD) -f -i $(GROUP) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c